[postgis-tickets] [PostGIS] #3298: ST_3DClosestPoint, ST_3DLongestLine, ST_3DMaxDistance regression between 2.1.8 and 2.2.0rc1
PostGIS
trac at osgeo.org
Sun Oct 4 00:42:41 PDT 2015
#3298: ST_3DClosestPoint, ST_3DLongestLine, ST_3DMaxDistance regression between
2.1.8 and 2.2.0rc1
----------------------+---------------------------
Reporter: robe | Owner: nicklas
Type: defect | Status: closed
Priority: high | Milestone: PostGIS 2.2.0
Component: postgis | Version: trunk
Resolution: fixed | Keywords:
----------------------+---------------------------
Changes (by robe):
* status: new => closed
* resolution: => fixed
Comment:
Only thing left is a failure with tIN And empty geometries that used to
return something in 2.1. Not sure why that ever returned anything anyway
and was only for the useless case of TIN and empty so we can ignore that.
I am also seeing differences in answers between 2.1.8 and 2.2.0 which I am
guessing are intentional. I think we just need to flag in the docs these
functions changed behavior in case of 2D/3D, 2D/2D, 2d/2DM etc
Example:
{{{
SELECT ST_AsText(ST_3DClosestPoint('POINT(-11.1111111 40)'::geometry,
'POINT(-11.1111111 40)'::geometry));
}}}
- 2.1.8 answer
{{{
POINT Z (-11.1111111 40 0)
}}}
-- 2.2.0 answer
{{{
POINT(-11.1111111 40)
}}}
{{{ -- 2d and 3d line
SELECT ST_AsText(ST_3DClosestPoint('LINESTRING(-11.1111111 70,70
-11.1111111)'::geometry, 'LINESTRING Z (-10 40 1,-9 41 1)'::geometry ));
}}}
{{{
-- 2.1.8 answer
POINT Z (4.44444445 54.44444445 0)
}}}
{{{
-- 2.2.0 answer
POINT Z (4.44444445 54.44444445 1)
}}}
Is it okay for me to just throw a changed notice in the docs for all these
functions something the effect
----
Changed 2.2.0: In case of 2 2d geometries the function will return a 2d
geometry instead of 3D with 0 for Z
In case of 2d and 3d - the function will consider the 2D geometry as
having a Z from 0 to infinity
----
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3298#comment:9>
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