-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lat() and lon() fail for points outside of a convert statement #737
Comments
The reason why this doesn't work is that |
Ah, I see. May I ask why that's a restriction? That seems to stop any conversions between It also prevents one potential use of Overpass for geolocation of images, which is what I use it for outside of mapping. The inability to reference |
Well, since you're anyway working with external data, you could easily rewrite your example as |
That's true, but it gets really painful to work with past a point. Let's say I wanted Being able to 'store' those values, as the ability to reference between |
Well, around also supports a lists of lat/lons, for a use case that sounds like you want to download objects along some virtual way. See https://www.openstreetmap.org/user/mmd/diary/42055 for a few examples. In general, I'd recommend to generate queries using code (like Python, Javascript or whatever works for you). Copy and pasting in overpass turbo will probably be a huge time sink. Better directly talk to Overpass API from your code. |
Oh, that's amazing! Both of those solutions are useful to me and remedy the latter issue. Thank you! (For what it's worth, I still think that |
make
ing a point (withpt(eval, eval)
) creates ageometry
with acoordinate
pair inside of it. Forconvert
statements,lat()
andlon()
obtains the latitude and longitude from thatcoordinate
pair, like so: https://overpass-turbo.eu/s/1PTSBut for non-
convert
statements attempting to uselat()
andlon()
directly, like next to anaround
clause, it fails and instead returns (0, 0): https://overpass-turbo.eu/s/1PTUThe expected behavior is to return
40
(or a float variant) fromlat()
and-80
(or a float variant) fromlon()
, and fornwr(around:20, lat(), lon());
to findnode
s,way
s, andrelation
s within 20 meters of (40, -80).The text was updated successfully, but these errors were encountered: