[OSM-newbies] Overpass API to get all amenities?
Tac Tacelosky
tacman at gmail.com
Wed May 15 18:50:28 UTC 2013
I thought I found a solution to get all the ways and nodes with an
'amenity' tag, plus the nodes that make up the way, with this:
<osm-script>
<union>
<query type="way">
<has-kv k="amenity" regv="."/>
<bbox-query s="%s" w="%s" n="%s" e="%s"/>
</query>
<query type="node">
<has-kv k="amenity" regv="."/>
<bbox-query s="%s" w="%s" n="%s" e="%s"/>
</query>
</union>
<recurse type="way-node" />
<print/></osm-script>
Alas, that doesn't work. I've tried with the recurse tag inside the union
tag, and throw an item tag around, but I'm still not getting it. Can
someone point me in the right direction?
Thanks,
Tac
On Mon, May 6, 2013 at 7:03 PM, Tac Tacelosky <tacman at gmail.com> wrote:
> Thanks, Richard.
>
> I've put that into a union query, and now I'm getting all the ways and
> nodes that are marked with as having an amenity.
>
> But the ways can't be displayed without their associated notes, which are
> often just points. Is there a way to say "Any nodes marked with amenity,
> plus any ways marked as amenity and their associated nodes".
>
> Would that be using "recurse"? I can't quite grasp the syntax. Any
> suggestions?
>
> Thanks,
>
> Tac
>
>
>
> On Fri, May 3, 2013 at 3:06 PM, Richard Welty <rwelty at averillpark.net>wrote:
>
>> On 5/3/13 2:59 PM, Tac Tacelosky wrote:
>>
>>> I'd like to get all nodes and ways within a bounding box that have any
>>> amenity tags. I think the Overpass API is the best way to go, but the
>>> filtering seems to be for a specific amenity, e.g. k="amenity" and
>>> v="restaurant". I tried "*", but that didn't work.
>>>
>>> Any suggestions on how to get all nodes and ways via an API call that are
>>> tagged accordingly?
>>>
>>> try this:
>>
>> <has-kv k="amenity" regv="." />
>>
>> richard
>>
>>
>> ______________________________**_________________
>> newbies mailing list
>> newbies at openstreetmap.org
>> http://lists.openstreetmap.**org/listinfo/newbies<http://lists.openstreetmap.org/listinfo/newbies>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/newbies/attachments/20130515/9552e514/attachment.html>
More information about the newbies
mailing list