[postgis-tickets] [PostGIS] #3125: ST_LineLocatePoint garden crasher

PostGIS trac at osgeo.org
Sat May 23 20:45:10 PDT 2015


#3125: ST_LineLocatePoint garden crasher
-----------------------+---------------------------
  Reporter:  robe      |      Owner:  pramsey
      Type:  defect    |     Status:  new
  Priority:  critical  |  Milestone:  PostGIS 2.1.8
 Component:  postgis   |    Version:  2.1.x
Resolution:            |   Keywords:
-----------------------+---------------------------
Description changed by robe:

Old description:

> This issue looks like it probably got introduced with PostGIS 2.1.7
> (since that exhibits the issue and so does 2.1 and trunk).
>

> {{{
> SELECT ST_LineLocatePoint(ST_MakeLine('POINT(1 2)'::geometry, 'POINT
> EMPTY'::geometry), ST_Point(-11,40));
> }}}
>

> What is also interesting about this problem, is I can't make a linestring
> from the wkt of it:
>

> {{{ -- gives ERROR:  geometry requires more points
> SELECT 'LINESTRING(1 2)'::geometry;
> }}}
>

> But am able to using ST_MakeLine or the canonical form
>

> {{{
> SELECT ST_MakeLine('POINT(1 2)'::geometry, 'POINT EMPTY'::geometry);
>
> SELECT '010200000001000000000000000000F03F0000000000000040'::geometry;
> }}}
>

> Which I guess is okay since we want people to be able to restore corrupt
> data though not necessarily create such a thing.

New description:

 This issue looks like it probably got introduced with PostGIS 2.1.7 (since
 that exhibits the issue and so does 2.1 and trunk), but my 2.1.5 does not
 (and just throws a

 {{{
 ERROR:  getPoint4d_p: point offset out of range
 ********** Error **********
 }}}

 error


 {{{
 SELECT ST_LineLocatePoint(ST_MakeLine('POINT(1 2)'::geometry, 'POINT
 EMPTY'::geometry), ST_Point(-11,40));
 }}}


 What is also interesting about this problem, is I can't make a linestring
 from the wkt of it:


 {{{
 -- gives ERROR:  geometry requires more points
 SELECT 'LINESTRING(1 2)'::geometry;
 }}}


 But am able to using ST_MakeLine or the canonical form


 {{{
 SELECT ST_MakeLine('POINT(1 2)'::geometry, 'POINT EMPTY'::geometry);

 SELECT '010200000001000000000000000000F03F0000000000000040'::geometry;
 }}}


 Which I guess is okay since we want people to be able to restore corrupt
 data though not necessarily create such a thing.

--

--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/3125#comment:1>
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