[postgis-devel] Fixed precision for ST_Intersection, ST_Union, etc.
strk at keybit.net
Tue Mar 15 01:41:49 PDT 2016
On Sun, Mar 13, 2016 at 06:14:44PM -0400, Daniel Baston wrote:
> My rationale here is that it's not the job of ST_Intersection to clean up
> its inputs before computing the intersection, much like the current overlay
> functions don't call ST_MakeValid on their inputs. I think there is a
> place for a ST_ReducePrecision / ST_SnapToGrid that reduces precision and
> cleans up collapsed geometries, etc., but I don't think it's something that
> should be automatically run on the inputs of all overlay functions.
But in this case (specifying a precision model) you're also basically
asking ST_Intersection to change the inputs, and it is known that such
changing might introduce invalidities that would be "fatal" for the overlay
The only case in which you'd want to avoid fixing invalidities is by knowing
in advance that the reduction would be a no-op (as in your case) and thus
willing to avoid the checking cost. Did you evaluate the cost of checking ?
Could that cost be reduced by determining a "no-op" case directly within GEOS ?
More information about the postgis-devel