<div dir="ltr"><div>Hm, seems like it is still not good in master.<br></div><div><br></div><div>As soon as I add "ST_MakeValid()" in the same SQL query, it goes back to "weird" mode.</div><div><br></div><div>So while this command is fine and consistent<br></div><div><br></div><div>SELECT t_id, ST_AsText(geometrie), ST_IsValidReason(geometrie),</div><div>  FROM arp_npl.erschlssngsplnung_erschliessung_linienobjekt eel <br>  WHERE ST_IsValid(geometrie) = FALSE</div><div><br></div><div>as soon as I do something with ST_MakeValid() in the same command, it goes back to inconsistent mode.<br></div><div><br></div><div>SELECT t_id, ST_AsText(geometrie), ST_AsText(ST_MakeValid(geometrie)), ST_IsValidReason(geometrie), ST_IsValidReason(ST_MakeValid(geometrie))<br>  FROM arp_npl.erschlssngsplnung_erschliessung_linienobjekt eel <br>  WHERE ST_IsValid(geometrie) = FALSE</div><div><br></div><div>If I shut down the database and start it again, the first command seems somehow ok, but then it gets weird again.</div><div><br></div><div>Andreas<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 23 Dec 2020 at 17:26, Andreas Neumann <<a href="mailto:andreas@qgis.org">andreas@qgis.org</a>> 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"><div dir="ltr"><div>Hi strk,</div><div><br></div><div>I just compiled Postgis master and the issue is gone.</div><div><br></div><div>It now works consistently between ST_IsValid() and ST_IsValidReason() and doesn't change over time.</div><div><br></div><div>So if these memory issue fixes you made in master could go back into the production release, it would be great.</div><div><br></div><div>Thanks,</div><div>Andreas<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 23 Dec 2020 at 16:56, Sandro Santilli <<a href="mailto:strk@kbt.io" target="_blank">strk@kbt.io</a>> 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">On Wed, Dec 23, 2020 at 04:51:07PM +0100, Andreas Neumann wrote:<br>
> Hi Strk and Nicolas,<br>
> <br>
> Thanks for your replies.<br>
> <br>
> I'm using GEOS 3.9, PostgreSQL 13.1 and Postgis 3.1 (self-compiled).<br>
> <br>
> The situation is really weird: if I run the same SQL query a second<br>
> time, the contradiction is gone and all geometries are labeled as<br>
> invalid by ST_IsValidReason(). If I run it many times, the results<br>
> change even more, suddenly, the invalid geometries are not even detected<br>
> correctly by ST_IsValid().<br>
> <br>
> @strk: these invalid geometries contain "NaN" coordinates.<br>
> <br>
> I will open an issue and submit the geometries.<br>
<br>
Can you first try to rebuild PostGIS from current master branch ?<br>
I've fixed a memory issue somewhat related to "NaN" coordinates<br>
<br>
--strk;<br>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-users</a><br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr"><div dir="ltr"><div><br>--<br>Andreas Neumann<br></div><a href="http://QGIS.ORG" target="_blank">QGIS.ORG</a> board member (treasurer)<br></div></div>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><br>--<br>Andreas Neumann<br></div><a href="http://QGIS.ORG" target="_blank">QGIS.ORG</a> board member (treasurer)<br></div></div>