]> granicus.if.org Git - postgis/commitdiff
Fix AsTopoJSON call in testcase
authorSandro Santilli <strk@keybit.net>
Wed, 20 Mar 2013 10:27:07 +0000 (10:27 +0000)
committerSandro Santilli <strk@keybit.net>
Wed, 20 Mar 2013 10:27:07 +0000 (10:27 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@11186 b70326c6-7e19-0410-871a-916f4a2858ee

topology/test/regress/topojson.sql
topology/test/regress/topojson_expected

index 167d5b209d11d75244992ee8274d4f6f7800837f..4c50596c94a690e2a2e56fd925c47ebc05659d00 100644 (file)
@@ -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;
index 013da3b8a542e6577d720f897462cff637874a8c..2ceb66c3954dfa66e1930ed9783aec1b35605563 100644 (file)
@@ -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