OpenJUMP does exactly this in one procedure I.e. simplifying polygon covergages... (see menu tools>generalization>simplify polygon coverage) you would only need to call the function. Or you just look how it has been implemented based on Jump/JTS functonality (the source code is on the SVN)

stefan

Martin Davis schrieb:
I assume that your dataset forms a polygonal coverage, right? If so, you can't just simplify each polygon individually - you need to process them all together, to ensure that coverage topology is maintained.

In this case, you need to do the following:
- dissolve the boundaries of the polygons to form unique line segments
- merge the line segments into linestrings which do not cross
- simplify the resulting linestrings (using TopologyPreservingSimplifier, to avoid introducing intersections'
- polygonize the resulting line set
- use point-in-polygon tests to reattach the original polygon attributes to the simplified polygons.

You can do all this with the JUMP and JTS APIs - but there will be a bit of code required to glue all the pieces together.

Chris Huyler wrote:
We currently use the JUMP API to convert a large ESRI SHP file of all
the zip codes in the U.S. into a map that shows specific sales
territories.  The problem is that this file is over 20MB and I'd like
a way to reduce it's size so it can be loaded into a flash
application.  Ideally under 1MB.

Is there a way to simplify and reduce the size of shape files with JUMP?

I found a website application at http://www.mapshaper.org/ that lets
me do this but I really need to automate the process so that when
sales territory alignments change the map is automatically updated.

Thanks,
-Chris
_______________________________________________
jump-users mailing list
[email protected]
http://lists.refractions.net/mailman/listinfo/jump-users


_______________________________________________
jump-users mailing list
[email protected]
http://lists.refractions.net/mailman/listinfo/jump-users

Reply via email to