From: Andrea A. <and...@ge...> - 2011-10-04 17:16:53
|
On Tue, Oct 4, 2011 at 5:41 PM, Diego Jesus <die...@gm...> 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 ------------------------------------------------------- |