[postgis-devel] ST_LineLocatePoint with empty geom raise error

Rémi Cura remi.cura at gmail.com
Thu Jul 10 08:54:34 PDT 2014


Honestly I don't care that much
,already wrote protections aggainst it.

It's just that the answer to the question what is the curvabs of a point on
this non exisiting line should be it doesn't exist,
not error, I don't know how to compute this.

Anyway a good error message would help anyway ;-)
Cheers,
Rémi-C


2014-07-10 17:17 GMT+02:00 Paul Ramsey <pramsey at cleverelephant.ca>:

> One can get a little null-happy sometimes. You sure? Maybe just a less
> dumbass error?
>
> --
> Paul Ramsey
> http://cleverelephant.ca
> http://postgis.net
>
> On July 10, 2014 at 4:48:47 AM, Rémi Cura (remi.cura at gmail.com) wrote:
>
>
> 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
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20140710/c21faed8/attachment.html>


More information about the postgis-devel mailing list