[postgis-devel] [PostGIS] #988: ST_AddEdgeNewFace - ambiguos error message for Empty Geometries

PostGIS trac at osgeo.org
Wed May 25 14:41:05 PDT 2011


#988: ST_AddEdgeNewFace - ambiguos error message for Empty Geometries
-----------------------+----------------------------------------------------
 Reporter:  aperi2007  |       Owner:  strk         
     Type:  defect     |      Status:  new          
 Priority:  medium     |   Milestone:  PostGIS 2.0.0
Component:  topology   |     Version:  trunk        
 Keywords:             |  
-----------------------+----------------------------------------------------
 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)

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/988>
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-devel mailing list