From: Sandro Santilli Date: Wed, 20 Mar 2013 10:27:07 +0000 (+0000) Subject: Fix AsTopoJSON call in testcase X-Git-Tag: 2.1.0beta2~162 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=246b3e2589447007acb527b1dc5c38b42686fc7a;p=postgis Fix AsTopoJSON call in testcase git-svn-id: http://svn.osgeo.org/postgis/trunk@11186 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/topology/test/regress/topojson.sql b/topology/test/regress/topojson.sql index 167d5b209..4c50596c9 100644 --- a/topology/test/regress/topojson.sql +++ b/topology/test/regress/topojson.sql @@ -5,19 +5,19 @@ set client_min_messages to WARNING; \i hierarchy.sql --- Lineal non-hierarchical -SELECT feature_name||'-vanilla', topology.AsTopoJSON(feature) +SELECT feature_name||'-vanilla', topology.AsTopoJSON(feature, NULL) FROM features.city_streets WHERE feature_name IN ('R3', 'R4', 'R1', 'R2' ) ORDER BY feature_name; --- Lineal hierarchical -SELECT feature_name||'-vanilla', topology.AsTopoJSON(feature) +SELECT feature_name||'-vanilla', topology.AsTopoJSON(feature, NULL) FROM features.big_streets WHERE feature_name IN ('R4', 'R1R2' ) ORDER BY feature_name; --- Areal non-hierarchical -SELECT feature_name||'-vanilla', topology.AsTopoJSON(feature) +SELECT feature_name||'-vanilla', topology.AsTopoJSON(feature, NULL) FROM features.land_parcels WHERE feature_name IN ('P1', 'P2', 'P3', 'P4', 'P5' ) ORDER BY feature_name; @@ -32,25 +32,25 @@ SELECT feature_name||'-vanilla', topology.AsTopoJSON(feature) CREATE TEMP TABLE edgemap (arc_id serial, edge_id int unique); --- Lineal non-hierarchical -SELECT feature_name||'-vanilla', topology.AsTopoJSON(feature, 'edgemap') +SELECT feature_name||'-edgemap', topology.AsTopoJSON(feature, 'edgemap') FROM features.city_streets WHERE feature_name IN ('R3', 'R4', 'R1', 'R2' ) ORDER BY feature_name; --- Lineal hierarchical -SELECT feature_name||'-vanilla', topology.AsTopoJSON(feature, 'edgemap') +SELECT feature_name||'-edgemap', topology.AsTopoJSON(feature, 'edgemap') FROM features.big_streets WHERE feature_name IN ('R4', 'R1R2' ) ORDER BY feature_name; --- Areal non-hierarchical -SELECT feature_name||'-vanilla', topology.AsTopoJSON(feature, 'edgemap') +SELECT feature_name||'-edgemap', topology.AsTopoJSON(feature, 'edgemap') FROM features.land_parcels WHERE feature_name IN ('P1', 'P2', 'P3', 'P4', 'P5' ) ORDER BY feature_name; --- Areal hierarchical -SELECT feature_name||'-vanilla', topology.AsTopoJSON(feature, 'edgemap') +SELECT feature_name||'-edgemap', topology.AsTopoJSON(feature, 'edgemap') FROM features.big_parcels WHERE feature_name IN ('P1P2', 'P3P4') ORDER BY feature_name; diff --git a/topology/test/regress/topojson_expected b/topology/test/regress/topojson_expected index 013da3b8a..2ceb66c39 100644 --- a/topology/test/regress/topojson_expected +++ b/topology/test/regress/topojson_expected @@ -14,21 +14,29 @@ features.big_parcels.the_geom SRID:0 TYPE:MULTIPOLYGON DIMS:2 5 6 features.big_signs.the_geom SRID:0 TYPE:MULTIPOINT DIMS:2 +R1-vanilla|{ "type": "LineString", "arcs": [9,-11]} +R2-vanilla|{ "type": "LineString", "arcs": [4,-6]} +R3-vanilla|{ "type": "LineString", "arcs": [25]} +R4-vanilla|{ "type": "LineString", "arcs": [3]} +R1R2-vanilla|{ "type": "LineString", "arcs": [9,-11,4,-6]} +R4-vanilla|{ "type": "LineString", "arcs": [3]} +P1-vanilla|{ "type": "Polygon", "arcs": [[-21,-13,22,21,6,-20]]} +P2-vanilla|{ "type": "Polygon", "arcs": [[-19,-14,20,19,7,-18]]} +P3-vanilla|{ "type": "Polygon", "arcs": [[-17,-15,18,17,8,-16]]} +P4-vanilla|{ "type": "Polygon", "arcs": [[-3]]} +P5-vanilla|{ "type": "Polygon", "arcs": [[-2][26]]} ERROR: function topology.astopojson(topogeometry) does not exist at character 34 -ERROR: function topology.astopojson(topogeometry) does not exist at character 34 -ERROR: function topology.astopojson(topogeometry) does not exist at character 34 -ERROR: function topology.astopojson(topogeometry) does not exist at character 34 -R1-vanilla|{ "type": "LineString", "arcs": [0,-2]} -R2-vanilla|{ "type": "LineString", "arcs": [2,-4]} -R3-vanilla|{ "type": "LineString", "arcs": [4]} -R4-vanilla|{ "type": "LineString", "arcs": [5]} -R1R2-vanilla|{ "type": "LineString", "arcs": [0,-2,2,-4]} -R4-vanilla|{ "type": "LineString", "arcs": [5]} -P1-vanilla|{ "type": "Polygon", "arcs": [[-7,-8,8,9,10,-12]]} -P2-vanilla|{ "type": "Polygon", "arcs": [[-13,-14,6,11,14,-16]]} -P3-vanilla|{ "type": "Polygon", "arcs": [[-17,-18,12,15,18,-20]]} -P4-vanilla|{ "type": "Polygon", "arcs": [[-21]]} -P5-vanilla|{ "type": "Polygon", "arcs": [[-22][22]]} -P1P2-vanilla|{ "type": "Polygon", "arcs": [[-8,8,9,10,14,-16,-13,-14]]} -P3P4-vanilla|{ "type": "Polygon", "arcs": [[-17,-18,12,15,18,-20][-21]]} +R1-edgemap|{ "type": "LineString", "arcs": [0,-2]} +R2-edgemap|{ "type": "LineString", "arcs": [2,-4]} +R3-edgemap|{ "type": "LineString", "arcs": [4]} +R4-edgemap|{ "type": "LineString", "arcs": [5]} +R1R2-edgemap|{ "type": "LineString", "arcs": [0,-2,2,-4]} +R4-edgemap|{ "type": "LineString", "arcs": [5]} +P1-edgemap|{ "type": "Polygon", "arcs": [[-7,-8,8,9,10,-12]]} +P2-edgemap|{ "type": "Polygon", "arcs": [[-13,-14,6,11,14,-16]]} +P3-edgemap|{ "type": "Polygon", "arcs": [[-17,-18,12,15,18,-20]]} +P4-edgemap|{ "type": "Polygon", "arcs": [[-21]]} +P5-edgemap|{ "type": "Polygon", "arcs": [[-22][22]]} +P1P2-edgemap|{ "type": "Polygon", "arcs": [[-8,8,9,10,14,-16,-13,-14]]} +P3P4-edgemap|{ "type": "Polygon", "arcs": [[-17,-18,12,15,18,-20][-21]]} Topology 'city_data' dropped