◷ overpass turbo
/*
This is an example Overpass query.
Try it out by pressing the Run button above!
You can find more examples with the Load tool.
*/
node
[railway=level_crossing]
(30.063745677914252,-51.85707092285155,35.58177039501452,-81.38671875);
out;
How to get lon / lat data as output file ?
boris
October 23, 2026, 9:27am
2
@EUexpert you might have more luck with Overpass turbo questions in the OSM forum .
1 Like
I got a 14MByte JSON file from above just by exporting raw data directly from Overpass API. If you insert the line above node;
[out:csv(::lat,::lon,“,”)][timeout:250];
The same export will give you a csv file of just the lon/lat around 2.8MBytes
I also tend to use out center; for most queries if the object can be a way or node. eg amenity=parking
But yes kind of OT for this forum…
1 Like
Thank you @boris for the link
Thank you @bob3bob3
it took me the whole day to extract 370,000 of railway crossings in US
I promise to work harder the next time
And this might be even further OT… (sorry all..)
Rather than use a lat/lon boundary shape you can use the country administrative boundaries;
area[“ISO3166-1”=“AU”]->.a;
I would assume substitute “USA” for “AU”, but could just be “US”.
For a state only you might use;
area[“ISO3166-2”=“NSW”]->.a;
My “area” line is tucked immediately under the “out:csv” one.
Check your country’s admin boundary levels though. I know AU is a little different from most down around the sub-state level.
Being a multi-polygon boundary it will be far more accurate than a lat/lon shape.
Oh I should mention that country wide queries are very server time consuming and you may get complaints doing too many in a short timeframe.
Cheers
1 Like