]> granicus.if.org Git - postgis/commitdiff
Fix typo in exception message, change signature of TopoGeo_addPolygon
authorSandro Santilli <strk@keybit.net>
Tue, 3 Jan 2012 20:48:51 +0000 (20:48 +0000)
committerSandro Santilli <strk@keybit.net>
Tue, 3 Jan 2012 20:48:51 +0000 (20:48 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8659 b70326c6-7e19-0410-871a-916f4a2858ee

topology/sql/populate.sql
topology/test/regress/topogeo_addlinestring_expected

index fcba31e116627d16f58ca8facbac27f95218f694..6d0e6c1bab480569595a30b71d686f95b5706a1e 100644 (file)
@@ -723,7 +723,7 @@ BEGIN
 
   -- 0. Check arguments
   IF geometrytype(aline) != 'LINESTRING' THEN
-    RAISE EXCEPTION 'Invalid geometry type (%) passed to TopoGeo_AddPoint, expected LINESTRING', geometrytype(aline);
+    RAISE EXCEPTION 'Invalid geometry type (%) passed to TopoGeo_AddLinestring, expected LINESTRING', geometrytype(aline);
   END IF;
 
   -- 1. Self-node
@@ -808,11 +808,18 @@ LANGUAGE 'plpgsql';
 --
 --  Add a Polygon into a topology 
 --
+-- }{
 CREATE OR REPLACE FUNCTION topology.TopoGeo_AddPolygon(atopology varchar, apoly geometry, tolerance float8 DEFAULT 0)
-       RETURNS void AS
+       RETURNS SETOF int AS
 $$
 DECLARE
 BEGIN
+
+  -- 0. Check arguments
+  IF geometrytype(aline) != 'POLYGON' THEN
+    RAISE EXCEPTION 'Invalid geometry type (%) passed to TopoGeo_AddPolygon, expected POLYGON', geometrytype(aline);
+  END IF;
+
        RAISE EXCEPTION 'TopoGeo_AddPolygon not implemented yet';
 END
 $$
index 99f86997f5ce787244f0623aa0183d914ba5417d..c19b6cf3be6a8cb054239c4f4bee35529dce6a3c 100644 (file)
@@ -6,8 +6,8 @@ t
 COMMIT
 max|node|22
 max|edge|26
-ERROR:  Invalid geometry type (MULTILINESTRING) passed to TopoGeo_AddPoint, expected LINESTRING
-ERROR:  Invalid geometry type (POINT) passed to TopoGeo_AddPoint, expected LINESTRING
+ERROR:  Invalid geometry type (MULTILINESTRING) passed to TopoGeo_AddLinestring, expected LINESTRING
+ERROR:  Invalid geometry type (POINT) passed to TopoGeo_AddLinestring, expected LINESTRING
 iso_uni|27
 N|23||POINT(36 26)
 N|24||POINT(38 30)