Skip to content

Commit

Permalink
adapt regression tests to new libosmium geometry creation
Browse files Browse the repository at this point in the history
Changes are mainly due to broken polygons not being added anywhere
and a more eager line merging algorithm for routes.
  • Loading branch information
lonvia committed Feb 12, 2017
1 parent d491146 commit 0333e11
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions tests/regression-test.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,27 @@
#****************************************************************
sql_test_statements=[
( 0, 'Basic point count', 'SELECT count(*) FROM planet_osm_point;', 1342 ),
( 1, 'Basic line count', 'SELECT count(*) FROM planet_osm_line;', 3300 ),
( 1, 'Basic line count', 'SELECT count(*) FROM planet_osm_line;', 3231 ),
( 2, 'Basic road count', 'SELECT count(*) FROM planet_osm_roads;', 375 ),
( 3, 'Basic polygon count', 'SELECT count(*) FROM planet_osm_polygon;', 4128 ),
( 4, 'Basic latlon line count', 'SELECT count(*) FROM planet_osm_line;', 3298 ),
( 3, 'Basic polygon count', 'SELECT count(*) FROM planet_osm_polygon;', 4127 ),
( 4, 'Basic latlon line count', 'SELECT count(*) FROM planet_osm_line;', 3229 ),
( 5, 'Basic latlon road count', 'SELECT count(*) FROM planet_osm_roads;', 374 ),
( 6, 'Basic post-diff point count', 'SELECT count(*) FROM planet_osm_point;', 1457 ),
( 7, 'Basic post-diff line count', 'SELECT count(*) FROM planet_osm_line;', 3344 ),
( 8, 'Basic post-diff road count', 'SELECT count(*) FROM planet_osm_roads;', 381 ),
( 9, 'Basic post-diff polygon count', 'SELECT count(*) FROM planet_osm_polygon;', 4275 ),
( 7, 'Basic post-diff line count', 'SELECT count(*) FROM planet_osm_line;', 3274 ),
( 8, 'Basic post-diff road count', 'SELECT count(*) FROM planet_osm_roads;', 380 ),
( 9, 'Basic post-diff polygon count', 'SELECT count(*) FROM planet_osm_polygon;', 4274 ),
( 10, 'Absence of nodes table', 'SELECT count(*) FROM pg_tables WHERE tablename = \'planet_osm_nodes\'', 0),
( 11, 'Absence of way table', 'SELECT count(*) FROM pg_tables WHERE tablename = \'planet_osm_ways\'', 0),
( 12, 'Absence of rel line', 'SELECT count(*) FROM pg_tables WHERE tablename = \'planet_osm_rels\'', 0),
( 13, 'Basic polygon area', 'SELECT round(sum(cast(ST_Area(way) as numeric)),0) FROM planet_osm_polygon;', 1223800703),
( 14, 'Gazetteer place count', 'SELECT count(*) FROM place', 2837),
( 13, 'Basic polygon area', 'SELECT round(sum(cast(ST_Area(way) as numeric)),0) FROM planet_osm_polygon;', 1210958566),
( 14, 'Gazetteer place count', 'SELECT count(*) FROM place', 2836),
( 15, 'Gazetteer place node count', 'SELECT count(*) FROM place WHERE osm_type = \'N\'', 759),
( 16, 'Gazetteer place way count', 'SELECT count(*) FROM place WHERE osm_type = \'W\'', 2059),
( 17, 'Gazetteer place rel count', 'SELECT count(*) FROM place WHERE osm_type = \'R\'', 19),
( 18, 'Gazetteer post-diff place count', 'SELECT count(*) FROM place', 2878),
( 17, 'Gazetteer place rel count', 'SELECT count(*) FROM place WHERE osm_type = \'R\'', 18),
( 18, 'Gazetteer post-diff place count', 'SELECT count(*) FROM place', 2877),
( 19, 'Gazetteer post-diff place node count', 'SELECT count(*) FROM place WHERE osm_type = \'N\'', 764),
( 20, 'Gazetteer post-diff place way count', 'SELECT count(*) FROM place WHERE osm_type = \'W\'', 2095),
( 21, 'Gazetteer post-diff place rel count', 'SELECT count(*) FROM place WHERE osm_type = \'R\'', 19),
( 21, 'Gazetteer post-diff place rel count', 'SELECT count(*) FROM place WHERE osm_type = \'R\'', 18),
( 22, 'Gazetteer housenumber count', 'SELECT count(*) FROM place WHERE housenumber is not null', 199),
( 23, 'Gazetteer post-diff housenumber count count', 'SELECT count(*) FROM place WHERE housenumber is not null', 199),
( 24, 'Gazetteer isin count', 'SELECT count(*) FROM place WHERE isin is not null', 239),
Expand Down Expand Up @@ -95,19 +95,19 @@
( 50, 'Multipolygon nested outer ways. Both outer and inner ways are from multiple ways (multigeometry)',
'SELECT ST_NumGeometries(way) FROM planet_osm_polygon WHERE osm_id = -7 and landuse = \'farmland\' and name = \'Name_rel15\'', 2),
( 51, 'Basic hstore point count', 'SELECT count(*) FROM planet_osm_point;', 1360 ),
( 52, 'Basic hstore line count', 'SELECT count(*) FROM planet_osm_line;', 3323 ),
( 52, 'Basic hstore line count', 'SELECT count(*) FROM planet_osm_line;', 3254 ),
( 53, 'Basic hstore road count', 'SELECT count(*) FROM planet_osm_roads;', 375 ),
( 54, 'Basic hstore polygon count', 'SELECT count(*) FROM planet_osm_polygon;', 4128 ),
( 54, 'Basic hstore polygon count', 'SELECT count(*) FROM planet_osm_polygon;', 4127 ),
( 55, 'Basic post-diff point count', 'SELECT count(*) FROM planet_osm_point;', 1475 ),
( 56, 'Basic post-diff line count', 'SELECT count(*) FROM planet_osm_line;', 3367 ),
( 57, 'Basic post-diff road count', 'SELECT count(*) FROM planet_osm_roads;', 381 ),
( 58, 'Basic post-diff polygon count', 'SELECT count(*) FROM planet_osm_polygon;', 4275 ),
( 56, 'Basic post-diff line count', 'SELECT count(*) FROM planet_osm_line;', 3297 ),
( 57, 'Basic post-diff road count', 'SELECT count(*) FROM planet_osm_roads;', 380 ),
( 58, 'Basic post-diff polygon count', 'SELECT count(*) FROM planet_osm_polygon;', 4274 ),
( 59, 'Extra hstore full tags point count',
'SELECT count(*) FROM planet_osm_point WHERE tags ? \'osm_user\' and tags ? \'osm_version\' and tags ? \'osm_uid\' and tags ? \'osm_changeset\'', 1360),
( 60, 'Extra hstore full tags line count',
'SELECT count(*) FROM planet_osm_line WHERE tags ? \'osm_user\' and tags ? \'osm_version\' and tags ? \'osm_uid\' and tags ? \'osm_changeset\'', 3323),
'SELECT count(*) FROM planet_osm_line WHERE tags ? \'osm_user\' and tags ? \'osm_version\' and tags ? \'osm_uid\' and tags ? \'osm_changeset\'', 3254),
( 61, 'Extra hstore full tags polygon count',
'SELECT count(*) FROM planet_osm_polygon WHERE tags ? \'osm_user\' and tags ? \'osm_version\' and tags ? \'osm_uid\' and tags ? \'osm_changeset\'', 4128),
'SELECT count(*) FROM planet_osm_polygon WHERE tags ? \'osm_user\' and tags ? \'osm_version\' and tags ? \'osm_uid\' and tags ? \'osm_changeset\'', 4127),
( 62, 'Multipolygon copying of tags from outer with extra tags on relation',
'SELECT round(ST_Area(way)) FROM planet_osm_polygon WHERE osm_id = -22', 20878),
( 63, 'Multipolygon copying of tags from outer with extra tags on relation (abscence of way)',
Expand Down Expand Up @@ -166,16 +166,16 @@
'SELECT round(ST_Area(way)) FROM planet_osm_polygon WHERE osm_id = -35 and "natural" = \'water\'', 15737),
( 90, 'Multipolygon tags on relation two outer diff remove way from relation (presence of single way)',
'SELECT round(ST_Area(way)) FROM planet_osm_polygon WHERE osm_id = 102 and "natural" = \'water\'', 12994),
( 91, 'Basic line length', 'SELECT round(sum(ST_Length(way))) FROM planet_osm_line;', 4269394),
( 91, 'Basic line length', 'SELECT round(sum(ST_Length(way))) FROM planet_osm_line;', 4211350),
( 92, 'Basic line length', 'SELECT round(sum(ST_Length(way))) FROM planet_osm_roads;', 2032023),
( 93, 'Basic number of hstore points tags', 'SELECT sum(array_length(akeys(tags),1)) FROM planet_osm_point;', 4228),
( 94, 'Basic number of hstore roads tags', 'SELECT sum(array_length(akeys(tags),1)) FROM planet_osm_roads;', 2317),
( 95, 'Basic number of hstore lines tags', 'SELECT sum(array_length(akeys(tags),1)) FROM planet_osm_line;', 11134),
( 96, 'Basic number of hstore polygons tags', 'SELECT sum(array_length(akeys(tags),1)) FROM planet_osm_polygon;', 9541),
( 95, 'Basic number of hstore lines tags', 'SELECT sum(array_length(akeys(tags),1)) FROM planet_osm_line;', 10387),
( 96, 'Basic number of hstore polygons tags', 'SELECT sum(array_length(akeys(tags),1)) FROM planet_osm_polygon;', 9531),
( 97, 'Diff import number of hstore points tags', 'SELECT sum(array_length(akeys(tags),1)) FROM planet_osm_point;', 4352),
( 98, 'Diff import number of hstore roads tags', 'SELECT sum(array_length(akeys(tags),1)) FROM planet_osm_roads;', 2341),
( 99, 'Diff import number of hstore lines tags', 'SELECT sum(array_length(akeys(tags),1)) FROM planet_osm_line;', 11257),
( 100, 'Diff import number of hstore polygons tags', 'SELECT sum(array_length(akeys(tags),1)) FROM planet_osm_polygon;', 9835),
( 98, 'Diff import number of hstore roads tags', 'SELECT sum(array_length(akeys(tags),1)) FROM planet_osm_roads;', 2336),
( 99, 'Diff import number of hstore lines tags', 'SELECT sum(array_length(akeys(tags),1)) FROM planet_osm_line;', 10505),
( 100, 'Diff import number of hstore polygons tags', 'SELECT sum(array_length(akeys(tags),1)) FROM planet_osm_polygon;', 9825),
#**** Tests to check if inner polygon appears when outer tags change after initially identicall inner and outer way tags in a multi-polygon ****
#**** These tests are currently broken and noted in trac ticket #2853 ****
( 101, 'Multipolygon identical tags on inner and outer (presence of relation)',
Expand Down

0 comments on commit 0333e11

Please sign in to comment.