NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Could you guys please help me on forming the osmium command to extract all the admin places and educational institutes? I mean all the extracts mentioned in Nominatim import-admin.style ( the below keys) and educational places.

I came up with this one, but not sure if it includes wiki data and other things mentioned in the import-admin.style, and also for boundary do we have to mention place?

Command I came up with

osmium tags-filter planet.osm.pbf amenity=university,school,college,kindergarten place=*  boundary=administrative,postal_code,place,political   o place_edu.osm.pbf

import-admin.style

[
{   "keys" : ["wikipedia", "wikipedia:*", "wikidata"],
    "values" : {
        "" : "extra"
    }
},
{
    "keys" : ["*:prefix", "*:suffix", "name:prefix:*", "name:suffix:*",
              "name:etymology", "name:signed", "name:botanical", "*:wikidata",
              "addr:street:name", "addr:street:type"],
    "values" : {
        "" : "skip"
    }
},
{
    "keys" : ["ref", "int_ref", "nat_ref", "reg_ref", "loc_ref", "old_ref",
              "iata", "icao", "pcode", "ISO3166-2"],
    "values" : {
        "" : "ref"
    }
},
{
    "keys" : ["name", "name:*", "int_name", "int_name:*", "nat_name", "nat_name:*",
              "reg_name", "reg_name:*", "loc_name", "loc_name:*",
              "old_name", "old_name:*", "alt_name", "alt_name:*", "alt_name_*",
              "official_name", "official_name:*", "place_name", "place_name:*",
              "short_name", "short_name:*", "brand"],
    "values" : {
        "" : "name"
    }
},
{
    "keys" : ["landuse"],
    "values" : {
        "cemetry" : "skip",
        "" : "fallback,with_name"
    }
},
{
    "keys" : ["boundary"],
    "values" : {
        "administrative" : "main"
    }
},
{
    "keys" : ["place"],
    "values" : {
        "" : "main"
    }
},
{
    "keys" : ["country_code", "ISO3166-1", "is_in:country_code", "is_in:country",
              "addr:country", "addr:country_code"],
    "values" : {
        "" : "country"
    }
},
{
    "keys" : ["addr:*", "is_in:*", "tiger:county"],
    "values" : {
        "" : "address"
    }
},
{
    "keys" : ["postal_code", "postcode", "addr:postcode",
              "tiger:zip_left", "tiger:zip_right"],
    "values" : {
        "" : "postcode"
    }
},
{
    "keys" : ["capital"],
    "values" : {
        "" : "extra"
    }
}
]

asked 01 Nov '22, 12:51

Chaitu1975's gravatar image

Chaitu1975
11224
accept rate: 0%

1

I am a bit confused by the Nominatim reference, I don't now anything about the details of Nominatim and why that's relevant to you. What's relevant to Osmium is only the list of tags you are interested in. And there is an error in your command line. The place=* doesn't do what you intend, it should just be place.

(02 Nov '22, 07:50) Jochen Topf

Oh, thank you for your response. Sorry for the confusion. I thought I can explain easily by referencing its import style for the keys that I want to extract. I am going to try this command and see "osmium tags-filter planet.osm.pbf place wikipedia wikipedia wikidata amenity=university,school,college,kindergarten boundary=administrative,postal_code,place,political o place_edu.osm.pbf"

(02 Nov '22, 12:05) Chaitu1975

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×38

question asked: 01 Nov '22, 12:51

question was seen: 572 times

last updated: 02 Nov '22, 12:05

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum