I'm having trouble executing my query using the overpass-api.de API. Error: line 3: parse error: not well-formed (invalid token) My query is the following:
Any suggestions? asked 02 Jan '15, 13:42 turgus |
{{nominatimArea:Mexico}} is overpass turbo specific (=syntactic sugar). Overpass API (the database backend) has no idea about this, hence the error message you get. Just paste your query into overpass-turbo.eu and click on Export. What you're probably looking for is the link behind "raw data directly from Overpass API". Before sending your query to Overpass API, overpass turbo will automatically replace this by <id-query type="area" ref="3600114686" into="area"/> answered 02 Jan '15, 14:25 mmd Doing that, the second line became: <id-query type="area" ref="3600114686" into="area"/> Is there anyway I can find out the ref number somehow without overpass turbo doing all the work?
(02 Jan '15, 14:29)
turgus
2
Yes, sure, something along those lines: <query into="area" type="area"> <has-kv k="boundary" v="administrative"/> <has-kv k="ISO3166-1" v="MX"/> </query>
(02 Jan '15, 14:32)
mmd
Thanks a ton!
(02 Jan '15, 14:33)
turgus
Sorry, one last question. Let's say I had: <query into="area" type="area"> <has-kv k="boundary" v="administrative"/> <has-kv k="ISO3166-1" v="US"/> </query> and wanted to get only the state Florida from US? Edit: Nevermind, got it! Thanks again
(02 Jan '15, 14:36)
turgus
1
Florida's relation (www.openstreetmap.org/relation/162050) is currently tagged as "ISO3166-2"= "US-FL", "admin_level"="4" and "boundary" = "administrative". So I would probably use <has-kv k="ISO3166-2" v="US-FL"/> along with <has-kv k="boundary" v="administrative"/>
(02 Jan '15, 14:40)
mmd
showing 5 of 6
show 1 more comments
|