I would like to use Osmfilter for extracting specific relations by ID (and their dependent ways and nodes).

All I've found was filtering by tag/key.

Is there a way to filter by ID?

  • Welcome to GISSE! Please take the site tour. Thanks
    – jbalk
    Sep 26 '17 at 6:51

In osmfilter's documentation via the OSM wiki I found a hint about the @id search key.

Having not tested on my own, you should find out whether that feature is that what you are looking for, and how you can define a filtering for nodes, ways or relation with its own OSM id number (because node 123456 is different from way 123456 and also from relation 123456, but all three do co-exist.)

  • 1
    Thank you very much. Also for the hint that there is no sequential id pattern for all three object types. The query for osmfilter for relations is then [--keep-relations="@id=123456" --keep-ways= --keep-nodes=].
    – Maas
    Sep 27 '17 at 12:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.