[postgis-tickets] [PostGIS] #2645: ST_LineInterpolatePoint incorrect output for vertical line
PostGIS
trac at osgeo.org
Tue Feb 18 00:07:31 PST 2014
#2645: ST_LineInterpolatePoint incorrect output for vertical line
------------------------------+---------------------------------------------
Reporter: bencaradocdavies | Owner: pramsey
Type: defect | Status: new
Priority: high | Milestone: PostGIS 2.1.2
Component: postgis | Version: 2.1.x
Keywords: |
------------------------------+---------------------------------------------
For a vertical line (a single segment varying only in Z),
ST_LineInterpolatePoint incorrectly outputs the the last point for any
fraction greater than zero:
{{{
$ select st_asewkt(st_lineinterpolatepoint(st_geomfromewkt('LINESTRING(0 0
0, 0 0 1)'), 0.5));
st_asewkt
--------------
POINT(0 0 1)
(1 row)
}}}
The output in this case should be:
{{{
POINT(0 0 0.5)
}}}
Non-vertical lines appear to be interpolated correctly:
{{{
$ select st_asewkt(st_lineinterpolatepoint(st_geomfromewkt('LINESTRING(0 0
0, 1 0 1)'), 0.5));
st_asewkt
------------------
POINT(0.5 0 0.5)
(1 row)
$ select st_asewkt(st_lineinterpolatepoint(st_geomfromewkt('LINESTRING(0 0
0, 0 1 1)'), 0.5));
st_asewkt
------------------
POINT(0 0.5 0.5)
(1 row)
}}}
Seen on CentOS 6.5 x86_64:
{{{
postgresql93.x86_64 9.3.2-1PGDG.rhel6
postgis2_93.x86_64 2.1.1-1.rhel6
}}}
And on Debian sid amd64:
{{{
postgresql-9.3 9.3.2-1 amd64
postgis 2.1.1-5 amd64
}}}
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2645>
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