Opened 13 years ago

Closed 13 years ago

#988 closed defect (fixed)

ST_AddEdgeNewFace - ambiguos error message for Empty Geometries

Reported by: aperi2007 Owned by: strk
Priority: medium Milestone: PostGIS 2.0.0
Component: topology Version: master
Keywords: Cc:

Description

Hi, testing the ST_AddEdgeNewFace using an empty geometry. I see it give an ambiguos message.

This is the code I use:

select topology.DropTopology('topo_test2');
select topology.CreateTopology('topo_test2',3003);

select topology.ST_AddIsoNode('topo_test2',0,ST_GeomFromEWKT('SRID=3003;POINT(1 4)'));
select topology.ST_AddIsoNode('topo_test2',0,ST_GeomFromEWKT('SRID=3003;POINT(2 2)'));
select topology.ST_AddIsoNode('topo_test2',0,ST_GeomFromEWKT('SRID=3003;POINT(6 4)'));
select topology.ST_AddIsoNode('topo_test2',0,ST_GeomFromEWKT('SRID=3003;POINT(4 7)'));
select topology.ST_AddIsoNode('topo_test2',0,ST_GeomFromEWKT('SRID=3003;POINT(4 4)'));
select topology.ST_AddIsoNode('topo_test2',0,ST_GeomFromEWKT('SRID=3003;POINT(2 4)'));
select topology.ST_AddIsoNode('topo_test2',0,ST_GeomFromEWKT('SRID=3003;POINT(4 6)'));
select topology.ST_AddIsoNode('topo_test2',0,ST_GeomFromEWKT('SRID=3003;POINT(2 3)'));

select topology.ST_AddIsoEdge('topo_test2',
    topology.GetNodeByPoint('topo_test2', ST_GeomFromEWKT('SRID=3003;POINT(1 4)'), 0),
    topology.GetNodeByPoint('topo_test2', ST_GeomFromEWKT('SRID=3003;POINT(2 2)'), 0),
    ST_GeomFromEWKT('SRID=3003;LINESTRING(1 4, 2 2)')
);
select topology.st_addedgenewfaces( 'topo_test2',
    topology.GetNodeByPoint('topo_test2', ST_GeomFromEWKT('SRID=3003;POINT(2 2)'), 0),
    topology.GetNodeByPoint('topo_test2', ST_GeomFromEWKT('SRID=3003;POINT(6 4)'), 0),
    'LINESTRING EMPTY'::geometry
);

The result error is:

ERROR: Invalid edge (no two distinct nodes exist)

The mex is ambiguos because it seem say that the error is due to two nodes. Instead the case Start-node and end-node coincident is allowed from ISO.

The mex should be something like

ERROR: Invalid edge (no two distinct vertex exist)

Change History (1)

comment:1 by strk, 13 years ago

Resolution: fixed
Status: newclosed

Fixed in r7253

Note: See TracTickets for help on using tickets.