Hi,

I think that JTS does not have a MakeValid function that exists in PostGIS and 
Spatialite but perhaps the buffer recipe works for you
http://stackoverflow.com/questions/4267956/how-to-repaire-a-polygon-with-self-intersection

-Jukka Rahkonen-



________________________________
bernhard schulenburg wrote:

Thanks Michael,

to clarify, by "complex" I mean a polygon that self-intersects.

as shown here:
http://commons.wikimedia.org/wiki/File:Complex_polygon.svg

And I would like to split this up into the minimal number of simple polygons 
(simple = does not self-intersect..)

How would I do that programmatically?




2014-04-26 1:08 GMT+02:00 Michael Michaud 
<[email protected]<mailto:[email protected]>>:
Hi Bernhard,

I'm new to the JTS Topology suite and couldn't figure out the steps to take..

Btw.. I hope this is the right list to ask questions about JTS.
There is also a more specific JTS list at
[email protected]<mailto:[email protected]>
but if you use JTS with OpenJUMP workbench this list is perfect


So, my problem is, I have a complex polygon and I would like to split it into 
several simple polygons, using the JTS framework..
Through OpenJUMP UI, you must
- make your layer editable
- select the feature
- right click in the map and choose "explode selected features"

Programmatically, you can iterate through a geometry collection like this :
List<Geometry> geometries = new ArrayList<Geometry>();
for (int i = 0 ; i < geom.getNumGeometries() ; i++) {
    geometries.add(geom.getGeometryN(i));

}

Does JTS allow that kind of operation? Which classes should I look at to do 
such a thing?

Thanks in advance, any help is appreciated,
Hope that helps,

Michaƫl

Bernhard




------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform



_______________________________________________
Jump-pilot-devel mailing list
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel



------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Jump-pilot-devel mailing list
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Jump-pilot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to