2

I was wondering how I can retrieve places near a given location?

For example, if I pass the osm API the location "Paris" is it possible to retrieve all the main biggest cities around Paris within a given distance? (For example: "osm give me please all the biggest cities near Paris, in a range of 50 kilometers").

Is it possible?

Any idea?

thanks.

1 Answer 1

1

Do you want all of the geographic data within those big cities near Paris? If so, you should download an extract of the metropolitan area of Paris and which may also include (or if it's not enough, an extract of all of France).

Do you just want a list of the cities and their geographic coordinates ?

(The query may take 5-10 minutes, You can use the OSM API, specifically the Overpass implementation, to craft an around call such as the following:

<osm-script timeout="600" element-limit="1073741824">
<bbox-query e="2.86" n="49.1" s="48.7" w="1.94"/>
<query type="node">
<has-kv k="name" v="Paris"/>
   </query>
  <query type="node">
 <around radius="100000"/>
<has-kv k="place" regv="town|city"/>
</query>
<print/>
1
  • well if it takes too long not thanks, i'll accept this answer if nobodyelse will show any other way to do that, thanks Commented Dec 24, 2012 at 16:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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