[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgis-devel
Subject:    Re: [postgis-devel] LWGEOM2GEOS and empty
From:       Alexandre Lessard <alexandre.lessard () mapgears ! com>
Date:       2023-02-10 19:28:12
Message-ID: CADymMJCszS_YdB5AZq4yk0iMv6v31pbmT0nq4On4X1Qd0t23gg () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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@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@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@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-devel
>


-- 
Alexandre Lessard
DevOps - Mapgears

[Attachment #5 (text/html)]

<div dir="ltr">Hi Paul,  <br><br>Here&#39;s the ticket for the points:  <a \
href="https://trac.osgeo.org/postgis/ticket/1060" \
target="_blank">https://trac.osgeo.org/postgis/ticket/1060</a><br>And the one for the \
polygons:  <a href="https://trac.osgeo.org/postgis/ticket/712" \
target="_blank">https://trac.osgeo.org/postgis/ticket/712</a><br><br>From the ticket \
#712 there&#39;s a hint, the linestring version doesn&#39;t crash if it&#39;s empty. \
It&#39;s probably why it was never done.<div><br></div><div>Alex.</div></div><br><div \
class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 9 Feb 2023 at 19:47, \
Paul Ramsey &lt;<a href="mailto:pramsey@cleverelephant.ca">pramsey@cleverelephant.ca</a>&gt; \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Sorry, here&#39;s a \
quick link<br> <a href="https://github.com/postgis/postgis/blob/master/liblwgeom/lwgeom_geos.c#L495" \
rel="noreferrer" target="_blank">https://github.com/postgis/postgis/blob/master/liblwgeom/lwgeom_geos.c#L495</a><br>
 <br>
&gt; On Feb 9, 2023, at 4:46 PM, Paul Ramsey &lt;<a \
href="mailto:pramsey@cleverelephant.ca" \
target="_blank">pramsey@cleverelephant.ca</a>&gt; wrote:<br> &gt; <br>
&gt; Really odd, just was reading the code to see where to put an inf test, and \
noticed:<br> &gt; <br>
&gt; 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&#39;t do that!<br> &gt; <br>
&gt; Anyone have any memory as to why we have this snaggletoothed pattern in this \
very old, venerable code?<br> &gt; <br>
&gt; P<br>
<br>
_______________________________________________<br>
postgis-devel mailing list<br>
<a href="mailto:postgis-devel@lists.osgeo.org" \
target="_blank">postgis-devel@lists.osgeo.org</a><br> <a \
href="https://lists.osgeo.org/mailman/listinfo/postgis-devel" rel="noreferrer" \
target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-devel</a><br> \
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" \
class="gmail_signature"><div dir="ltr">Alexandre Lessard<div>DevOps - \
Mapgears</div><div><br></div></div></div>



_______________________________________________
postgis-devel mailing list
postgis-devel@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/postgis-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic