We have a page on the two kinds of geometry implementations we have in the
system.

Streaming renderer works with JTS Geometry (implementing point, line,
polygon) which is an implementation of "Simple features for SQL".

The pint you created was an "ISO Geometry" which is an implementation of
ISO 19107.

If you could review this page of the documentation (
http://docs.geotools.org/stable/userguide/library/jts/geometry.html) and
construct a JTS Point instread your cdeo should work.



Jody Garnett


On Wed, Jul 9, 2014 at 4:40 AM, taiyabali <rjpil...@tatapowersed.com> wrote:

> 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
>
------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck&#174;
Code Sight&#153; - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to