1set client_min_messages to WARNING;
2
3\i ../load_topology-4326.sql
4\i ../load_features.sql
5\i ../more_features.sql
6
7SELECT topology.CopyTopology('city_data', 'CITY_data_UP_down') > 0;
8
9SELECT srid,precision FROM topology.topology WHERE name = 'CITY_data_UP_down';
10
11SELECT 'nodes', count(node_id) FROM "CITY_data_UP_down".node;
12SELECT * FROM "CITY_data_UP_down".node EXCEPT
13SELECT * FROM "city_data".node;
14
15SELECT 'edges', count(edge_id) FROM "CITY_data_UP_down".edge_data;
16SELECT * FROM "CITY_data_UP_down".edge EXCEPT
17SELECT * FROM "city_data".edge;
18
19SELECT 'faces', count(face_id) FROM "CITY_data_UP_down".face;
20SELECT * FROM "CITY_data_UP_down".face EXCEPT
21SELECT * FROM "city_data".face;
22
23SELECT 'relations', count(*) FROM "CITY_data_UP_down".relation;
24SELECT * FROM "CITY_data_UP_down".relation EXCEPT
25SELECT * FROM "city_data".relation;
26
27SELECT 'layers', count(l.*) FROM topology.layer l, topology.topology t
28WHERE l.topology_id = t.id and t.name = 'CITY_data_UP_down';
29SELECT l.layer_id, l.feature_type, l.level FROM topology.layer l,
30topology.topology t where l.topology_id = t.id and t.name = 'CITY_data_UP_down'
31EXCEPT
32SELECT l.layer_id, l.feature_type, l.level FROM topology.layer l,
33topology.topology t where l.topology_id = t.id and t.name = 'city_data';
34
35SELECT l.layer_id, l.schema_name, l.table_name, l.feature_column
36FROM topology.layer l, topology.topology t
37WHERE l.topology_id = t.id and t.name = 'CITY_data_UP_down'
38ORDER BY l.layer_id;
39
40-- Check sequences
41SELECT tableoid::regclass AS sequence_name, last_value,  is_called from "CITY_data_UP_down".node_node_id_seq;
42SELECT tableoid::regclass AS sequence_name, last_value,  is_called from "CITY_data_UP_down".edge_data_edge_id_seq;
43SELECT tableoid::regclass AS sequence_name, last_value,  is_called from "CITY_data_UP_down".face_face_id_seq;
44SELECT tableoid::regclass AS sequence_name, last_value,  is_called from "CITY_data_UP_down".layer_id_seq;
45SELECT tableoid::regclass AS sequence_name, last_value,  is_called  from "CITY_data_UP_down".topogeo_s_1;
46SELECT tableoid::regclass AS sequence_name, last_value,  is_called  from "CITY_data_UP_down".topogeo_s_2;
47SELECT tableoid::regclass AS sequence_name, last_value,  is_called  from "CITY_data_UP_down".topogeo_s_3;
48
49SELECT topology.DropTopology('CITY_data_UP_down');
50SELECT topology.DropTopology('city_data');
51DROP SCHEMA features CASCADE;
52
53-- See http://trac.osgeo.org/postgis/ticket/2184
54select '#2184.1', topology.createTopology('t3d', 0, 0, true) > 0;
55select '#2184.2', st_addisonode('t3d', NULL, 'POINT(1 2 3)');
56select '#2184.3', topology.copyTopology('t3d', 't3d-bis') > 0;
57select '#2184.4', length(topology.dropTopology('t3d')) > 0, length(topology.dropTopology('t3d-bis')) > 0;
58