On Tue, Oct 4, 2011 at 5:41 PM, Diego Jesus <[email protected]> wrote:

> Hello,
>
> I have a web service running wich only provides geometry in WKB format.
> I know it is a geometry collection (something like
> GEOMETRYCOLLECTION(POLYGON(( ... )) ) How can I convert it into a
> GeometryCollection?
>
> I have tried JTS.AsWKT() but it throws an exception:
>     java.lang.IllegalArgumentException: Points of LinearRing do not
> form a closed linestring
>

If it's really WKB you should use the WKBReader from JTS.
If you still get the above error it means the service in question is
providing
invalid geometries and needs to be fixed

Cheers
Andrea


-- 
-------------------------------------------------------
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy

phone: +39 0584 962313
fax:      +39 0584 962313

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf

-------------------------------------------------------
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to