Hello everyone, 
        Recently i have started using geootools and I am a newbie in geotools
development. My objective is to *rasterize a vector layer* and for that I
first created 10 objects of *org.geotools.geometry.iso.primitive.Point*
class using the *GeometryBuilder* class. Using that geometry object created
objects of *SimpleFeature* using *SimpleFeatureBuilder* class and added it
to *SimpleFetureCollection* and then made a feature layer using this
collection. Then added this layer to Mapcontext and rendered the conext
using the GTRender class. But on doing so it is giving me following
exception:-

org.geotools.geometry.iso.primitive.PointImpl cannot be cast to
com.vividsolutions.jts.geom.Geometry
java.lang.ClassCastException: org.geotools.geometry.iso.primitive.PointImpl
cannot be cast to com.vividsolutions.jts.geom.Geometry
        at org.geotools.renderer.lite.FastBBOX.evaluate(FastBBOX.java:143)
        at
org.geotools.data.store.FilteringFeatureIterator.hasNext(FilteringFeatureIterator.java:60)
        at
org.geotools.data.store.ReTypingFeatureIterator.hasNext(ReTypingFeatureIterator.java:64)
        at
org.geotools.feature.collection.BridgeIterator.hasNext(BridgeIterator.java:26)
        at
org.geotools.renderer.lite.StreamingRenderer.drawPlain(StreamingRenderer.java:2514)
        at
org.geotools.renderer.lite.StreamingRenderer.processStylers(StreamingRenderer.java:2066)
        at
org.geotools.renderer.lite.StreamingRenderer.paint(StreamingRenderer.java:837)
        at
org.geotools.renderer.lite.StreamingRenderer.paint(StreamingRenderer.java:627)
        at org.geotools.demo.Rasterize.main(Rasterize.java:176)

I tried a lot but am not able to resolve this error. I also searched for
some ready made solutions but can't find any help. If anybody knows how to
solve this error please help to do the same. I don't know whether i am doing
it in the correct way or not. Any help will be very much appreciated.

Thanks



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/rasterizing-a-vector-layer-tp5150272.html
Sent from the geotools-gt2-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to