Overpass-API icon indicating copy to clipboard operation
Overpass-API copied to clipboard

lat() and lon() fail for points outside of a convert statement

Open ryanfae opened this issue 6 months ago • 6 comments

makeing a point (with pt(eval, eval)) creates a geometry with a coordinate pair inside of it. For convert statements, lat() and lon() obtains the latitude and longitude from that coordinate pair, like so: https://overpass-turbo.eu/s/1PTS

But for non-convert statements attempting to use lat() and lon() directly, like next to an around clause, it fails and instead returns (0, 0): https://overpass-turbo.eu/s/1PTU

The expected behavior is to return 40 (or a float variant) from lat() and -80 (or a float variant) from lon(), and for nwr(around:20, lat(), lon()); to find nodes, ways, and relations within 20 meters of (40, -80).

ryanfae avatar Aug 17 '24 19:08 ryanfae