From 02cd91d251038f11c27b7be9f9ff745145060d36 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Wed, 11 Feb 2015 22:31:30 +0100 Subject: [PATCH] update osm2pgsql (bug in relation update) --- osm2pgsql | 2 +- .../osm2pgsql/update/relation.feature | 122 ++++++++++++++++++ 2 files changed, 123 insertions(+), 1 deletion(-) diff --git a/osm2pgsql b/osm2pgsql index accc3eff..10c274f8 160000 --- a/osm2pgsql +++ b/osm2pgsql @@ -1 +1 @@ -Subproject commit accc3eff0ef8799a116d3d2b46be204de8b60e19 +Subproject commit 10c274f851b63547d8e1a194231a67f8f0f8aed6 diff --git a/tests/features/osm2pgsql/update/relation.feature b/tests/features/osm2pgsql/update/relation.feature index 2e6f9d8a..f7bf53aa 100644 --- a/tests/features/osm2pgsql/update/relation.feature +++ b/tests/features/osm2pgsql/update/relation.feature @@ -28,3 +28,125 @@ Scenario: Remove all members of a relation When updating osm data Then table place has no entry for R1 + +Scenario: Change type of a relation + Given the osm nodes: + | id | geometry + | 200 | 0 0 + | 201 | 0 0.0001 + | 202 | 0.0001 0.0001 + | 203 | 0.0001 0 + Given the osm ways: + | id | tags | nodes + | 2 | 'ref' : '45' | 200 201 202 203 200 + Given the osm relations: + | id | tags | members + | 1 | 'type' : 'multipolygon', 'tourism' : 'hotel', 'name' : 'XZ' | W2 + When loading osm data + Then table place contains + | object | class | type | name + | R1 | tourism | hotel | 'name' : 'XZ' + Given the osm relations: + | action | id | tags | members + | M | 1 | 'type' : 'multipolygon', 'amenity' : 'prison', 'name' : 'XZ' | W2 + When updating osm data + Then table place has no entry for R1:tourism + And table place contains + | object | class | type | name + | R1 | amenity | prison | 'name' : 'XZ' + +Scenario: Change name of a relation + Given the osm nodes: + | id | geometry + | 200 | 0 0 + | 201 | 0 0.0001 + | 202 | 0.0001 0.0001 + | 203 | 0.0001 0 + Given the osm ways: + | id | tags | nodes + | 2 | 'ref' : '45' | 200 201 202 203 200 + Given the osm relations: + | id | tags | members + | 1 | 'type' : 'multipolygon', 'tourism' : 'hotel', 'name' : 'AB' | W2 + When loading osm data + Then table place contains + | object | class | type | name + | R1 | tourism | hotel | 'name' : 'AB' + Given the osm relations: + | action | id | tags | members + | M | 1 | 'type' : 'multipolygon', 'tourism' : 'hotel', 'name' : 'XZ' | W2 + When updating osm data + Then table place contains + | object | class | type | name + | R1 | tourism | hotel | 'name' : 'XZ' + + +Scenario: Change type of a relation into something unknown + Given the osm nodes: + | id | geometry + | 200 | 0 0 + | 201 | 0 0.0001 + | 202 | 0.0001 0.0001 + | 203 | 0.0001 0 + Given the osm ways: + | id | tags | nodes + | 2 | 'ref' : '45' | 200 201 202 203 200 + Given the osm relations: + | id | tags | members + | 1 | 'type' : 'multipolygon', 'tourism' : 'hotel', 'name' : 'XZ' | W2 + When loading osm data + Then table place contains + | object | class | type | name + | R1 | tourism | hotel | 'name' : 'XZ' + Given the osm relations: + | action | id | tags | members + | M | 1 | 'type' : 'multipolygon', 'amenities' : 'prison', 'name' : 'XZ' | W2 + When updating osm data + Then table place has no entry for R1 + +Scenario: Type tag is removed + Given the osm nodes: + | id | geometry + | 200 | 0 0 + | 201 | 0 0.0001 + | 202 | 0.0001 0.0001 + | 203 | 0.0001 0 + Given the osm ways: + | id | tags | nodes + | 2 | 'ref' : '45' | 200 201 202 203 200 + Given the osm relations: + | id | tags | members + | 1 | 'type' : 'multipolygon', 'tourism' : 'hotel', 'name' : 'XZ' | W2 + When loading osm data + Then table place contains + | object | class | type | name + | R1 | tourism | hotel | 'name' : 'XZ' + Given the osm relations: + | action | id | tags | members + | M | 1 | 'tourism' : 'hotel', 'name' : 'XZ' | W2 + When updating osm data + Then table place has no entry for R1 + +Scenario: Type tag is renamed to something unknown + Given the osm nodes: + | id | geometry + | 200 | 0 0 + | 201 | 0 0.0001 + | 202 | 0.0001 0.0001 + | 203 | 0.0001 0 + Given the osm ways: + | id | tags | nodes + | 2 | 'ref' : '45' | 200 201 202 203 200 + Given the osm relations: + | id | tags | members + | 1 | 'type' : 'multipolygon', 'tourism' : 'hotel', 'name' : 'XZ' | W2 + When loading osm data + Then table place contains + | object | class | type | name + | R1 | tourism | hotel | 'name' : 'XZ' + Given the osm relations: + | action | id | tags | members + | M | 1 | 'type' : 'multipolygonn', 'tourism' : 'hotel', 'name' : 'XZ' | W2 + When updating osm data + Then table place has no entry for R1 + -- 2.39.5