From: Sandro Santilli Date: Tue, 3 Jan 2012 20:48:51 +0000 (+0000) Subject: Fix typo in exception message, change signature of TopoGeo_addPolygon X-Git-Tag: 2.0.0alpha1~216 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fd82b1ce756e882519defc2492959fd8ad7dd9d4;p=postgis Fix typo in exception message, change signature of TopoGeo_addPolygon git-svn-id: http://svn.osgeo.org/postgis/trunk@8659 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/topology/sql/populate.sql b/topology/sql/populate.sql index fcba31e11..6d0e6c1ba 100644 --- a/topology/sql/populate.sql +++ b/topology/sql/populate.sql @@ -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 $$ diff --git a/topology/test/regress/topogeo_addlinestring_expected b/topology/test/regress/topogeo_addlinestring_expected index 99f86997f..c19b6cf3b 100644 --- a/topology/test/regress/topogeo_addlinestring_expected +++ b/topology/test/regress/topogeo_addlinestring_expected @@ -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)