Bugs item #3607970, was opened at 2013-03-13 21:12
Message generated for change (Comment added) made by jratike80
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=679906&aid=3607970&group_id=118054

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: General / Other
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Sean (bigrodent)
Assigned to: Nobody/Anonymous (nobody)
Summary: Generalization will remove full polygons for high tolerance

Initial Comment:
Take for instance a US Zip and set it to .01 or even  as low as .0001 and you 
will end up with less polygons than the original file.  You will actually 
remove full zip codes.  As you turn the tolerance down they gradually appear 
back.   Upon physical inspection of the shapefile it is clear that it is the 
smallest zips in the file that get stripped first.   Other opensource tools 
have this issue as well.  

----------------------------------------------------------------------

>Comment By: Jukka Rahkonen (jratike80)
Date: 2013-03-14 05:46

Message:
Both Spatialite functions created 84031 polygons. Of those 3663 were
invalid when Simplify was used, and 24 when SimplifyPreserveTopology was
used. However, for the latter also the original features had topology
errors and SimplifyPreserveTopology seems to be reliable.

----------------------------------------------------------------------

Comment By: michael michaud (michaudm)
Date: 2013-03-14 05:30

Message:
Thanks for the tests Jukka,

Simplify : did you check that you had 84031 polygons in the result.
SimplifyPreserveTopology : I know there are cases where a small hole
finishes out of the exterior ring after simplification. If you have
stranger cases, it maybe worth pointing them to Martin.
Simplyfy Polygon Coverage : the flaw I identified is about polygons which
have only two edges in the graph, and the simplification of both edges give
the same result. The polygon disappears.

Agree to add a warning for simplify plugin. It i more difficult with
Analysis>Geometry functions


----------------------------------------------------------------------

Comment By: Jukka Rahkonen (jratike80)
Date: 2013-03-14 02:31

Message:
I made some tests. I had originally 84031 polygons and 28 of them has
self-intersections. Simplify Polygon Coverage gave only 82970 simplified
polygons in 35 minutes. There were no topology errors in those.
Spatialite (or geos and thus fundamentally JTS) found the same 28 invalid
polygons from source data. Function Simplify converted all the 84031
polygons in 15 seconds and in the resultset there were 3663 invalid
polygons. Function SimplifyPreserveTopology took 95 seconds and result
contained 24 invalid polygons.

People tend to believe that SimplifyPreserveTopology preserves layer
topology. However, it preserves topology only feature by feature and the
resulting layer may have gaps and overlaps. If OJ will use this JTS
function some day I would suggest showing a comment about layer topology
for the users.

----------------------------------------------------------------------

Comment By: michael michaud (michaudm)
Date: 2013-03-14 00:51

Message:
Jukka is right about the difference between DouglasPeuckerSimplifier and
TopologyPreservingSimplifier.
However, I don't remember I have seen geometries disappearing with
DouglasPeuckerSimplifier.
On the other hand, I just check our Simplify Polygon Coverage plugin and
found a flaw which could explain that small polygons disappear (just added
some comments in the code of SimplifyPolygonCoveragePlugIn). I've no patch
yet and I'll try to find a solution with the help of Stefan.


----------------------------------------------------------------------

Comment By: Jukka Rahkonen (jratike80)
Date: 2013-03-13 22:27

Message:
I can confirm that this happens with Simplify Polygon Coverage and OJ
snapshot r3322.
Douglas Peucler simplification is not guaranteed to preserve the number of
polygons
http://tsusiatsoftware.net/jts/javadoc/com/vividsolutions/jts/simplify/DouglasPeuckerSimplifier.html
There are another algorithms which keep all the polygons like 
http://tsusiatsoftware.net/jts/javadoc/com/vividsolutions/jts/simplify/TopologyPreservingSimplifier.html
I am not sure if our Simplify Polygon Coverage is supposed to preserve the
topology or not and if this is a bug or a missing feature.

I used Spatialite and SimplifyPreserveTopology function for my data with
good result.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=679906&aid=3607970&group_id=118054

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to