I use imposm3 (install binary from http://imposm.org/static/rel/ on Ubuntu Server) for import OSM data (features 'protected_area' with "boundary"="protected_area" (http://wiki.openstreetmap.org/wiki/Tag:boundary%3Dprotected_area)) in PostGIS database. When I import data on full Ukraine (http://www.openstreetmap.org/relation/3791141) area I receive in table multipolygon from relation http://www.openstreetmap.org/relation/4650441 with name from http://www.openstreetmap.org/way/331465943 object. But when I import small area (Donetskaya oblast http://www.openstreetmap.org/relation/71973) I received correct polygons from http://www.openstreetmap.org/relation/4650441 relation (not multipolygon). How receive polygons from http://www.openstreetmap.org/relation/4650441 relation when importing protected_areas on Ukraine (http://www.openstreetmap.org/relation/3791141)?
For import I use command:
imposm3 import -read ${BASEDIR}/osmdownloads/ukraine-latest.osm.pbf -write -cachedir ${BASEDIR}/cache -connection 'postgis://user:password@localhost:5432/uaosm?sslmode=disable&prefix=NONE' -dbschema-import public -mapping ${BASEDIR}/mapping.json -diff -srid 4326 -overwritecache
Example mapping.json file:
{
"tags": {
"load_all": true
},
"tables": {
"protected_area_polygon": {
"fields": [
{
"type": "geometry",
"name": "the_geom",
"key": null
},
{
"type": "id",
"name": "osm_id",
"key": null
},
{
"type": "string",
"name": "name",
"key": "name"
},
{
"type": "string",
"name": "name_uk",
"key": "name:uk"
},
{
"type": "string",
"name": "name_ru",
"key": "name:ru"
},
{
"type": "string",
"name": "name_en",
"key": "name:en"
},
{
"type": "string",
"name": "boundary",
"key": "boundary"
},
{
"type": "string",
"name": "prot_class",
"key": "protect_class"
},
{
"type": "string",
"name": "prot_stat",
"key": "protection_status"
},
{
"type": "string",
"name": "prot_title",
"key": "protection_title"
},
{
"type": "string",
"name": "naturalt",
"key": "natural"
},
{
"type": "string",
"name": "amenity",
"key": "amenity"
},
{
"type": "string",
"name": "leisure",
"key": "leisure"
},
{
"type": "string",
"name": "landuse",
"key": "landuse"
},
{
"type": "string",
"name": "operator",
"key": "operator"
},
{
"type": "string",
"name": "place",
"key": "place"
},
{
"type": "string",
"name": "website",
"key": "website"
},
{
"type": "string",
"name": "wikipedia",
"key": "wikipedia"
},
{
"type": "string",
"name": "note",
"key": "note"
}
],
"type": "polygon",
"mapping": {
"boundary": ["protected_area"]
}
}
}
}
asked
25 Jun '15, 08:13
HasT
11●1●1●2
accept rate:
0%