<div dir="ltr"><div>Hi Nicklas,<br><br></div>I have the same issue on "POSTGIS=""2.5.0dev r16509"" [EXTENSION] PGSQL=""100"" GEOS=""3.6.2-CAPI-1.10.2 4d2925d6"" SFCGAL=""1.3.1"" PROJ=""Rel. 4.9.3, 15 August 2016"" GDAL=""GDAL 2.2.3, released 2017/11/20"" LIBXML=""2.9.4"" LIBJSON=""0.12.1"" LIBPROTOBUF=""1.2.1"" RASTER (sfcgal procs from ""2.5.0dev r16327"" need upgrade)"<br><br><div><div>Likely the error comes from the validity check in sfcgal:<br>
<pre style="width:1px;height:1px"><a href="https://github.com/Oslandia/SFCGAL/blob/561c301a24a76425716ec321d1c5b2229b9e1bd2/src/algorithm/isValid.cpp#L284" target="_blank">https://github.com/Oslandia/<wbr>SFCGAL/blob/<wbr>561c301a24a76425716ec321d1c5b2<wbr>229b9e1bd2/src/algorithm/<wbr>isValid.cpp#L284</a></pre>

<br><br></div><div>I know that during the build-time of sfcgal you can disable the validity-check (which can dramatically increase your processing time) so maybe you have one version where this option has been disabled at build?<br><br></div><div>Best,<br></div><div> Tom<br></div><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 24, 2018 at 10:24 PM, Nicklas Avén <span dir="ltr"><<a href="mailto:nicklas.aven@jordogskog.no" target="_blank">nicklas.aven@jordogskog.no</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div>Thanks Martin!</div><div><br></div><div>I realize you of course are right when looking closer on it. It was all those intersections between the holes and boundary that made me think so.</div><div>But it is actually 3 holes :-)</div><div><br></div><div>Then I guess that the error message comes from libcgal and probably boost when running st_tesselate.</div><div><br></div><div>So then my confusion moves to why ST_Tesselate works on 1 computor but not on another with same OS, same versions of PostGIS code.</div><div><br></div><div>I also don't fully understand the error message:</div><div>ERROR:  Polygon is invalid : interior is not connected</div><div><br></div><div>Since it is all integer values I don't understand that there should be any machine dependent differences when judging validity.</div><div><br></div><div>This is about the packaging of TilelessMap. I have to find a better way of doing the triangulation since, in the end I don't want the triangle coordinates but just their index in the boundary.</div><div><br></div><div>It is the ugly scripts here that I need to find a way to handle invalid geometries and ugly geometries like this.</div><div><a href="https://github.com/TilelessMap/pg_tileless" target="_blank">https://github.com/TilelessMap<wbr>/pg_tileless</a></div><div>Thanks</div><div><br></div><div>Nicklas</div><div><br></div><div><br></div><div><br></div><div>On Tue, 2018-04-24 at 12:39 -0700, Martin Davis wrote:</div><blockquote type="cite"><div dir="ltr">It's ugly, but it is valid according to SFS rules (which is what JTS/GEOS/PostGIS implement).<div><br></div><div>Why do you think it is not valid?</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 24, 2018 at 11:48 AM, Nicklas Avén <span dir="ltr"><<a href="mailto:nicklas.aven@jordogskog.no" target="_blank">nicklas.aven@jordogskog.no</a>></span> wrote:<br><blockquote type="cite">Hello<br>
<br>
I have an ugly polygon, presented as wkt here below.<br>
<br>
It is really ugly, and from what I understand it has selfintersection<br>
and other things taht I expected ST_Isvalid to react on.<br>
<br>
But ST_Isvalid let's it through.<br>
<br>
And on 2 of my PostGIS installations ST_Tesselate gives a reasonable<br>
answer. But on a third installation on a virtual machine at Linode I<br>
get an error message which I am not sure where it comes from. It says:<br>
ERROR:  Polygon is invalid : interior is not connected <br>
<br>
Does that come from boost?<br>
<br>
So this is 2 questions:<br>
<br>
1) Why doesn't ST_Isvalid tell me it is invalid<br>
2) Where should I search for the different results?<br>
<br>
As far as I can find I have the exactly same versions on everything on<br>
the installs.<br>
<br>
<br>
 POSTGIS="2.5.0dev r16554" [EXTENSION] PGSQL="100" GEOS="3.7.0dev-CAPI-<br>
1.11.0 r" SFCGAL="1.3.0" PROJ="Rel. 4.9.3, 15 August 2016" GDAL="GDAL<br>
2.1.2, released 2016/10/24" LIBXML="2.9.4" LIBJSON="0.12.1" RASTER<br>
(1 row)<br>
<br>
and boost version seems to be the same<br>
Package: libboost-system1.62.0<br>
<br>
Could someone else with sfcgal enabled see what result they get?<br>
<br>
select st_tesselate(<br>
'POLYGON((389923 6365025,390094 6364730,390269 6364430,390261<br>
6364415,390250 6364399,390239 6364372,390207 6364367,390168<br>
6364372,390136 6364377,390100 6364393,390081 6364429,390070<br>
6364458,390059 6364474,390059 6364494,390044 6364497,390019<br>
6364506,390012 6364512,389985 6364533,389973 6364545,389951<br>
6364567,389931 6364588,389927 6364598,389912 6364628,389907<br>
6364636,389883 6364647,389870 6364649,389863 6364638,389858<br>
6364613,389851 6364591,389817 6364575,389795 6364594,389792<br>
6364625,389791 6364653,389796 6364679,389802 6364695,389811<br>
6364722,389840 6364741,389868 6364741,389882 6364721,389900<br>
6364705,389915 6364699,389915 6364717,389909 6364737,389891<br>
6364770,389885 6364781,389867 6364798,389845 6364810,389823<br>
6364809,389801 6364815,389778 6364822,389761 6364822,389742<br>
6364840,389732 6364863,389741 6364890,389741 6364919,389744<br>
6364920,389760 6364932,389768 6364940,389774 6364954,389776<br>
6364963,389787 6364970,389816 6364981,389852 6364993,389895<br>
6365011,389923 6365025),(390094 6364730,389987 6364914,389981<br>
6364904,389971 6364887,389947 6364869,389921 6364853,389895<br>
6364832,389892 6364816,389906 6364812,389941 6364818,389973<br>
6364827,390021 6364852,390094 6364730),(390094 6364730,390050<br>
6364714,390050 6364713,390094 6364730),(390050 6364714,390034<br>
6364736,390014 6364733,389982 6364724,389954 6364721,389953<br>
6364710,389958 6364695,389964 6364677,389972 6364672,389988<br>
6364673,390015 6364678,390041 6364695,390049 6364713,390047<br>
6364713,390050 6364714))'::geometry);<br>
<br>
<br>
Thanks<br>
<br>
Nicklas<br>
<br>
______________________________<wbr>_________________<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/mailma<wbr>n/listinfo/postgis-devel</a><br></blockquote></div><br></div>
<pre>______________________________<wbr>_________________
postgis-devel mailing list
<a href="mailto:postgis-devel@lists.osgeo.org" target="_blank">postgis-devel@lists.osgeo.org</a>
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-devel" target="_blank">https://lists.osgeo.org/mailma<wbr>n/listinfo/postgis-devel</a></pre></blockquote></div><br>______________________________<wbr>_________________<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/mailma<wbr>n/listinfo/postgis-devel</a><br></blockquote></div><br></div></div></div></div>