2

I have a route created by MapQuest Open Directions Service. I would like to get a list of all counties that route runs through. Does anyone know if this is possible?

I have tried figuring out if I can do it with Overpass or Nominatim, but haven't found any way to do it yet.

1

Maybe this topic can have hints for you? https://help.openstreetmap.org/questions/47989/how-to-get-info-about-administrative-levels-from-single-coordinate-in-overpass

it is about the is_in feature of the overpas-api.

  • Thanks! is_in gives me what I want for one set of coordinates, but how can I get it to give me the counties for a route? I've tried reading, but haven't figured out how to send in a list of coordinates to is_in. – thomfre Feb 10 '16 at 7:26
  • @thomfre: this is currently not supported, you can only provide one coordinate. Only in case you've already got an existing OSM relation, is_in will return a list of all countries this relation is in: rel(1075081);>;is_in;area._[boundary=administrative][admin_level=2];out;. At this time, you can only chain several is_in: (is_in(59.68,16.77);is_in(59.63,15.77);is_in(58.68,15.77););area._[boundary=administrative][admin_level=2];out; - this is likely to be a bit slow. I suggest to create an enhancement request here: github.com/drolbr/Overpass-API/issues – mmd Feb 10 '16 at 14:34
  • Issue was created: github.com/drolbr/Overpass-API/issues/253 – mmd Feb 16 '16 at 18:10
  • I found another tool but I am not sure whether it will help you: openstreetmap.org/user/ruthmaben/diary/37865 reports about "POIs along a route" ... not a direct help, but maybe you can adapt that technique to divide a route in parts and then dtermine in what state it is. – stephan75 Feb 17 '16 at 16: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.