Simplify() alternative using interior angles?
Hello, I originally posed this question in the Shapely repository. It was suggested to me that I inquire here at GEOS to gauge the interest in this simplify() modification/alternative.
details of the (proposed) Python implementation can be seen here https://github.com/shapely/shapely/issues/1046#issue-765740536
But to briefly summarize: Sometimes simplify will still leave me with a degenerate polygon ( if that is the right term... in other words, a polygon with collinear points between obvious vertices). One solution is to cycle through the Points and eliminate points based on the angles between successive pairs.
Would a C++ implementation of something like this be of interest to GEOS?
Thanks, appreciate any feedback!
Based on this comment on the downstream issue, it's not clear this is an actual problem. Comments?
Based on this comment on the downstream issue, it's not clear this is an actual problem. Comments?
Hi @dr-jts sorry for the late follow up. (but you are probably already aware of what I am going to say here) regarding that original downstream comment you had linked to, I had accidentally provided incorrect test data, so there still is an issue. Myself and another individual (@drStacky) followed up/clarified with proper polygon examples that exhibits the issue originally raised.
I see this issue is now closed but following the most recent comment, would you happen to have any thoughts/opnions on if something like this is best implemented here in GEOS, JTS, or Shapely (if at all)?
Thanks!
would you happen to have any thoughts/opnions on if something like this is best implemented here in GEOS, JTS, or Shapely (if at all)?
Clearly there is some limitation or flaw in the JTS/GEOS DP algorithm, since it's odd that it doesn't remove the obvious nearly-collinear point). Perhaps this can be fixed by some close inspection of the algorithm.
It looks like the JTS SimplifyVW does remove all collinear points. But this hasn't made its way into GEOS or Shapely.
So there's work to be done somewhere. When, where and who does it is the question. I'll try and look at the DP algorithm sometime. A port of the JTS SimplifyVW to GEOS would be welcome. A Python implementation of some acceptable algorithm is a question for the Shapely team.
I think opening up a couple new child tickets to this one (port VW, fix DP for this case) and closing off this would would make sense.