[postgis-tickets] [PostGIS] #4471: Intersection between mixed dimensions

PostGIS trac at osgeo.org
Mon Aug 5 14:52:03 PDT 2019


#4471: Intersection between mixed dimensions
----------------------+---------------------------
 Reporter:  michaudm  |      Owner:  pramsey
     Type:  defect    |     Status:  new
 Priority:  medium    |  Milestone:  PostGIS 2.5.3
Component:  postgis   |    Version:  2.5.x
 Keywords:            |
----------------------+---------------------------
 Intersection between 3D and 2D geometries is generally smart (interpolate
 z on the 3D geometry).
 But in the case where the intersection point matches exactly a vertex of
 one of the geometries, it returns this vertex, either a 2D Point or a 3D
 Point.
 As a result, an intersection layer build from the intersection of a 2D
 layer and a 3D layer may be a mix of 2D and 3D points. But the worst case
 arises if two geometries have multiple intersections, some matching a 2D
 vertex and others a 3D one. Here, the process stops with error :

 {{{
 ERROR:  lwcollection_construct: mixed dimension geometries: 0/2
 }}}

 You can reproduce with the following simple test case :

 {{{
 select ST_Z(ST_Intersection(
         ST_GeomFromText('LINESTRING(0 0, 5 5, 10 10, 20 0)'),
         ST_GeomFromText('LINESTRINGZ(0 10 100, 10 0 100, 15 5 100, 20 10
 100)')
 ))
 }}}

-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4471>
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-tickets mailing list