From: John M. <geo...@ti...> - 2011-03-23 03:59:02
|
I am a new user of Geotools and don't know how to solve a particular problem. I have a set of polygons representing the boundaries of United States Counties. Each county adjoins one or more other counties, so they share common boundaries. This means that there are cases where a line segment in county A's polygon is within a line segment of County B's polygon. There are other similar cases, all in which part of the line of one county is the same as part or all of the line of another county. I need to apply a simplifying algorithm to the county lines to reduce the number of points in them (for example, using TopologyPreservingSimplifier ). However, since these lines are not identical, if I simply apply the simplification to each county independently, the result is that the boundaries which were identical are no longer so. I have tried putting all of the polygons into one large MutliPolygon, and applying the algorithm, but it produces incorrect results (it simplifies one of the shared lines, but leaves the other instance of that line exactly as before). One approach would be to change the geometries so that the entire complex set of polygons has no common lines. How would I do that? Here is a picture of the problem, in characters: As shown on a map -----------------| | County A |------------| | Z County B | | | | -----| |------------- | | County C | | | | ------------| | | | |____________| In this case, County A is a simple polygon with 6 line segments. County B has 4 and County C has 4. The western segment of County B is within the eastern segment of County A The western segment of County C overlaps the eastern segment of County A The "Z" in the A/B boundary represents a feature that simplification would change. Thanks for any help John Moore Tiny Vital Systems LLc, Paradise Valley, AZ, USA |