[PostGIS] #5699: ERROR: XX000: SQL/MM Spatial exception - geometry crosses an edge

PostGIS trac at osgeo.org
Thu Mar 21 23:11:25 PDT 2024


#5699: ERROR:  XX000: SQL/MM Spatial exception - geometry crosses an edge
-------------------------------+---------------------------
 Reporter:  Lars Aksel Opsahl  |      Owner:  pramsey
     Type:  defect             |     Status:  new
 Priority:  medium             |  Milestone:  PostGIS 3.4.3
Component:  postgis            |    Version:  3.4.x
 Keywords:                     |
-------------------------------+---------------------------
 When running attached before_error_2.sql it runs ok with no errors

 {{{
 PostgreSQL 12.6 (Ubuntu 12.6-0ubuntu0.20.04.1) on x86_64-pc-linux-gnu,
 compiled by gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, 64-bit

 POSTGIS="3.4.0 0874ea3" [EXTENSION] PGSQL="120" GEOS="3.12.1-CAPI-1.18.1"
 (compiled against GEOS 3.10.2) SFCGAL="1.3.7" PROJ="8.2.0
 NETWORK_ENABLED=OFF URL_ENDPOINT=https://cdn.proj.org
 USER_WRITABLE_DIRECTORY=/tmp/proj DATABASE_PATH=/usr/share/proj/proj.db"
 GDAL="GDAL 3.4.3, released 2022/04/22" LIBXML="2.9.10" LIBJSON="0.13.1"
 LIBPROTOBUF="1.3.3" WAGYU="0.5.0 (Internal)" TOPOLOGY RASTER
 }}}

 But then I run line below and I get the topology error

 {{{
 SELECT
 topology.TopoGeo_addLinestring('tmp_dyrkbarjord_04_t3_a_test_issue_70_87','0102000020A2100000100000000D880F7BEC5930406F570C22A7305140C8AC7234EB5930405F149102A730514053CB13A4DA593040B76B72A1A5305140E8A20595C8593040E64298B4A43051400F88396EBD593040F7AD0040A4305140F45788B1AB5930405377D394A330514064D7228B9B593040E5B2F209A3305140FBEE4BCD895930409618A437A23051400AD56EC465593040D2CC44809F3051402EFFCCC95259304025A49FFC9D30514044D849034459304007A8D89F9C3051409F963BB333593040749B58689B3051406D643F49255930409399D1439A30514065EAA6911D593040CAF1A7BA99305140F63C2ACD16593040D2B1794C99305140558DD4BB19593040835BCB8198305140');
 }}}

 Here is the error message


 {{{

 ERROR:  XX000: SQL/MM Spatial exception - geometry crosses an edge
 (endnodes in faces 34 and 0)
 LOCATION:  pg_error, lwgeom_pg.c:345

 }}}

 I also tested on my local mac and we have the same problem here running
 this setup

 {{{
 PostgreSQL 14.10 (Homebrew) on aarch64-apple-darwin23.0.0, compiled by
 Apple clang version 15.0.0 (clang-1500.0.40.1), 64-bit

 POSTGIS="3.3.4 3.3.4" [EXTENSION] PGSQL="140" GEOS="3.12.1-CAPI-1.18.1"
 PROJ="9.3.1" LIBXML="2.11.5" LIBJSON="0.17" LIBPROTOBUF="1.5.0"
 WAGYU="0.5.0 (Internal)" TOPOLOGY

 }}}

 and on this system same problem


 {{{

 PostgreSQL 15.4 (Ubuntu 15.4-2.pgdg22.04+1) on x86_64-pc-linux-gnu,
 compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, 64-bit

 POSTGIS="3.4.0 0874ea3" [EXTENSION] PGSQL="150" GEOS="3.10.2-CAPI-1.16.0"
 PROJ="8.2.1 NETWORK_ENABLED=OFF URL_ENDPOINT=https://cdn.proj.org
 USER_WRITABLE_DIRECTORY=/tmp/proj DATABASE_PATH=/usr/share/proj/proj.db"
 LIBXML="2.9.13" LIBJSON="0.15" LIBPROTOBUF="1.3.3" WAGYU="0.5.0
 (Internal)" TOPOLOGY

 }}}
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5699>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list