[postgis-tickets] [PostGIS] #3251: Wrong answer from native 3D functions in some situations

PostGIS trac at osgeo.org
Thu Aug 20 12:33:45 PDT 2015


#3251: Wrong answer from native 3D functions in some situations
---------------------+---------------------------
 Reporter:  nicklas  |      Owner:  nicklas
     Type:  defect   |     Status:  new
 Priority:  blocker  |  Milestone:  PostGIS 2.1.9
Component:  postgis  |    Version:  2.1.x
 Keywords:           |
---------------------+---------------------------
 {{{
 select st_astext(st_3dshortestline('linestring(2 2 2, 2 2 4)'::geometry,
 'linestring(0 0 4, 4 4 2)'::geometry))
 }}}

 has a 3D crossing at point(2 2 3) and the answer should be
 {{{
 LINESTRING Z (2 2 3,2 2 3)
 }}}

 But instead it returns

 {{{
 LINESTRING Z (2 2 2,2.22222222222222 2.22222222222222 2.88888888888889)
 }}}

 Interestingly if input is changed to
 {{{
 select st_astext(st_3dshortestline('linestring(2 2 1, 2 2 4)'::geometry,
 'linestring(0 0 4, 4 4 2)'::geometry))
 }}}

 the right answer is returned.

 This probably goes back to PostGIS 2.0

--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/3251>
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