OpenGeofiction

Overpass API

Posted by thilo on 24 September 2016 in English (English)

Opengeofiction is now running its own instance of the Overpass API.

The URL for queries against the API is:
http://osm3s.opengeofiction.net/api/

Or you might check out the web interface at
http://osm3s.opengeofiction.net/overpass-turbo/

Learn more about the Overpass API:
http://wiki.openstreetmap.org/wiki/Overpass_API
http://wiki.openstreetmap.org/wiki/Overpass_API/Language_Guide
http://wiki.openstreetmap.org/wiki/Overpass_API/XAPI_Compatibility_Layer

Please note that the availability of the API must be regarded as somewhat experimental. At the moment it looks like the new tile server has enough capacity to run this additional service. But if it turns out to have a negative impact on the tile generation performance, it'll have to be switched off.

Comment from Bstn on 24 September 2016 at 21:50

Thank you so much for this new feature. I missed it when I was about to get details, which are hard to collect with the default api, like getting all nodes of a special type in an area.

Hide this comment

Comment from Luciano on 25 September 2016 at 00:05

This is officially very cool.

I just tried it out, using the Download From Overpass API option in JOSM.

I wanted to see my current state of progress on my mapping of admin_level=10 neighbourhoods in Tárrases.

I wrote this query:

 ( 
   node["admin_level"="10"];
   <;
   >;
 );
 out meta;

I combined with with a bounding box drawn on the slippy map in the dialog window:

http://wiki.opengeofiction.net/wiki/images/c/cf/Luciano_Screenshot_JOSM_Download_From_Overpass_API.png

This gave me all the nodes, ways and relations with this tag, and the two arrows (<, >) in the query recurse through the data to give me owning/owned objects related to those objects.

I now have all that info in JOSM: here is the wireframe view (note that I have a faded Topo layer as a background imagery setting in JOSM). I can easily see my progress on building neighbourhood relations.

http://wiki.opengeofiction.net/wiki/images/6/65/Luciano_Screenshot_JOSM_wireframe_DT_adminlevel10.png

Happy mapping.

Hide this comment

Comment from joschi81 on 25 September 2016 at 18:01

Danke, Thilo! Ich wollte dich schon immer fragen, ob wir das nicht mal auf den OGF-Server bringen können. Ich hab's über das Web-Interface probiert, bekomme aber einen Ajax-Fehler:

"Request rejected. (e.g. server not found, request blocked by browser addon, request redirected, internal server errors, etc.)

Error-Code: error (0)"

Das ist anscheinend nicht browserspezifisch. Hast du eine Idee, woran es liegt?

Grüße Johannes

Thanks, Thilo! I always wanted to ask if we can install it on the OGF server. I tried to run it via the web interface, but I'm getting an ajax error.

Hide this comment

Comment from Luciano on 25 September 2016 at 23:50

@joschi81 - I tried to replicate your error, but I can't.

I have run queries on the web interface, in Chrome and Firefox browsers on Windows 7, and in Chromium on Ubuntu Linux.

I wondered if the problem was a "timeout" problem, so I tried some queries that return large datasets. Still no error.

There is discussion of the same error message here, for osm data:

https://github.com/tyrasd/overpass-turbo/issues/171

This seems to imply it's related to Apache rather than to Overpass API.

What was the query you attempted to run? Have you tried some queries that would return very small datasets?

Hide this comment

Comment from thilo on 26 September 2016 at 21:19

The problem was a configuration error on my part. It's fixed now.

If anyone still has this problem, open the "Settings" menu and make sure that the entry for "Server" on the "General Settings" tab is

//osm3s.opengeofiction.net/api/

and not "//osm3s.opengeofiction.net:9001/api/" or anything else.

Hide this comment

Leave a comment

Parsed with Markdown

  • Headings

    # Heading
    ## Subheading

  • Unordered list

    * First item
    * Second item

  • Ordered list

    1. First item
    2. Second item

  • Link

    [Text](URL)
  • Image

    ![Alt text](URL)

Login to leave a comment