automate testing
parent
f68c5b93d8
commit
16114e4328
|
@ -0,0 +1,28 @@
|
|||
.PHONY: build all test clean
|
||||
|
||||
IMPOSM_BIN=../imposm3
|
||||
|
||||
all: build test
|
||||
|
||||
build:
|
||||
cd ..; make build
|
||||
|
||||
$(IMPOSM_BIN):
|
||||
build
|
||||
|
||||
clean:
|
||||
rm -rf build
|
||||
|
||||
build/test.pbf: test.osm
|
||||
@mkdir -p build
|
||||
osmosis --read-xml ./test.osm --write-pbf ./build/test.pbf omitmetadata=true
|
||||
|
||||
build/test.osc.gz: test.osc
|
||||
@mkdir -p build
|
||||
gzip --stdout ./test.osc > ./build/test.osc.gz
|
||||
|
||||
test: .lasttestrun
|
||||
|
||||
.lasttestrun: $(IMPOSM_BIN) imposm_system_test.py build/test.osc.gz build/test.pbf
|
||||
@touch .lasttestrun
|
||||
nosetests imposm_system_test.py
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"type": "FeatureCollection",
|
||||
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:EPSG::3857" } },
|
||||
|
||||
"features": [
|
||||
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -19926188.851995971053839, -19971868.880408588796854 ], [ -19926188.851995971053839, 19971868.880408562719822 ], [ 19926188.851995974779129, 19971868.880408562719822 ], [ 19926188.851995974779129, -19971868.880408588796854 ], [ -19926188.851995971053839, -19971868.880408588796854 ] ] ] } }
|
||||
]
|
||||
}
|
|
@ -1,6 +1,5 @@
|
|||
import math
|
||||
import tempfile
|
||||
import atexit
|
||||
import shutil
|
||||
import subprocess
|
||||
import psycopg2
|
||||
|
@ -18,14 +17,15 @@ class Dummy(unittest.TestCase):
|
|||
_t = Dummy('nop')
|
||||
assert_almost_equal = _t.assertAlmostEqual
|
||||
|
||||
# tmpdir = tempfile.mkdtemp()
|
||||
tmpdir = None
|
||||
|
||||
# def cleanup_tmpdir():
|
||||
# shutil.rmtree(tmpdir)
|
||||
def setup():
|
||||
global tmpdir
|
||||
tmpdir = tempfile.mkdtemp()
|
||||
|
||||
# atexit.register(cleanup_tmpdir)
|
||||
def teardown():
|
||||
shutil.rmtree(tmpdir)
|
||||
|
||||
tmpdir = '/tmp/testtest'
|
||||
|
||||
db_conf = {
|
||||
'host': 'localhost',
|
||||
|
@ -143,7 +143,7 @@ def test_import():
|
|||
"""Import succeeds"""
|
||||
drop_import_schema()
|
||||
assert not table_exists('osm_roads')
|
||||
imposm3_import(db_conf, './test.pbf')
|
||||
imposm3_import(db_conf, './build/test.pbf')
|
||||
assert table_exists('osm_roads')
|
||||
#######################################################################
|
||||
|
||||
|
@ -220,7 +220,7 @@ def test_way_rel_ref_after_delete_1():
|
|||
#######################################################################
|
||||
def test_update():
|
||||
"""Diff import applies"""
|
||||
imposm3_update(db_conf, './test.osc.gz')
|
||||
imposm3_update(db_conf, './build/test.osc.gz')
|
||||
#######################################################################
|
||||
|
||||
def test_updated_landusage():
|
|
@ -0,0 +1,879 @@
|
|||
{
|
||||
"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": [
|
||||
{
|
||||
"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
|
||||
},
|
||||
{
|
||||
"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",
|
||||
"island",
|
||||
"land"
|
||||
]
|
||||
},
|
||||
"type": "zorder",
|
||||
"name": "z_order",
|
||||
"key": "z_order"
|
||||
}
|
||||
],
|
||||
"type": "polygon",
|
||||
"mapping": {
|
||||
"amenity": [
|
||||
"university",
|
||||
"school",
|
||||
"college",
|
||||
"library",
|
||||
"fuel",
|
||||
"parking",
|
||||
"cinema",
|
||||
"theatre",
|
||||
"place_of_worship",
|
||||
"hospital"
|
||||
],
|
||||
"barrier": [
|
||||
"hedge"
|
||||
],
|
||||
"leisure": [
|
||||
"park",
|
||||
"garden",
|
||||
"playground",
|
||||
"golf_course",
|
||||
"sports_centre",
|
||||
"pitch",
|
||||
"stadium",
|
||||
"common",
|
||||
"nature_reserve"
|
||||
],
|
||||
"tourism": [
|
||||
"zoo"
|
||||
],
|
||||
"natural": [
|
||||
"wood",
|
||||
"land",
|
||||
"scrub",
|
||||
"wetland",
|
||||
"heath"
|
||||
],
|
||||
"man_made": [
|
||||
"pier"
|
||||
],
|
||||
"aeroway": [
|
||||
"runway",
|
||||
"taxiway"
|
||||
],
|
||||
"place": [
|
||||
"island"
|
||||
],
|
||||
"military": [
|
||||
"barracks"
|
||||
],
|
||||
"landuse": [
|
||||
"park",
|
||||
"forest",
|
||||
"residential",
|
||||
"retail",
|
||||
"commercial",
|
||||
"industrial",
|
||||
"railway",
|
||||
"cemetery",
|
||||
"grass",
|
||||
"farmyard",
|
||||
"farm",
|
||||
"farmland",
|
||||
"orchard",
|
||||
"vineyard",
|
||||
"wood",
|
||||
"meadow",
|
||||
"village_green",
|
||||
"recreation_ground",
|
||||
"allotments",
|
||||
"quarry"
|
||||
],
|
||||
"highway": [
|
||||
"pedestrian",
|
||||
"footway"
|
||||
]
|
||||
}
|
||||
},
|
||||
"buildings": {
|
||||
"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": [
|
||||
"__any__"
|
||||
]
|
||||
}
|
||||
},
|
||||
"places": {
|
||||
"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
|
||||
},
|
||||
{
|
||||
"args": {
|
||||
"ranks": [
|
||||
"country",
|
||||
"state",
|
||||
"region",
|
||||
"county",
|
||||
"city",
|
||||
"town",
|
||||
"village",
|
||||
"hamlet",
|
||||
"suburb",
|
||||
"locality"
|
||||
]
|
||||
},
|
||||
"type": "zorder",
|
||||
"name": "z_order",
|
||||
"key": "z_order"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "population",
|
||||
"key": "population"
|
||||
}
|
||||
],
|
||||
"type": "point",
|
||||
"mapping": {
|
||||
"place": [
|
||||
"country",
|
||||
"state",
|
||||
"region",
|
||||
"county",
|
||||
"city",
|
||||
"town",
|
||||
"village",
|
||||
"hamlet",
|
||||
"suburb",
|
||||
"locality"
|
||||
]
|
||||
}
|
||||
},
|
||||
"transport_areas": {
|
||||
"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": {
|
||||
"railway": [
|
||||
"station",
|
||||
"platform"
|
||||
],
|
||||
"aeroway": [
|
||||
"aerodrome",
|
||||
"terminal",
|
||||
"helipad",
|
||||
"apron"
|
||||
]
|
||||
}
|
||||
},
|
||||
"admin": {
|
||||
"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": "integer",
|
||||
"name": "admin_level",
|
||||
"key": "admin_level"
|
||||
}
|
||||
],
|
||||
"type": "polygon",
|
||||
"mapping": {
|
||||
"boundary": [
|
||||
"administrative"
|
||||
]
|
||||
}
|
||||
},
|
||||
"aeroways": {
|
||||
"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": "linestring",
|
||||
"mapping": {
|
||||
"aeroway": [
|
||||
"runway",
|
||||
"taxiway"
|
||||
]
|
||||
}
|
||||
},
|
||||
"waterways": {
|
||||
"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": "linestring",
|
||||
"mapping": {
|
||||
"waterway": [
|
||||
"stream",
|
||||
"river",
|
||||
"canal",
|
||||
"drain",
|
||||
"ditch"
|
||||
],
|
||||
"barrier": [
|
||||
"ditch"
|
||||
]
|
||||
}
|
||||
},
|
||||
"barrierways": {
|
||||
"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": "linestring",
|
||||
"mapping": {
|
||||
"barrier": [
|
||||
"city_wall",
|
||||
"fence",
|
||||
"hedge",
|
||||
"retaining_wall",
|
||||
"wall",
|
||||
"bollard",
|
||||
"gate",
|
||||
"spikes",
|
||||
"lift_gate",
|
||||
"kissing_gate",
|
||||
"embankment",
|
||||
"yes",
|
||||
"wire_fence"
|
||||
]
|
||||
}
|
||||
},
|
||||
"transport_points": {
|
||||
"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": "string",
|
||||
"name": "ref",
|
||||
"key": "ref"
|
||||
}
|
||||
],
|
||||
"type": "point",
|
||||
"mapping": {
|
||||
"railway": [
|
||||
"station",
|
||||
"halt",
|
||||
"tram_stop",
|
||||
"crossing",
|
||||
"level_crossing",
|
||||
"subway_entrance"
|
||||
],
|
||||
"aeroway": [
|
||||
"aerodrome",
|
||||
"terminal",
|
||||
"helipad",
|
||||
"gate"
|
||||
],
|
||||
"highway": [
|
||||
"motorway_junction",
|
||||
"turning_circle",
|
||||
"bus_stop"
|
||||
]
|
||||
}
|
||||
},
|
||||
"amenities": {
|
||||
"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": "point",
|
||||
"mapping": {
|
||||
"amenity": [
|
||||
"university",
|
||||
"school",
|
||||
"library",
|
||||
"fuel",
|
||||
"hospital",
|
||||
"fire_station",
|
||||
"police",
|
||||
"townhall"
|
||||
]
|
||||
}
|
||||
},
|
||||
"barrierpoints": {
|
||||
"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": "point",
|
||||
"mapping": {
|
||||
"barrier": [
|
||||
"block",
|
||||
"bollard",
|
||||
"cattle_grid",
|
||||
"chain",
|
||||
"cycle_barrier",
|
||||
"entrance",
|
||||
"horse_stile",
|
||||
"gate",
|
||||
"spikes",
|
||||
"lift_gate",
|
||||
"kissing_gate",
|
||||
"fence",
|
||||
"yes",
|
||||
"wire_fence",
|
||||
"toll_booth",
|
||||
"stile"
|
||||
]
|
||||
}
|
||||
},
|
||||
"housenumbers_interpolated": {
|
||||
"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": "string",
|
||||
"name": "addr:street",
|
||||
"key": "addr:street"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "addr:postcode",
|
||||
"key": "addr:postcode"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "addr:city",
|
||||
"key": "addr:city"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "addr:inclusion",
|
||||
"key": "addr:inclusion"
|
||||
}
|
||||
],
|
||||
"type": "linestring",
|
||||
"mapping": {
|
||||
"addr:interpolation": [
|
||||
"__any__"
|
||||
]
|
||||
}
|
||||
},
|
||||
"roads": {
|
||||
"fields": [
|
||||
{
|
||||
"type": "id",
|
||||
"name": "osm_id",
|
||||
"key": null
|
||||
},
|
||||
{
|
||||
"type": "geometry",
|
||||
"name": "geometry",
|
||||
"key": null
|
||||
},
|
||||
{
|
||||
"type": "mapping_value",
|
||||
"name": "type",
|
||||
"key": null
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "name",
|
||||
"key": "name"
|
||||
},
|
||||
{
|
||||
"type": "boolint",
|
||||
"name": "tunnel",
|
||||
"key": "tunnel"
|
||||
},
|
||||
{
|
||||
"type": "boolint",
|
||||
"name": "bridge",
|
||||
"key": "bridge"
|
||||
},
|
||||
{
|
||||
"type": "direction",
|
||||
"name": "oneway",
|
||||
"key": "oneway"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "ref",
|
||||
"key": "ref"
|
||||
},
|
||||
{
|
||||
"type": "wayzorder",
|
||||
"name": "z_order",
|
||||
"key": "layer"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "access",
|
||||
"key": "access"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "service",
|
||||
"key": "service"
|
||||
},
|
||||
{
|
||||
"type": "mapping_key",
|
||||
"name": "class",
|
||||
"key": null
|
||||
}
|
||||
],
|
||||
"type": "linestring",
|
||||
"filters": {
|
||||
"exclude_tags": [
|
||||
["area", "yes"]
|
||||
]
|
||||
},
|
||||
"mappings": {
|
||||
"railway": {
|
||||
"mapping": {
|
||||
"railway": [
|
||||
"rail",
|
||||
"tram",
|
||||
"light_rail",
|
||||
"subway",
|
||||
"narrow_gauge",
|
||||
"preserved",
|
||||
"funicular",
|
||||
"monorail",
|
||||
"disused"
|
||||
]
|
||||
}
|
||||
},
|
||||
"roads": {
|
||||
"mapping": {
|
||||
"man_made": [
|
||||
"pier",
|
||||
"groyne"
|
||||
],
|
||||
"highway": [
|
||||
"motorway",
|
||||
"motorway_link",
|
||||
"trunk",
|
||||
"trunk_link",
|
||||
"primary",
|
||||
"primary_link",
|
||||
"secondary",
|
||||
"secondary_link",
|
||||
"tertiary",
|
||||
"tertiary_link",
|
||||
"road",
|
||||
"path",
|
||||
"track",
|
||||
"service",
|
||||
"footway",
|
||||
"bridleway",
|
||||
"cycleway",
|
||||
"steps",
|
||||
"pedestrian",
|
||||
"living_street",
|
||||
"unclassified",
|
||||
"residential",
|
||||
"raceway"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"housenumbers": {
|
||||
"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": "string",
|
||||
"name": "addr:street",
|
||||
"key": "addr:street"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "addr:postcode",
|
||||
"key": "addr:postcode"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "addr:city",
|
||||
"key": "addr:city"
|
||||
}
|
||||
],
|
||||
"type": "point",
|
||||
"mapping": {
|
||||
"addr:housenumber": [
|
||||
"__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"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -x -e
|
||||
pushd ..
|
||||
go build
|
||||
popd
|
||||
osmosis --read-xml ./test.osm --write-pbf ./test.pbf omitmetadata=true
|
||||
gzip --stdout ./test.osc > ./test.osc.gz
|
Loading…
Reference in New Issue