Re: [Geotools-gt2-users] Self-Intersecting Polygons

2015-02-08 Thread Andrea Aime
Ah, I see, so the issue is actually in JTS, and you have no control on who is producing the data. JTS afaik has no easy to use tool to transform an invalid polygon into a valid one, nothing like ST_MakeValid in PostGIS as least, but you can have a look at how that functionality is coded in PostGIS,

Re: [Geotools-gt2-users] Self-Intersecting Polygons

2015-02-08 Thread Claus Näveke
On 08.02.2015 13:03, Ian Turton wrote: > It really depends on what your source actually meant it to be. Did it > mean a square or two triangles? Once you know that you can develop a > strategy to fix them. > Well the input is kind of sloppy KML which is created by people that do not really know a

Re: [Geotools-gt2-users] Self-Intersecting Polygons

2015-02-08 Thread Ian Turton
It really depends on what your source actually meant it to be. Did it mean a square or two triangles? Once you know that you can develop a strategy to fix them. Ian On 08:06, Sun, 8 Feb 2015 Claus Näveke wrote: > On 08.02.2015 08:25, Andy Turner wrote: > > Perhaps you need the same point added

Re: [Geotools-gt2-users] Self-Intersecting Polygons

2015-02-08 Thread Claus Näveke
On 08.02.2015 08:25, Andy Turner wrote: > Perhaps you need the same point added at the start and end of your > polygon, but the exception you get seems to be about something else. > Please can you send more details about that. Well you're right, the example should probably be closed. But even

Re: [Geotools-gt2-users] Self-Intersecting Polygons

2015-02-07 Thread Andy Turner
- From: "Claus Näveke" To: "geotools-gt2-users@lists.sourceforge.net" Subject: [Geotools-gt2-users] Self-Intersecting Polygons Date: Sat, Feb 7, 2015 18:43 Hi there, I'm currently trying to get GeoTools working for me, but unfortunately I am experiencing some troub

[Geotools-gt2-users] Self-Intersecting Polygons

2015-02-07 Thread Claus Näveke
Hi there, I'm currently trying to get GeoTools working for me, but unfortunately I am experiencing some trouble right at the beginning: When importing data from an external source (so fixing the the input is not an option) and trying to create a polygon out of it, I end up getting "IllegalArgum