Opened 8 months ago

Closed 8 months ago

#3711 closed defect (fixed)

The topology issue an error on azimut function when 3D

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

Description

Hi,

working on our rt_topology library we discovered an issue in the topology. Some tests confirm that the issue is in the original postgis topology.

The issue is triggered when the geometries are with z (3d dimension).

This is the sample to confirm the issue:

select topology.DropTopology('topologia3D');
select topology.CreateTopology('topologia3D',6707, 0.000051, true);

select topology.TopoGeo_AddLineString( 'topologia3D', GeomFromEWKT('SRID=6707;LINESTRING(618367.6099999999 4833785.16 0.88,618370 4833784.94 1.93,618370 4833780.209999999 1.92,618364.0799999999 4833780.719999999 1.18)'), 0.000051 );

select topology.TopoGeo_AddLineString( 'topologia3D', GeomFromEWKT('SRID=6707;LINESTRING(618467.1999999999 4833771.82 1.9,618370 4833780.209999999 1.92,618370 4833784.94 1.93,618387.8499999999 4833783.28 1.93)'), 0.000051 );

Regards, Andrea Peri.

Change History (5)

comment:1 Changed 8 months ago by strk

Component: postgistopology
Owner: changed from pramsey to strk

comment:2 Changed 8 months ago by aperi2007

The same issue is in the rt_topology, so I open the same ticket in it:

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

comment:3 Changed 8 months ago by strk

Somewhat reduced testcase:

SELECT topology.DropTopology('bug3711');                                        
SELECT topology.CreateTopology('bug3711', 0, 0, true);                          
SELECT topology.TopoGeo_AddLineString('bug3711',                                
'LINESTRING (                                                                   
618365 4833784 0.88,                                                            
618370 4833784 1.93, 618370 4833780 1.90,                                       
618365 4833784 1.18)'                                                           
::geometry, 0);                                                                 
SELECT topology.TopoGeo_AddLineString( 'bug3711',                               
'LINESTRING (                                                                   
618375 4833780 1.90,                                                            
618370 4833780 1.92, 618370 4833784 1.90,                                       
618375 4833780 1.93)'                                                           
::geometry, 0);  

Confirmed to fail here

comment:4 Changed 8 months ago by strk

In 15330:

Fix azimuth computation for 2.5D edge ends

The change disreguard vertical movemements of the edge and computes
azimuth of the first segment getting away from the node.

Includes automated testcase

See #3711

comment:5 Changed 8 months ago by strk

Resolution: fixed
Status: newclosed

In 15331:

Fix azimuth computation for 2.5D edge ends

The change disreguard vertical movemements of the edge and computes
azimuth of the first segment getting away from the node.

Includes automated testcase

Closes #3711 (in 2.3 branch)

Note: See TracTickets for help on using tickets.