]> granicus.if.org Git - postgis/commitdiff
Properly copy topologies with Z value (#2184)
authorSandro Santilli <strk@keybit.net>
Thu, 24 Jan 2013 21:15:40 +0000 (21:15 +0000)
committerSandro Santilli <strk@keybit.net>
Thu, 24 Jan 2013 21:15:40 +0000 (21:15 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@11022 b70326c6-7e19-0410-871a-916f4a2858ee

topology/sql/manage/CopyTopology.sql.in.c
topology/test/regress/copytopology.sql
topology/test/regress/copytopology_expected

index 39733e14b34a6336135d76bf24237049c52ad630..b1d328a90e2b772a69b45a9d8942615f1d4f106b 100644 (file)
@@ -34,7 +34,7 @@ BEGIN
   oldtopo_id = rec.id;
   -- TODO: more gracefully handle unexistent topology
 
-  SELECT topology.CreateTopology(newtopo, rec.SRID, rec.precision)
+  SELECT topology.CreateTopology(newtopo, rec.SRID, rec.precision, rec.hasZ)
   INTO strict newtopo_id;
 
   -- Copy faces
index 41df040c960ecf791147beed71ed4403222dc158..414e01993b819b7918383197ee11e7235f6bea42 100644 (file)
@@ -50,4 +50,11 @@ SELECT * from "CITY_data_UP_down".topogeo_s_3;
 SELECT topology.DropTopology('CITY_data_UP_down');
 SELECT topology.DropTopology('city_data');
 DROP SCHEMA features CASCADE;
+
+-- See http://trac.osgeo.org/postgis/ticket/2184
+select '#2184.1', topology.createTopology('t3d', 0, 0, true) > 0;
+select '#2184.2', st_addisonode('t3d', NULL, 'POINT(1 2 3)');
+select '#2184.3', topology.copyTopology('t3d', 't3d-bis') > 0;
+select '#2184.4', length(topology.dropTopology('t3d')) > 0, length(topology.dropTopology('t3d-bis')) > 0;
+
 DELETE FROM spatial_ref_sys where srid = 4326;
index d8c194c7737daaef197f0b48ad1f2cf05ab5a5c5..95083dbbf87276643bd6f18a92b9fbbd9daee753 100644 (file)
@@ -28,3 +28,7 @@ topogeo_s_2|8|1|1|9223372036854775807|1|1|0|f|t
 topogeo_s_3|8|1|1|9223372036854775807|1|1|0|f|t
 Topology 'CITY_data_UP_down' dropped
 Topology 'city_data' dropped
+#2184.1|t
+#2184.2|1
+#2184.3|t
+#2184.4|t|t