[postgis-tickets] [PostGIS] #5568: Postgis Topology "mixed face labeling in ring | -267 | [NULL]"

PostGIS trac at osgeo.org
Sun Oct 8 01:33:29 PDT 2023


#5568: Postgis Topology  "mixed face labeling in ring | -267 | [NULL]"
--------------------------------+---------------------------
  Reporter:  Lars Aksel Opsahl  |      Owner:  strk
      Type:  defect             |     Status:  new
  Priority:  medium             |  Milestone:  PostGIS 3.4.1
 Component:  topology           |    Version:  3.4.x
Resolution:                     |   Keywords:
--------------------------------+---------------------------
Description changed by Lars Aksel Opsahl:

Old description:

> When running data through https://gitlab.com/nibioopensource/resolve-
> overlap-and-gap and checked the result by using ValidateTopology, we
> found error "mixed face labeling in ring" error for area that we missed
> data for in the result dataset.
>
> If you run ValidateTopology after running the attached file
> mixed_topo_error.sql no errors are found.
>
> {{{
> SELECT * FROM topology.ValidateTopology('test_topo');
>  error | id1 | id2
> -------+-----+-----
> (0 rows)
>
> }}}
>

> Then we add a new linestring with out any error
>

> {{{
> SELECT topogeo_addlinestring FROM
> topology.TopoGeo_addLinestring('test_topo','0102000020A21000000200000084CBFA5C7A7824405CC705259CEE4D407A6873CA73782440DE38B01D9CEE4D40',0);
>  topogeo_addlinestring
> -----------------------
>                    269
>
> }}}
>

> But if we now run topo validation again we see the error
>
> {{{
>

> SELECT * FROM topology.ValidateTopology('test_topo');
> NOTICE:  00000: Checking for coincident nodes
> LOCATION:  exec_stmt_raise, pl_exec.c:3862
> NOTICE:  00000: Checking for edges crossing nodes
> LOCATION:  exec_stmt_raise, pl_exec.c:3862
> NOTICE:  00000: Checking for invalid or not-simple edges
> LOCATION:  exec_stmt_raise, pl_exec.c:3862
> NOTICE:  00000: Checking for crossing edges
> LOCATION:  exec_stmt_raise, pl_exec.c:3862
> NOTICE:  00000: Checking for edges start_node mismatch
> LOCATION:  exec_stmt_raise, pl_exec.c:3862
> NOTICE:  00000: Checking for edges end_node mismatch
> LOCATION:  exec_stmt_raise, pl_exec.c:3862
> NOTICE:  00000: Checking for faces without edges
> LOCATION:  exec_stmt_raise, pl_exec.c:3862
> NOTICE:  00000: Checking edge linking
> LOCATION:  exec_stmt_raise, pl_exec.c:3862
> NOTICE:  00000: Building edge rings
> LOCATION:  exec_stmt_raise, pl_exec.c:3862
> NOTICE:  00000: Found 115 rings, 108 valid shells, 6 valid holes
> LOCATION:  exec_stmt_raise, pl_exec.c:3862
>             error            | id1  |  id2
> -----------------------------+------+--------
>  mixed face labeling in ring | -267 | [NULL]
> (1 row)
>
> }}}
>

> Here is last server I tested on
>
> {{{
>
> 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.10.1-CAPI-1.16.0"
> 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" LIBXML="2.9.10" LIBJSON="0.13.1"
> LIBPROTOBUF="1.3.3" WAGYU="0.5.0 (Internal)" TOPOLOGY
>
> }}}

New description:

 When running data through https://gitlab.com/nibioopensource/resolve-
 overlap-and-gap and checked the result by using ValidateTopology, we found
 error "mixed face labeling in ring" error for area that we missed data for
 in the result dataset.

 If you run ValidateTopology after running the attached file
 mixed_topo_error.sql no errors are found.

 {{{
 SELECT * FROM topology.ValidateTopology('test_topo');
  error | id1 | id2
 -------+-----+-----
 (0 rows)

 }}}


 Then we add a new linestring with out any error


 {{{
 SELECT topogeo_addlinestring FROM
 topology.TopoGeo_addLinestring('test_topo','0102000020A21000000200000084CBFA5C7A7824405CC705259CEE4D407A6873CA73782440DE38B01D9CEE4D40',0);
  topogeo_addlinestring
 -----------------------
                    269

 }}}


 But if we now run topo validation again we see the error

 {{{


 SELECT * FROM topology.ValidateTopology('test_topo');
 NOTICE:  00000: Checking for coincident nodes
 LOCATION:  exec_stmt_raise, pl_exec.c:3862
 NOTICE:  00000: Checking for edges crossing nodes
 LOCATION:  exec_stmt_raise, pl_exec.c:3862
 NOTICE:  00000: Checking for invalid or not-simple edges
 LOCATION:  exec_stmt_raise, pl_exec.c:3862
 NOTICE:  00000: Checking for crossing edges
 LOCATION:  exec_stmt_raise, pl_exec.c:3862
 NOTICE:  00000: Checking for edges start_node mismatch
 LOCATION:  exec_stmt_raise, pl_exec.c:3862
 NOTICE:  00000: Checking for edges end_node mismatch
 LOCATION:  exec_stmt_raise, pl_exec.c:3862
 NOTICE:  00000: Checking for faces without edges
 LOCATION:  exec_stmt_raise, pl_exec.c:3862
 NOTICE:  00000: Checking edge linking
 LOCATION:  exec_stmt_raise, pl_exec.c:3862
 NOTICE:  00000: Building edge rings
 LOCATION:  exec_stmt_raise, pl_exec.c:3862
 NOTICE:  00000: Found 115 rings, 108 valid shells, 6 valid holes
 LOCATION:  exec_stmt_raise, pl_exec.c:3862
             error            | id1  |  id2
 -----------------------------+------+--------
  mixed face labeling in ring | -267 | [NULL]
 (1 row)

 }}}


 Here is last server I tested on



 {{{
 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.10.1-CAPI-1.16.0"
 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" LIBXML="2.9.10" LIBJSON="0.13.1"
 LIBPROTOBUF="1.3.3" WAGYU="0.5.0 (Internal)" TOPOLOGY

 }}}

--
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5568#comment:1>
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