]> granicus.if.org Git - postgis/commitdiff
Fix GetTopoGeomElementArray(TopoGeometry) function, and add test
authorSandro Santilli <strk@keybit.net>
Sun, 21 Oct 2012 18:02:54 +0000 (18:02 +0000)
committerSandro Santilli <strk@keybit.net>
Sun, 21 Oct 2012 18:02:54 +0000 (18:02 +0000)
See http://trac.osgeo.org/postgis/ticket/2060

git-svn-id: http://svn.osgeo.org/postgis/trunk@10502 b70326c6-7e19-0410-871a-916f4a2858ee

topology/test/regress/gettopogeomelements.sql
topology/test/regress/gettopogeomelements_expected
topology/topology.sql.in.c

index e03648d9024d049d5d4a2ea4d08471f442e04e88..5d765ba0ce24bee27520727d4b03626148ec975d 100644 (file)
@@ -17,6 +17,11 @@ FROM (
 ) as f
 order by 1, 2;
 
+-- See http://trac.osgeo.org/postgis/ticket/2060
+SELECT 't2060', feature_name, GetTopoGeomElementArray(feature)
+FROM features.land_parcels
+ORDER BY feature_name;
+
 -- clean up
 SELECT topology.DropTopology('city_data');
 DROP SCHEMA features CASCADE;
index 4ec0a68f0cdb4ce70e1672638ae91b1cebf74b70..c5e8822a6d85eb43dc12b09306a28a7422ab1be9 100644 (file)
@@ -40,4 +40,9 @@ COMMIT
 3|2|ARY|{{4,2},{5,2}}
 3|3|ARY|{{25,2}}
 3|4|ARY|{{3,2}}
+t2060|P1|{{3,3},{6,3}}
+t2060|P2|{{4,3},{7,3}}
+t2060|P3|{{5,3},{8,3}}
+t2060|P4|{{2,3}}
+t2060|P5|{{1,3}}
 Topology 'city_data' dropped
index 335fa4386b0439c19ebe456a6a23e4aaebef786f..b8e67ffe2fbb5c41c851a6f738cba9e09e1d6003 100644 (file)
@@ -1067,11 +1067,9 @@ AS
 $$
 DECLARE
   toponame varchar;
-  ret topology.TopoElementArray;
 BEGIN
   toponame = topology.GetTopologyName(tg.topology_id);
-  ret = topology.GetTopoGeomElementArray(toponame,tg.layer_id,tg.id);
-  RETURN ret;
+  RETURN topology.GetTopoGeomElementArray(toponame, tg.layer_id, tg.id);
 END;
 $$
 LANGUAGE 'plpgsql' STABLE STRICT;