1
1

I'd like to find multipolygons that have more than one member with the role 'outer'.

Is there a way to do that with the Overpass API, or would I have to wait for https://github.com/drolbr/Overpass-API/issues/197 to get written?

Would there be any other way to do this?

asked 10 Dec '16, 01:16

Stereo's gravatar image

Stereo
2562310
accept rate: 0%


If you are willing to put up with a beta quality program I am working on, you can use osmium-filter. It can do a query like that: osmium-filter-simple INPUTFILE -e '@relation and (@members[@role=="outer"] > 1)' -o OUTPUTFILE. It doesn't support giving you all the ways and nodes needed for these relations yet, if you need that, you can use the Osmium tool (to be more exact, osmium getid). Other options include writing your own program using libosmium, PyOsmium, or node-osmium (see http://osmcode.org/).

permanent link

answered 10 Dec '16, 09:30

Jochen%20Topf's gravatar image

Jochen Topf
4.4k54564
accept rate: 34%

edited 10 Dec '16, 09:34

Thank you Jochen, I'll give that a go!

Would you also happen to have a way of finding old-style multipolygons with it?

(10 Dec '16, 12:56) Stereo
1

Have a look at https://github.com/osmcode/osm-area-tools . There are tools that can find old-style multipolygons. I use that to create the overlay on http://area.jochentopf.com/map/index.html for instance. But you can also just download the old-style mps from http://area.jochentopf.com/ updated daily.

(10 Dec '16, 14:36) Jochen Topf

Wow, osmium-filter is impressively fast! It's an exciting tool, and I hope that you'll find time to document it :).

'@relation and "type"="multipolygon" and (@members[@role=="outer"] > 1)' did the trick.

(10 Dec '16, 14:38) Stereo
Your answer
toggle preview

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:

×350
×189
×107

question asked: 10 Dec '16, 01:16

question was seen: 1,079 times

last updated: 10 Dec '16, 14:38

powered by OSQA