[OSM-dev] Problem with XAPI and ref based search

Paul Norman penorman at mac.com
Sat Nov 30 03:16:09 UTC 2013


Ref is a reference to an object ID, not a ref tag. Instead of
/api/0.6/relation[ref=2202120] you want /api/0.6/relation/2202120.

 

I’m not 100% sure if the overpass compatibility layer will correctly handle
the latter syntax.

 

From: Grégory Bataille [mailto:gbataille.dev at gmail.com] 
Sent: Friday, November 29, 2013 4:42 AM
To: dev at openstreetmap.org
Subject: [OSM-dev] Problem with XAPI and ref based search

 

hello everybody,

 

I have been trying to use OSM data for a while. basically, first, I'd like
to get the admin boundaries of France.

I start by asking XAPI to give me the France admin_level 2 object like so:

http://www.overpass-api.de/api/xapi?relation[boundary=administrative][admin_
level=2][name=France]
<http://www.overpass-api.de/api/xapi?relation%5bboundary=administrative%5d%5
badmin_level=2%5d%5bname=France%5d> 

 

this returns me the object, which contains among other things:

<member type="relation" ref="79981" role="outer"></member>

<member type="relation" ref="2202120" role="outer"></member>

<member type="relation" ref="2627308" role="outer"></member>

<member type="relation" ref="2177258" role="outer"></member>

 

so I want to dig down into these relations of course to get to the details
(ways and nodes). But I can't:

http://www.overpass-api.de/api/xapi?relation[ref=2202120]
<http://www.overpass-api.de/api/xapi?relation%5bref=2202120%5d>  or

http://www.overpass-api.de/api/xapi?*[ref=2202120]
<http://www.overpass-api.de/api/xapi?*%5bref=2202120%5d> 

won't return anything. I have been spending a fair amount of time on this
and I can't figure it out.

 

Would you please be able to point me in the right direction?

 

thanks.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20131129/d4e71fa5/attachment.html>


More information about the dev mailing list