<div dir="ltr"><div>For the record:<br></div>I meant to say that disabling the validity check in sfcgal can dramatically *de*-crease processing time (not increase).<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 25, 2018 at 1:36 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello Tom<br>
<br>
Thanks a lot. That might be the problem. I see that I have libSFCGAL<br>
libraries in my /usr/local path so I have probably built it manually<br>
some time, and probably without validity check. On the server that is<br>
protesting I use the Debian package.<br>
<br>
I will try to build it manually on the server too without validity<br>
check.<br>
<br>
Thanks!<br>
<br>
Nicklas<br>
<br>
 On Wed, 2018-04-25 at 13:26 +0200, Tom van Tilburg wrote:<br>
> Hi Nicklas,<br>
> <br>
> I have the same issue on "POSTGIS=""2.5.0dev r16509"" [EXTENSION]<br>
> PGSQL=""100"" GEOS=""3.6.2-CAPI-1.10.2 4d2925d6"" SFCGAL=""1.3.1""<br>
> PROJ=""Rel. 4.9.3, 15 August 2016"" GDAL=""GDAL 2.2.3, released<br>
> 2017/11/20"" LIBXML=""2.9.4"" LIBJSON=""0.12.1""<br>
> LIBPROTOBUF=""1.2.1"" RASTER (sfcgal procs from ""2.5.0dev r16327""<br>
> need upgrade)"<br>
> <br>
> Likely the error comes from the validity check in sfcgal:<br>
> <a href="https://github.com/Oslandia/SFCGAL/blob/561c301a24a76425716ec321d1c5b" rel="noreferrer" target="_blank">https://github.com/Oslandia/<wbr>SFCGAL/blob/<wbr>561c301a24a76425716ec321d1c5b</a><br>
> 2229b9e1bd2/src/algorithm/<wbr>isValid.cpp#L284<br>
> <br>
> <br>
> I know that during the build-time of sfcgal you can disable the<br>
> validity-check (which can dramatically increase your processing time)<br>
> so maybe you have one version where this option has been disabled at<br>
> build?<br>
> <br>
> Best,<br>
>  Tom<br>
> <br>
> <br>
> On Tue, Apr 24, 2018 at 10:24 PM, Nicklas Avén <nicklas.aven@jordogsk<br>
> <a href="http://og.no" rel="noreferrer" target="_blank">og.no</a>> wrote:<br>
> > Thanks Martin!<br>
> > <br>
> > I realize you of course are right when looking closer on it. It was<br>
> > all those intersections between the holes and boundary that made me<br>
> > think so.<br>
> > But it is actually 3 holes :-)<br>
> > <br>
> > Then I guess that the error message comes from libcgal and probably<br>
> > boost when running st_tesselate.<br>
> > <br>
> > So then my confusion moves to why ST_Tesselate works on 1 computor<br>
> > but not on another with same OS, same versions of PostGIS code.<br>
> > <br>
> > I also don't fully understand the error message:<br>
> > ERROR:  Polygon is invalid : interior is not connected<br>
> > <br>
> > Since it is all integer values I don't understand that there should<br>
> > be any machine dependent differences when judging validity.<br>
> > <br>
> > This is about the packaging of TilelessMap. I have to find a better<br>
> > way of doing the triangulation since, in the end I don't want the<br>
> > triangle coordinates but just their index in the boundary.<br>
> > <br>
> > It is the ugly scripts here that I need to find a way to handle<br>
> > invalid geometries and ugly geometries like this.<br>
> > <a href="https://github.com/TilelessMap/pg_tileless" rel="noreferrer" target="_blank">https://github.com/<wbr>TilelessMap/pg_tileless</a><br>
> > Thanks<br>
> > <br>
> > Nicklas<br>
> > <br>
> > <br>
> > <br>
> > On Tue, 2018-04-24 at 12:39 -0700, Martin Davis wrote:<br>
> > > It's ugly, but it is valid according to SFS rules (which is what<br>
> > > JTS/GEOS/PostGIS implement).<br>
> > > <br>
> > > Why do you think it is not valid?<br>
> > > <br>
> > > On Tue, Apr 24, 2018 at 11:48 AM, Nicklas Avén <nicklas.aven@jord<br>
> > > <a href="http://ogskog.no" rel="noreferrer" target="_blank">ogskog.no</a>> wrote:<br>
> > > > 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<br>
> > > > 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<br>
> > > > reasonable<br>
> > > > answer. But on a third installation on a virtual machine at<br>
> > > > Linode I<br>
> > > > get an error message which I am not sure where it comes from.<br>
> > > > 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<br>
> > > > everything on<br>
> > > > the installs.<br>
> > > > <br>
> > > > <br>
> > > >  POSTGIS="2.5.0dev r16554" [EXTENSION] PGSQL="100"<br>
> > > > GEOS="3.7.0dev-CAPI-<br>
> > > > 1.11.0 r" SFCGAL="1.3.0" PROJ="Rel. 4.9.3, 15 August 2016"<br>
> > > > GDAL="GDAL<br>
> > > > 2.1.2, released 2016/10/24" LIBXML="2.9.4" LIBJSON="0.12.1"<br>
> > > > 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<br>
> > > > 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">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/<wbr>mailman/listinfo/postgis-devel</a><br>
> > > <br>
> > > ______________________________<wbr>_________________<br>
> > > postgis-devel mailing list<br>
> > > <a href="mailto:postgis-devel@lists.osgeo.org">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/<wbr>mailman/listinfo/postgis-devel</a><br>
> > <br>
> > ______________________________<wbr>_________________<br>
> > postgis-devel mailing list<br>
> > <a href="mailto:postgis-devel@lists.osgeo.org">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/<wbr>mailman/listinfo/postgis-devel</a><br>
> <br>
> ______________________________<wbr>_________________<br>
> postgis-devel mailing list<br>
> <a href="mailto:postgis-devel@lists.osgeo.org">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/<wbr>mailman/listinfo/postgis-devel</a><br>
______________________________<wbr>_________________<br>
postgis-devel mailing list<br>
<a href="mailto:postgis-devel@lists.osgeo.org">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/<wbr>mailman/listinfo/postgis-devel</a></blockquote></div><br></div>