Opened 10 years ago

Closed 9 years ago

#1250 closed defect (fixed)

ST_LocateBetweenElevations should return NULL and not fail if intersection is void

Reported by: vince Owned by: pramsey
Priority: medium Milestone: PostGIS 2.0.0
Component: postgis Version: master
Keywords: ST_LocateBetweenElevations Cc:


The ST_LocateBetweenElevations () functions, instead of returning a NULL or empty geometry in case the object tested is not partly or totally included between the two given elevations, returns : "ERROR: The lwline_clip_to_ordinate_range returned null." and fails. It is thus impossible to use the function in a WHERE clause for discarding geometries:

WITH polygons AS (SELECT gid, (ST_Dump (geom)).geom AS geom FROM houses) SELECT gid FROM polygons WHERE NOT ST_IsEmpty (ST_LocateBetweenElevations (ST_ExteriorRing (geom), 70, 80));
ERROR:  The lwline_clip_to_ordinate_range returned null.

Change History (1)

comment:1 Changed 9 years ago by pramsey

Resolution: fixed
Status: newclosed

Fixed in trunk at r8969. 1.5 at r8970

Note: See TracTickets for help on using tickets.