Overpass turbo: output ::lat ::lon requested, not returned

I’ve run this query:

[out:csv(::id, ::type, ::lat, ::lon, 'name','addr:housenumber','addr:street','addr:suburb','addr:village','addr:city','addr:postcode';',')] //[out:json] [timeout:30]; {{geocodeArea:United Kingdom}}->.searchArea; ( nwr["building"="mosque"]["amenity"!~"place_of_worship"](area.searchArea); ); out ;

I get this result:

@id @type @lat @lon name addr:housenumber addr:street addr:suburb addr:village addr:city addr:postcode
70457256 way Minhaj-ul-Quran 49 Woodwards Road Walsall WS2 9RN

So it’s giving me the way and type, but not the lat and lon: those columns in the csv are empty.

Anyone know why? I’ve used this query before, successfully, so I must have changed something.

thanks

Sorry, the same error as before: you must use out center at the end of the query, or it can’t give a lat lon

1 Like

Only nodes have an coordinate. You need to ask for the center point if your object is a way or a relation

3 Likes

Thanks. I’d even read my last query on this, and somehow missed that this was the answer!

1 Like