[OSM-talk] Overpass API: new version 0.6.98
Roland Olbricht
roland.olbricht at gmx.de
Wed May 2 22:09:28 BST 2012
Hello everybody,
I proudly announce version 0.6.98 of Overpass API. It brings a couple of
improvements and new feature that have been asked for in the last two months.
You don't need to worry that there are no planet files at the moment. Now you
can set up your own instance of Overpass API by just downloading an existing
instance, of compressed size 15 GB (or 25 GB with meta data): This only takes
4 to 8 hours, and then you have already ready-made database when others still
download the planet file. See
http://overpass-api.de/no_frills.html#clone
and
http://overpass-api.de/no_frills.html
for complete installation instructions.
Of course, also the query language Overpass QL has made progress:
For memberships in ways and relations, some extra recurse operators are
available:
">" and ">>" collect the ways and nodes that are members of the given
relations or ways.
"<" and "<<" collect the ways and relations that have the given nodes, ways or
relatios as members.
Thus, a bbox query simply gets
http://overpass.osm.rambler.ru/cgi/interpreter?data=(node(50.74,7.05,50.75,7.06);<;);out;
To get also meta-relations on relations in this bbox, just use
http://overpass.osm.rambler.ru/cgi/interpreter?data=(node(50.74,7.05,50.75,7.06);<<;);out;
On the other hand, the recurse-full query just means to add ">;" (or ">>;" if
you want to also resolve meta relations):
http://overpass.osm.rambler.ru/cgi/interpreter?data=(rel[ref=63]
[network=VRS];>;);out;
The negation clauses have changed their meaning, as the meaning in version
0.6.97 caused more confusion than benefit. A query like
http://overpass.osm.rambler.ru/cgi/interpreter?data=(way(50.74,7.05,50.75,7.06)
["highway"!="residential"];<;);out;
will now find every way that hasn't a tag with key "highway" and value
"residential". If you want all ways that have a tag "highway" but not with
value "residential", you can query
http://overpass.osm.rambler.ru/cgi/interpreter?data=(way(50.74,7.05,50.75,7.06)
["highway"]["highway"!="residential"];<;);out;
Of course, you can also query for all ways that don't have a tag "highway" at
all:
http://overpass.osm.rambler.ru/cgi/interpreter?data=(way(50.74,7.05,50.75,7.06)
["highway"!~"."];<;);out;
These changes are already documented in detail in the language guide:
http://wiki.openstreetmap.org/wiki/Overpass_API/Language_Guide
For the other changes, most notably an optimization of the database layout and
a new transaction singularization system, see the changelog
http://wiki.openstreetmap.org/wiki/Overpass_API/versions
Happy data mining,
Roland
More information about the talk
mailing list