[postgis-devel] ST_LineLocatePoint with empty geom raise error

Rémi Cura remi.cura at gmail.com
Thu Jul 10 04:48:37 PDT 2014


Hey,

I recently discovered a strange behavior :
in the function
ST_LineLocatePoint

if using empty geom,
it gives the error :
"ERROR:  getPoint2d_p: point offset out of range"

the code :
SELECT ST_LineLocatePoint(
        ST_GeomFromtext('LINESTRING EMPTY')
        ,ST_GeomFromtext('point(1 2)')
        )

In my humble opinion it should return NULL when any input is empty.
What do you think?

Cheers,
Rémi-C
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20140710/46ff939d/attachment.html>


More information about the postgis-devel mailing list