Hi - being new to overpass Turbo, I have found several examples of the use of the length() function.

But it seems not to be working any longer - running this small example gives an error

[out:json][timeout:25];
(
  way["highway"]  ({{bbox}});                                                                                                                                        
);
make stat number=count(ways),length=sum(length());
out body;
>;
out skel qt;

So how do I get a total road length?

asked 08 Jan, 10:55

jenspeterhansen's gravatar image

jenspeterhansen
412
accept rate: 0%

edited 10 Jan, 20:51

TZorn's gravatar image

TZorn
11.4k558209


Hi.

you should use the "code" formatting, or the Share function of overpass-turbo, as this website scramble the query otherwise.

Anyway, if I try it, it seems to work alright : http://overpass-turbo.eu/s/1eVq

It is not an error if you get no displayable data, overpass-turbo is meant to display geographic data, on top of the map. But here you get only numbers, which seems right, just check in the data panel.

Regards.

permanent link

answered 08 Jan, 12:32

H_mlet's gravatar image

H_mlet
3.6k1454
accept rate: 14%

Hi H_mlet - thanks for responding.

After comparing your example (working) letter by letter with my own example (error message), I found out, that changing from using the server //overpass.openstreetmap.fr/api/ to //overpass-api.de/api/ solved my problem. :-)

permanent link

answered 08 Jan, 19:56

jenspeterhansen's gravatar image

jenspeterhansen
412
accept rate: 0%

Tricky one. I guess OSMFR doesn't have the time to update their overpass instance... Glad you found the problem. Regards.

(09 Jan, 13:08) H_mlet
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×204
×15

question asked: 08 Jan, 10:55

question was seen: 100 times

last updated: 10 Jan, 20:51

powered by OSQA