Why not ask your question on the new OpenStreetMap Community Forum?

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

  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 '22, 10:55

jenspeterhansen's gravatar image

accept rate: 0%

edited 10 Jan '22, 20:51

TZorn's gravatar image


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 '22, 19:56

jenspeterhansen's gravatar image

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 '22, 13:08) H_mlet


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.


permanent link

answered 08 Jan '22, 12:32

H_mlet's gravatar image

accept rate: 13%

Your answer
toggle preview

Follow this question

By Email:

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



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:


question asked: 08 Jan '22, 10:55

question was seen: 941 times

last updated: 10 Jan '22, 20:51

powered by OSQA