From d051b4b210c35a615c97fbe142a99eb8b8b657ac Mon Sep 17 00:00:00 2001 From: Etienne Trimaille Date: Mon, 21 Dec 2015 17:19:42 +0100 Subject: [PATCH] fix #17 update mapping.json --- settings/mapping.json | 247 +++++++++++++++++++++++++----------------- 1 file changed, 150 insertions(+), 97 deletions(-) diff --git a/settings/mapping.json b/settings/mapping.json index 7e8d786..cc5d876 100644 --- a/settings/mapping.json +++ b/settings/mapping.json @@ -1,4 +1,46 @@ { + "generalized_tables": { + "waterareas_gen1": { + "source": "waterareas", + "sql_filter": "ST_Area(geometry)>50000.000000", + "tolerance": 50.0 + }, + "waterareas_gen0": { + "source": "waterareas_gen1", + "sql_filter": "ST_Area(geometry)>500000.000000", + "tolerance": 200.0 + }, + "roads_gen0": { + "source": "roads_gen1", + "sql_filter": null, + "tolerance": 200.0 + }, + "roads_gen1": { + "source": "roads", + "sql_filter": "type IN ('motorway', 'motorway_link', 'trunk', 'trunk_link', 'primary', 'primary_link', 'secondary', 'secondary_link', 'tertiary', 'tertiary_link') OR class IN('railway')", + "tolerance": 50.0 + }, + "waterways_gen0": { + "source": "waterways_gen1", + "sql_filter": null, + "tolerance": 200 + }, + "waterways_gen1": { + "source": "waterways", + "sql_filter": null, + "tolerance": 50.0 + }, + "landusages_gen1": { + "source": "landusages", + "sql_filter": "ST_Area(geometry)>50000.000000", + "tolerance": 50.0 + }, + "landusages_gen0": { + "source": "landusages_gen1", + "sql_filter": "ST_Area(geometry)>500000.000000", + "tolerance": 200.0 + } + }, "tables": { "landusages": { "fields": [ @@ -29,58 +71,57 @@ }, { "args": { - "ranks": [ - "pedestrian", - "footway", - "playground", - "park", - "forest", - "cemetery", - "farmyard", - "farm", - "farmland", - "wood", - "meadow", - "grass", - "wetland", - "village_green", - "recreation_ground", - "garden", - "sports_centre", - "pitch", - "common", - "allotments", - "golf_course", - "university", - "school", - "college", - "library", - "baracks", - "fuel", - "parking", - "nature_reserve", - "cinema", - "theatre", - "place_of_worship", - "hospital", - "scrub", - "orchard", - "vineyard", - "zoo", - "quarry", - "residential", - "retail", - "commercial", - "industrial", - "railway", - "heath", + "values": [ + "land", "island", - "land" + "heath", + "railway", + "industrial", + "commercial", + "retail", + "residential", + "quarry", + "zoo", + "vineyard", + "orchard", + "scrub", + "hospital", + "place_of_worship", + "theatre", + "cinema", + "nature_reserve", + "parking", + "fuel", + "baracks", + "library", + "college", + "school", + "university", + "golf_course", + "allotments", + "common", + "pitch", + "sports_centre", + "garden", + "recreation_ground", + "village_green", + "wetland", + "grass", + "meadow", + "wood", + "farmland", + "farm", + "farmyard", + "cemetery", + "forest", + "park", + "playground", + "footway", + "pedestrian" ] }, - "type": "zorder", - "name": "z_order", - "key": "z_order" + "type": "enumerate", + "name": "z_order" } ], "type": "polygon", @@ -116,7 +157,6 @@ ], "natural": [ "wood", - "water", "land", "scrub", "wetland", @@ -160,9 +200,6 @@ "highway": [ "pedestrian", "footway" - ], - "waterway": [ - "riverbank" ] } }, @@ -196,37 +233,6 @@ ] } }, - "amenity_areas": { - "_comment": "for testing duplicate inserts with __any__ and exact match", - "fields": [ - { - "type": "id", - "name": "osm_id", - "key": null - }, - { - "type": "geometry", - "name": "geometry", - "key": null - }, - { - "type": "string", - "name": "name", - "key": "name" - }, - { - "type": "mapping_value", - "name": "type", - "key": null - } - ], - "type": "polygon", - "mapping": { - "building": [ - "shop" - ] - } - }, "places": { "fields": [ { @@ -251,22 +257,21 @@ }, { "args": { - "ranks": [ - "country", - "state", - "region", - "county", - "city", - "town", - "village", - "hamlet", + "values": [ + "locality", "suburb", - "locality" + "hamlet", + "village", + "town", + "city", + "county", + "region", + "state", + "country" ] }, - "type": "zorder", - "name": "z_order", - "key": "z_order" + "type": "enumerate", + "name": "z_order" }, { "type": "integer", @@ -819,6 +824,54 @@ "__any__" ] } + }, + "waterareas": { + "fields": [ + { + "type": "id", + "name": "osm_id", + "key": null + }, + { + "type": "geometry", + "name": "geometry", + "key": null + }, + { + "type": "string", + "name": "name", + "key": "name" + }, + { + "type": "mapping_value", + "name": "type", + "key": null + }, + { + "type": "pseudoarea", + "name": "area", + "key": null + } + ], + "type": "polygon", + "mapping": { + "waterway": [ + "riverbank" + ], + "landuse": [ + "basin", + "reservoir" + ], + "natural": [ + "water" + ], + "amenity": [ + "swimming_pool" + ], + "leisure": [ + "swimming_pool" + ] + } } } }