This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Extracting only minimal data with country names

0

So, my plan is as follows:

  1. Download planet-210712.osm.pbf
  2. Convert it to planet.o5m using osmconvert64-0.8.8p.exe
  3. Extract all the details I need using osmfilter.exe (e.g. using this command: osmfilter.exe --keep="natural=coastline or ( boundary=administrative and admin_level=2 )" --drop="maritime=yes or admin_level!=2" planet.o5m > planet.osm
  4. Possibly simplify the shapes, since current file-size is ~12GB in OSM format.
  5. Process data with osm2pgsql.exe and import it into PostGIS database.
  6. Serve vector tiles using some web server like pg_tileserv.exe.

Now, all this works more/less OK (I tried first on some smaller dataset of Netherlands), but it seems that I cannot get this to extract country names. Not sure if this is some additional display layer, or is this actually part of OSM files?

I'm adding screenshot of the country names that I would like to display, but that I cannot see when I open OSM file in some of the editors. Is there country_3 inside the OSM files? I can find only place=country.

Is it easy to simplify shapes for natural=coastline and boundary=administrative inside OSM, so I can get smaller filesize?

alt text

asked 18 Jul '21, 21:07

bojanv55's gravatar image

bojanv55
11112
accept rate: 0%

Source code available on GitHub .