[postgis-devel] different result ST_Tesselate from invalid polygon that ST_IsValid says is valid

Martin Davis mtnclimb at gmail.com
Tue Apr 24 12:39:10 PDT 2018


It's ugly, but it is valid according to SFS rules (which is what
JTS/GEOS/PostGIS implement).

Why do you think it is not valid?

On Tue, Apr 24, 2018 at 11:48 AM, Nicklas Avén <nicklas.aven at jordogskog.no>
wrote:

> Hello
>
> I have an ugly polygon, presented as wkt here below.
>
> It is really ugly, and from what I understand it has selfintersection
> and other things taht I expected ST_Isvalid to react on.
>
> But ST_Isvalid let's it through.
>
> And on 2 of my PostGIS installations ST_Tesselate gives a reasonable
> answer. But on a third installation on a virtual machine at Linode I
> get an error message which I am not sure where it comes from. It says:
> ERROR:  Polygon is invalid : interior is not connected
>
> Does that come from boost?
>
> So this is 2 questions:
>
> 1) Why doesn't ST_Isvalid tell me it is invalid
> 2) Where should I search for the different results?
>
> As far as I can find I have the exactly same versions on everything on
> the installs.
>
>
>  POSTGIS="2.5.0dev r16554" [EXTENSION] PGSQL="100" GEOS="3.7.0dev-CAPI-
> 1.11.0 r" SFCGAL="1.3.0" PROJ="Rel. 4.9.3, 15 August 2016" GDAL="GDAL
> 2.1.2, released 2016/10/24" LIBXML="2.9.4" LIBJSON="0.12.1" RASTER
> (1 row)
>
> and boost version seems to be the same
> Package: libboost-system1.62.0
>
> Could someone else with sfcgal enabled see what result they get?
>
> select st_tesselate(
> 'POLYGON((389923 6365025,390094 6364730,390269 6364430,390261
> 6364415,390250 6364399,390239 6364372,390207 6364367,390168
> 6364372,390136 6364377,390100 6364393,390081 6364429,390070
> 6364458,390059 6364474,390059 6364494,390044 6364497,390019
> 6364506,390012 6364512,389985 6364533,389973 6364545,389951
> 6364567,389931 6364588,389927 6364598,389912 6364628,389907
> 6364636,389883 6364647,389870 6364649,389863 6364638,389858
> 6364613,389851 6364591,389817 6364575,389795 6364594,389792
> 6364625,389791 6364653,389796 6364679,389802 6364695,389811
> 6364722,389840 6364741,389868 6364741,389882 6364721,389900
> 6364705,389915 6364699,389915 6364717,389909 6364737,389891
> 6364770,389885 6364781,389867 6364798,389845 6364810,389823
> 6364809,389801 6364815,389778 6364822,389761 6364822,389742
> 6364840,389732 6364863,389741 6364890,389741 6364919,389744
> 6364920,389760 6364932,389768 6364940,389774 6364954,389776
> 6364963,389787 6364970,389816 6364981,389852 6364993,389895
> 6365011,389923 6365025),(390094 6364730,389987 6364914,389981
> 6364904,389971 6364887,389947 6364869,389921 6364853,389895
> 6364832,389892 6364816,389906 6364812,389941 6364818,389973
> 6364827,390021 6364852,390094 6364730),(390094 6364730,390050
> 6364714,390050 6364713,390094 6364730),(390050 6364714,390034
> 6364736,390014 6364733,389982 6364724,389954 6364721,389953
> 6364710,389958 6364695,389964 6364677,389972 6364672,389988
> 6364673,390015 6364678,390041 6364695,390049 6364713,390047
> 6364713,390050 6364714))'::geometry);
>
>
> Thanks
>
> Nicklas
>
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20180424/9531f76c/attachment.html>


More information about the postgis-devel mailing list