[postgis-devel] Autofix and retry for GEOS overlay ops
Regina Obe
lr at pcorp.us
Sun Feb 4 22:48:00 PST 2018
Sounds good to me. I think most people are annoyed with their whole processing failing when it hits something invalid, rather than getting some not quite right for invalid things.
From: postgis-devel [mailto:postgis-devel-bounces at lists.osgeo.org] On Behalf Of Darafei "Kom?pa" Praliaskouski
Sent: Sunday, February 04, 2018 10:01 AM
To: PostGIS Development Discussion <postgis-devel at lists.osgeo.org>
Subject: [postgis-devel] Autofix and retry for GEOS overlay ops
Hi,
I've been debugging an issue with ST_Subdivide on one of our polygons. It traced down to issue in GEOS, and as a part of fix I had to replace ClipByRect with normal Intersection call. When fixing the tests for old ClipByRect, that specifically tested some invalid geometries it can process, I came up with this logic:
https://github.com/postgis/postgis/pull/202/files#diff-c3dac68eb856b0a0554707e2ffcfbf17R648
which boils down to "try intersecting, if failed, MakeValid the inputs, try intersecting, fail if failed".
This does not make process any slower for anybody now, as current case "we got it done from first attempt" is not prepended by any additional validity check.
Thinking of hours spent catching some invalid geometry generated by a chain of different GEOS operations, I think such change would be beneficial for all overlay operations. In case someone gets not a desired result, they can go back to checking their inputs with ST_IsValid, and performing a deep manual fix, but simple issues like bowties will start simply working.
Thoughts?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20180205/9447a28b/attachment.html>
More information about the postgis-devel
mailing list