[postgis-devel] LWGEOM2GEOS and empty

Alexandre Lessard alexandre.lessard at mapgears.com
Fri Feb 10 11:28:12 PST 2023


Hi Paul,

Here's the ticket for the points: https://trac.osgeo.org/postgis/ticket/1060
And the one for the polygons: https://trac.osgeo.org/postgis/ticket/712

>From the ticket #712 there's a hint, the linestring version doesn't crash
if it's empty. It's probably why it was never done.

Alex.

On Thu, 9 Feb 2023 at 19:47, Paul Ramsey <pramsey at cleverelephant.ca> wrote:

> Sorry, here's a quick link
> https://github.com/postgis/postgis/blob/master/liblwgeom/lwgeom_geos.c#L495
>
> > On Feb 9, 2023, at 4:46 PM, Paul Ramsey <pramsey at cleverelephant.ca>
> wrote:
> >
> > Really odd, just was reading the code to see where to put an inf test,
> and noticed:
> >
> > There a case statement switchung on geomType, and it tests point and
> polygon for empty, and if empty calls the GEOS get empty ____ function
> immediately. But for linestring and collections it doesn't do that!
> >
> > Anyone have any memory as to why we have this snaggletoothed pattern in
> this very old, venerable code?
> >
> > P
>
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-devel
>


-- 
Alexandre Lessard
DevOps - Mapgears
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20230210/36b05695/attachment.htm>


More information about the postgis-devel mailing list