[geos-devel] [GEOS] #959: Reversed result in GEOSClipByRect
GEOS
geos-trac at osgeo.org
Mon Mar 11 15:33:18 PDT 2019
#959: Reversed result in GEOSClipByRect
-------------------------+---------------------------
Reporter: Algunenano | Owner: geos-devel@…
Type: defect | Status: new
Priority: major | Milestone: 3.5.2
Component: Default | Version: 3.5.0
Severity: Significant | Resolution:
Keywords: |
-------------------------+---------------------------
Comment (by Algunenano):
> I think by definition invalid inputs result in invalid outputs
Fair enough, but then ST_AsMvtGeom shouldn't be using it. To be honest,
I'm already on the verge of removing the geos path and leave wagyu as the
only option for clipping and validation for MVT polygons.
> Given that this geometry is only slightly invalid (a single collapsed
line segment), and given the relatively simplicity of clipping to a
rectangle, it seems like it might be technically feasible to make clipping
more tolerant of some invalid inputs. This might require an entirely new
algorithm, though.
What surprised me the most is that it gives this invalid input although
the invalid spike is outside the clipping rectangle (which is the only
ring). I haven't checked the algorithm that Geos uses yet.
As a reference, here is the current quick clip mechanism in wagyu:
https://github.com/postgis/postgis/blob/svn-
trunk/deps/wagyu/include/mapbox/geometry/wagyu/quick_clip.hpp#L67
--
Ticket URL: <https://trac.osgeo.org/geos/ticket/959#comment:4>
GEOS <http://trac.osgeo.org/geos>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).
More information about the geos-devel
mailing list