I think you'll want to use the JTS simplification classes. There's TopologyPreservingSimplifier and DouglasPeukerSimplifier.
They are fairly easy to use - they have static methods that you can pass geometry to and you get the simplified geometry back. In my experience the TopologyPreservingSimplifier is a bit more picky about what geometry it will accept - if there are self-intersecting polygons, for instance, it will sometimes throw an exception whereas the DP one will generally deal with it ok. This becomes an issue (at least for me) if you are simplifying geometry that has been created using the "buffer" methods, since it appears that the buffer method quite often returns invalid geometry (i think what happens is that holes and concave areas can collapse into zero-thickness areas, or more probably very, very very thin areas and when the simplifier tries to deal with it there's a loss of precision and vertices end up in exactly the same place producing illegal geometry).
Joshua Portway On 19 Sep 2007, at 13:45, Ruben Pardo wrote:
Hi ,I need to make some generalization (simplification) to variousSDE features (polygon, poline, multipolygon), something similiar to mapshaper( www.mapshaper.org ) , is it posiible to do with geotool? how can i do it? thanks very much.---------------------------------------------------------------------- ---This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005.http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
smime.p7s
Description: S/MIME cryptographic signature
------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
