[postgis-devel] [PostGIS] #1250: ST_LocateBetweenElevations should return NULL and not fail if intersection is void

PostGIS trac at osgeo.org
Fri Oct 21 03:31:36 PDT 2011


#1250: ST_LocateBetweenElevations should return NULL and not fail if intersection
is void
----------------------------------------+-----------------------------------
 Reporter:  vince                       |       Owner:  pramsey      
     Type:  defect                      |      Status:  new          
 Priority:  medium                      |   Milestone:  PostGIS 2.0.0
Component:  postgis                     |     Version:  trunk        
 Keywords:  ST_LocateBetweenElevations  |  
----------------------------------------+-----------------------------------
 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.
 }}}

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1250>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-devel mailing list