Opened 6 years ago
Closed 6 years ago
#4135 closed defect (fixed)
Fix lwgeom_clip_by_rect
Reported by: | dbaston | Owned by: | pramsey |
---|---|---|---|
Priority: | critical | Milestone: | PostGIS 2.5.0 |
Component: | postgis | Version: | master |
Keywords: | Cc: |
Description
The lwgeom_clip_by_rect
function was introduced in 2.4 to:
Clip a geometry by a 2D box in a fast but possibly dirty way. The output geometry is not guaranteed to be valid (self-intersections for a polygon may be introduced). Topologically invalid input geometries do not result in exceptions being thrown.
In trunk, this function has been redefined to delegate to lwgeom_intersection
and is no longer consistent with the description above. This was done because of a reported bug in GEOS, but that bug report cannot be reproduced. If the GEOS bug report is invalid, then lwgeom_clip_by_rect
should be reverted to its 2.4 state.
Delegating clip-by-rect to lwgeom_intersection defeats its purpose, which was speed & tolerance to invalid input/output