Closed mmd-osm closed 2 years ago
The examples in https://dev.overpass-api.de/blog/total_0_7_56.html#memberpos would probably benefit from having an abs() function to return the absolute value of a number.
abs()
This should be a bit easier to read:
way(60538085); node(w)(if:lrs_in(id(),set(per_vertex( ! ( abs(angle()) > 88 && abs(angle()) < 92 ) && ! ( abs(angle()) < 2) ? ref() : 0)))); out geom;
current version:
way(60538085); node(w)(if:lrs_in(id(),set(per_vertex( (angle()<-92 || (angle() >-88 && angle() < -2) || (angle() > 2 && angle() < 88) || angle() > 92) ? ref() : 0)))); out geom;
Implemented in https://github.com/drolbr/Overpass-API/commit/e83dce54d0b192b67761d2df66f61da4b741d62d
I’m closing this issue… Thanks!
The examples in https://dev.overpass-api.de/blog/total_0_7_56.html#memberpos would probably benefit from having an
abs()
function to return the absolute value of a number.This should be a bit easier to read:
current version: