From: Sandro Santilli Date: Thu, 24 Jan 2013 21:15:40 +0000 (+0000) Subject: Properly copy topologies with Z value (#2184) X-Git-Tag: 2.1.0beta2~238 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b100f9e2cc97a152d37eeca09b98bf6f4fdd31af;p=postgis Properly copy topologies with Z value (#2184) git-svn-id: http://svn.osgeo.org/postgis/trunk@11022 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/topology/sql/manage/CopyTopology.sql.in.c b/topology/sql/manage/CopyTopology.sql.in.c index 39733e14b..b1d328a90 100644 --- a/topology/sql/manage/CopyTopology.sql.in.c +++ b/topology/sql/manage/CopyTopology.sql.in.c @@ -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 diff --git a/topology/test/regress/copytopology.sql b/topology/test/regress/copytopology.sql index 41df040c9..414e01993 100644 --- a/topology/test/regress/copytopology.sql +++ b/topology/test/regress/copytopology.sql @@ -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; diff --git a/topology/test/regress/copytopology_expected b/topology/test/regress/copytopology_expected index d8c194c77..95083dbbf 100644 --- a/topology/test/regress/copytopology_expected +++ b/topology/test/regress/copytopology_expected @@ -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