[OSM-newbies] using the Overpass API

Mike Thompson miketho16 at gmail.com
Fri May 17 17:44:41 UTC 2013


Andrew,

Here is how I do it in Windows.  Put your "script" into an xml file, let's
call it my.xml:
========================
<osm-script>
  <union>
    <bbox-query e="e" n="n" s="s" w="w"/>
    <recurse type="up"/>
    <recurse type="down"/>
  </union>
  <print/>
</osm-script>
=========================

(enter your own bounding box in above)

Use wget from a batch file (could call from the command line):

=========================
wget www.overpass-api.de/api/interpreter --post-file=my.xml -O my.osm
=========================

Does this help?

Mike



On Fri, May 17, 2013 at 11:27 AM, Andrew Salzberg <andrew.salzberg at gmail.com
> wrote:

> Hi,
>
> just trying out the overpass API - very happily able to build scripts here
> in overpass turbo that run great (http://overpass-turbo.eu/) but wanted
> to take the next step and a) write a script in text file and b) send a
> request via bash so that ultimately I can write a script to loop this for a
> few cases.
>
> I'm basically an API newb (not just an OSM API newb) so I'm able to do
> things like write a GET request but I'm not sure what the actual address I
> should be putting in my request to overpass is? Try as I might I can't find
> it in here: http://wiki.openstreetmap.org/wiki/Overpass_API I have
> working .txt file with an <osm_script> in it that I'd like to send via bash
> to overpass... if that makes sense.
>
> any help much appreciated.
>
> Andrew
>
> _______________________________________________
> newbies mailing list
> newbies at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/newbies
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/newbies/attachments/20130517/ddb63e71/attachment.html>


More information about the newbies mailing list