-
Notifications
You must be signed in to change notification settings - Fork 93
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
Idea: add function to sum up spatial length of ways #237
Comments
Implemented in 0762e15 Syntax is:
|
Update: Have a look at tyrasd/osmtogeojson#130 for my latest workaround. In case anyone stumbles upon this. I was wondering how to connect the list of length values from Here is my workaround: https://overpass-turbo.eu/s/1buu [out:json][timeout:25];
(
way["highway"="service"]({{bbox}});
);
out geom;
make stat total_length=sum(length()),way_id_length=set(type() + ",#" + id() + ",length(m):" + length());
out; Which returns a string that can be processed to get the length per way-id. {
"type": "stat",
"id": 1,
"tags": {
"total_length": "58.626",
"way_id_length": "way,#262073667,length(m):18.509;way,#262073675,length(m):40.117"
}
} Another way would be to trust in the fact(?) that the order of all values of make-variable(ids, lengths) is the same, so
Other thinks I learned:
|
General remark: please do not comment on issues that are closed since years. Most likely, nobody will ever read that. Rather feel free to open a new issue for a remark. For the given problem I suggest
The convert statement amends each OSM element with a length tag. The result can be seen on this Overpass Turbo instance. The main instance does not support the produced GeoJson. |
I disagree with this. Given software is updated, an original, accepted answer can often be wrong. Many come to these pages via a google search. I came to this page via the 'Related Questions' column on the OSM help forum. |
like the experimental count function but not the number of elements but the spatial length of non-closed ways.
The text was updated successfully, but these errors were encountered: