Opened 7 years ago

Last modified 5 years ago

#3787 new defect

Wrong results when using 3D in topology

Reported by: aperi2007 Owned by: strk
Priority: medium Milestone: PostGIS Fund Me
Component: topology Version: 2.3.x
Keywords: Cc:

Description

Hi, working with us rt_topology suite we discovered an issue on the topology. Other test show that the issue is alsoin postgis .

I try the test on postgis 2.3.2.

On postgis 2.3.2:

I try this little sql:

select topology.droptopology('topo_test'); select topology.createtopology('topo_test', 6707, 0.0145,true); select topology.TopoGeo_AddLineString( 'topo_test' , GeomFromEWKT( 'SRID=6707;LineString(0 0 0, 100 0 0)'), 0.0145 ); select topology.TopoGeo_AddLineString( 'topo_test' , GeomFromEWKT( 'SRID=6707;LineString(50 -50 0.001, 50 50 0.001)') , 0.0145 );

The result retrieved using

select ST_Astext(geom) from topo_test.edge_data;

Is

LINESTRING Z(0 0 0, 50 0 0) LINESTRING Z(50 0 0, 100 0 0) LINESTRING Z(50 -50 0.001, 50 0 0.0005) LINESTRING Z(50 0 0.0005, 50 50 0.001)

Istead if I try the same noding using the usual ST_NOde function: The result I have is this other:

ST_AsText(

ST_Node(

ST_Collect(

GeomFromEWKT( 'SRID=6707;MultiLineString((0 0 0, 100 0 0))'), GeomFromEWKT( 'SRID=6707;MultiLineString((50 -50 0.001, 50 50 0.001))')

)

)

)

(0 0 0, 50 0 0.0005), (50 -50 0.001, 50 0 0.0005), (50 0 0.0005, 100 0 0), (50 0 0.0005, 50 50 0.001)

I open a ticket also in the rt_topology issue system:

https://git.osgeo.org/gogs/rttopo/librttopo/issues/26

Change History (8)

comment:1 by pramsey, 7 years ago

Milestone: PostGIS 2.4.1
Owner: changed from pramsey to strk

comment:2 by pramsey, 7 years ago

Milestone: PostGIS 2.4.1PostGIS 2.4.2

comment:3 by pramsey, 6 years ago

Milestone: PostGIS 2.4.2PostGIS 2.4.3

comment:4 by robe, 6 years ago

Component: postgistopology
Milestone: PostGIS 2.4.3PostGIS 2.4.4

comment:5 by robe, 6 years ago

Milestone: PostGIS 2.4.4PostGIS 2.5.0

comment:6 by robe, 6 years ago

Milestone: PostGIS 2.5.0PostGIS 2.4.5

comment:7 by pramsey, 6 years ago

Milestone: PostGIS 2.4.5PostGIS 2.4.6

comment:8 by komzpa, 5 years ago

Milestone: PostGIS 2.4.6PostGIS Fund Me

Results changed in 3.0alpha4. I believe there is no definition on what noding process should do for two non-3D-intersecting 2D-intersecting geometries. How should it be and why?

Proper 3D topology should even not node these as they don't intesect in 3D. That would be a bigger rewrite that needs more definitions.

14:19:56 [kom] > select postgis_full_version();
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                                                                                                               postgis_full_version                                                                                                                                │
├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ POSTGIS="3.0.0alpha2 r17458" [EXTENSION] PGSQL="110" GEOS="3.7.2-CAPI-1.11.2 b55d2125" SFCGAL="1.3.7" PROJ="Rel. 5.2.0, September 15th, 2018" GDAL="GDAL 2.4.2, released 2019/06/28" LIBXML="2.9.4" LIBJSON="0.12.1" LIBPROTOBUF="1.3.1" WAGYU="0.4.3 (Internal)" TOPOLOGY RASTER │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
(1 row)

Time: 497,155 ms
14:20:25 [kom] > select ST_Astext(geom) from topo_test.edge_data;
┌─────────────────────────────────────────┐
│                st_astext                │
├─────────────────────────────────────────┤
│ LINESTRING Z (50 -50 0.001,50 0 0.0005) │
│ LINESTRING Z (50 0 0,100 0 0)           │
│ LINESTRING Z (50 0 0.0005,50 50 0.001)  │
│ LINESTRING Z (0 0 0,50 0 0)             │
└─────────────────────────────────────────┘
(4 rows)

Time: 0,257 ms
Note: See TracTickets for help on using tickets.