Answer the question
In order to leave comments, you need to log in
How to import only the necessary data from OSM into the database?
I’ll make a reservation right away: with a breakdown by region, it’s clear. In particular, while our server is trial and barely pulls, it took the coastline and Moscow from the gislab, uploaded it, corrected the mapnik styles as required (the task is a map without signatures), everything is rendered - well.
But now I would like to see the borders of states on the map (for some reason now they are only for a few zooms), and even better - regions and regions (at least the Russian Federation).
How to take it out of the OSM data, I have not yet figured out. Import the whole world and then extract the data types you need by tags yourself? Suggest good stuff.
Answer the question
In order to leave comments, you need to log in
1. Convert pbf to o5m format
https://wiki.openstreetmap.org/wiki/Osmconvert
2. Filter by tags, for example country
wiki.openstreetmap.org/wiki/Osmfilter
Get osm/o5m file as output
3. Import into Postgresql + postgis
https://github.com/openstreetmap/osm2pgsql
4. Get data in the right format
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question