[postgis-tickets] [PostGIS] #4599: ST_AddPoint doesn't work with index -1
PostGIS
trac at osgeo.org
Tue Dec 10 02:31:50 PST 2019
#4599: ST_AddPoint doesn't work with index -1
------------------------+---------------------------
Reporter: Algunenano | Owner: Algunenano
Type: defect | Status: assigned
Priority: medium | Milestone: PostGIS 2.5.4
Component: postgis | Version: 2.5.x
Keywords: |
------------------------+---------------------------
As reported in https://lists.osgeo.org/pipermail/postgis-
users/2019-December/043765.html:
{{{
On Mon, Dec 9, 2019 at 8:43 PM Charlton Galvarino wrote:
>
> Hello, PostGIS. I have some legacy functions on my hand that I am
bringing out of the Dark Ages.
>
> Once upon a time, I needed to take advantage of the "position" parameter
to explicitly indicate that I wanted to append to a linestring.
>
> select st_astext(st_addpoint(st_makeline(st_makepoint(0, 0),
st_makepoint(1, 1)), st_makepoint(2,2), -1));
> st_astext
> -------------------------
> LINESTRING(0 0,1 1,2 2)
>
> Apparently that is now the same thing had I left off the -1 completely.
>
> select st_astext(st_addpoint(st_makeline(st_makepoint(0, 0),
st_makepoint(1, 1)), st_makepoint(2,2)));
> st_astext
> -------------------------
> LINESTRING(0 0,1 1,2 2)
>
> However, if I left the -1 in there which still seems to support the
current documentation, https://postgis.net/docs/ST_AddPoint.html, psql
protesteth.
>
> select st_astext(st_addpoint(st_makeline(st_makepoint(0, 0),
st_makepoint(1, 1)), st_makepoint(2,2), -1));
> ERROR: Invalid offset
>
> Perhaps the doc should drop the -1, too?
}}}
The issue was introduced in rf9e9411add7a32e4bdc907967c6664242a257ac4 so
I'd expect 2.5, 3.0 and master to be affected.
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4599>
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