# How many kms does my city have?

**URL:** https://community.citystrides.com/t/how-many-kms-does-my-city-have/23076
**Category:** Support
**Created:** [May 7, 2021, 10:01pm UTC](https://community.citystrides.com/t/how-many-kms-does-my-city-have/23076 "2021-05-07T22:01:06Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![b.morawitz](https://community.citystrides.com/user_avatar/community.citystrides.com/b.morawitz/32/1901_2.png) [@b.morawitz](https://community.citystrides.com/u/b.morawitz)
#### Post date: [May 7, 2021, 10:01pm UTC](https://community.citystrides.com/t/how-many-kms-does-my-city-have/23076/1 "2021-05-07T22:01:06Z")

</div>

Is there any way to determine how many km i have to run to complete my city? Or how many km of streets there are in my city?

Thanks.

Bjoern

---

<div class="post-metadata">

### Author: ![Marty](https://community.citystrides.com/letter_avatar_proxy/v4/letter/m/f0a364/32.png) [@Marty](https://community.citystrides.com/u/Marty)
#### Post date: [May 8, 2021, 12:30am UTC](https://community.citystrides.com/t/how-many-kms-does-my-city-have/23076/2 "2021-05-08T00:30:28Z")

</div>

The idea of total distance in a city has been discussed loosely a couple times ([here](https://community.citystrides.com/t/total-miles-in-a-city-idea/18116) & [here](https://community.citystrides.com/t/display-length-of-streets-on-city-page/20884)) but is not currently available.

I’d recommend checking with your local government body (city, country, council or equivalent) to see if they have a ‘Planning’ department. Sometimes these departments will have not only a map of current (and future proposed streets) but they may also have done a survey where they measured every street in the city. Even with a known total distance, it doesn’t mean that will be the total distance you will run. There will be certain inefficiencies like dead ends where you are running the street distance twice or where you need to repeat part of a street to get to another street.

For example, my city did have a document that had the total distance of all streets measured out (though it’s a couple years old). It listed 772.35 miles/1242.94 km. Each run I did, I labeled with a specific name so that way I could aggregate the total distance & elevation at the end. When I completed my city, the total running distance was 1916.7 miles/3084.62 km.

---

<div class="post-metadata">

### Author: ![bas](https://community.citystrides.com/letter_avatar_proxy/v4/letter/b/a587f6/32.png) [@bas](https://community.citystrides.com/u/bas)
#### Post date: [May 8, 2021, 11:42am UTC](https://community.citystrides.com/t/how-many-kms-does-my-city-have/23076/3 "2021-05-08T11:42:14Z")

</div>

So if you run this query in Overpass, it returns a list of lengths per road type in a city: [overpass turbo](https://overpass-turbo.eu/s/176N) (lengths in meters). With all way types included, this sums up to almost 9000 km in Soest. The complexity starts with footways along roads, tracks, dual carriage ways, ways extending beyond the city border etc.

> length value  
> 7221.35 bridleway  
> 3653.423 construction  
> 170818.526 cycleway  
> 337274.951 footway  
> 72389.355 living\_street  
> 135903.241 motorway  
> 27274.662 motorway\_link  
> 594997.759 path  
> 13218.547 pedestrian  
> 1812.081 platform  
> 180691.729 primary  
> 2786.708 primary\_link  
> 33104.233 proposed  
> 3206.576 raceway  
> 1298303.482 residential  
> 6973.528 rest\_area  
> 1173.192 road  
> 489885.534 secondary  
> 1094.059 secondary\_link  
> 832305.815 service  
> 6165.253 services  
> 4829.221 steps  
> 534085.579 tertiary  
> 185.53 tertiary\_link  
> 2925064.232 track  
> 18624.642 trunk  
> 4749.855 trunk\_link  
> 986894.543 unclassified

---

<div class="post-metadata">

### Author: ![b.morawitz](https://community.citystrides.com/user_avatar/community.citystrides.com/b.morawitz/32/1901_2.png) [@b.morawitz](https://community.citystrides.com/u/b.morawitz)
#### Post date: [May 8, 2021, 9:20pm UTC](https://community.citystrides.com/t/how-many-kms-does-my-city-have/23076/4 "2021-05-08T21:20:48Z")

</div>

This seems way too much. I’m not exactly sure how Overpass works, but where I live we call the disctrict Soest and the city Soest. That could explain the difference.

I ran about 600km this year and covered about 90% of the streets in my city (according to Citystrides). I know i have run some streets multiple times while I didn’t run others (no nodes or nodes only on adjacent streets). So when i have to guess i would say its about 500km of streets in my city

---

<div class="post-metadata">

### Author: ![8f7162110d9eeaf907ab](https://community.citystrides.com/letter_avatar_proxy/v4/letter/8/ad7895/32.png) [@8f7162110d9eeaf907ab](https://community.citystrides.com/u/8f7162110d9eeaf907ab)
#### Post date: [May 9, 2021, 9:42am UTC](https://community.citystrides.com/t/how-many-kms-does-my-city-have/23076/5 "2021-05-09T09:42:11Z")

</div>

It should be possible to modify that overpass query so that it gives you the length of the strideable set only. A lot of the entries on @bas list are road types that are not included in CS at all, and the “has name” requirement should trim the remaining ones to distances more in line with expectations: [overpass turbo](https://overpass-turbo.eu/s/1787) . This returns

length value  
20.36143 living\_street  
2.57426 pedestrian  
10.43539 primary  
151.956283 residential  
0.837188 road  
47.618074 secondary  
9.240122 service  
72.819988 tertiary  
68.412969 unclassified

for a total of 384km.

---

<div class="post-metadata">

### Author: ![sander.vl](https://community.citystrides.com/letter_avatar_proxy/v4/letter/s/53a042/32.png) [@sander.vl](https://community.citystrides.com/u/sander.vl)
#### Post date: [August 18, 2021, 9:52am UTC](https://community.citystrides.com/t/how-many-kms-does-my-city-have/23076/6 "2021-08-18T09:52:53Z")

</div>

@8f7162110d9eeaf907ab and @bas could you please help me understand these lines:

area[name=“Nordrhein-Westfalen”]-\>.a;  
area(3600153481)-\>.b;

I more or less assumed the long number would be the OSM identifier, but I seem to find a different one: [Relation: ‪Soest‬ (‪153481‬) | OpenStreetMap](https://www.openstreetmap.org/relation/153481) ? The first area is there to distinguish it from the Dutch Soest?

I’m trying to do this for: [Relation: ‪Sint-Katelijne-Waver‬ (‪414402‬) | OpenStreetMap](https://www.openstreetmap.org/relation/414402) , but I’m also trying to understand how it works. Because this doesn’t:

area[name=“Vlaanderen”]-\>.a; (I also try “Flanders”, “Antwerp”, “Mechelen”)  
area(414402)-\>.b;

Many thanks in advance.

---

<div class="post-metadata">

### Author: ![ericjrw](https://community.citystrides.com/user_avatar/community.citystrides.com/ericjrw/32/1065_2.png) [@ericjrw](https://community.citystrides.com/u/ericjrw)
#### Post date: [August 18, 2021, 2:35pm UTC](https://community.citystrides.com/t/how-many-kms-does-my-city-have/23076/7 "2021-08-18T14:35:17Z")

</div>

Very interesting thread. I have often wondered the very same thing.

In fact it made me ponder a different type of leader board for CS: City efficiency. Based on a city’s miles (or KMs) and a Strider’s miles (or KMs), who finished it the most efficiently, and possibly see who finished it the least efficiently.

---

<div class="post-metadata">

### Author: ![Marty](https://community.citystrides.com/letter_avatar_proxy/v4/letter/m/f0a364/32.png) [@Marty](https://community.citystrides.com/u/Marty)
#### Post date: [August 19, 2021, 12:57pm UTC](https://community.citystrides.com/t/how-many-kms-does-my-city-have/23076/8 "2021-08-19T12:57:46Z")

</div>

> [@sander.vl](#):
>
> I’m trying to do this for: [Relation: ‪Sint-Katelijne-Waver‬ (‪414402‬) | OpenStreetMap](https://www.openstreetmap.org/relation/414402) , but I’m also trying to understand how it works. Because this doesn’t:
> 
> area[name=“Vlaanderen”]-\>.a; (I also try “Flanders”, “Antwerp”, “Mechelen”)  
> area(414402)-\>.b;

I’m an overpass noob but I think your error is in what you have entered in both area fields. Using the OSM link you provided for Sint-Katelijne-Waver, I updated it to be:  
area[name=“Sint-Katelijne-Waver”]-\>.a;  
area(3600414402)-\>.b;

The OSM area ID needs to be added to 3600000000. I have no idea why that is 🤷‍♂️. With that I get below ([Overpass query](https://overpass-turbo.eu/s/1as0)). There is a length/1000 so I believe the results are showing in kilometers. Does that seem somewhat accurate for distance for your city?

 ![overpass-turbo](https://d25dflut6m8e53.cloudfront.net/original/2X/1/1acf1ea625c3212161fc4792fec2b5b8b9d7f5f9.png)

---

<div class="post-metadata">

### Author: ![sander.vl](https://community.citystrides.com/letter_avatar_proxy/v4/letter/s/53a042/32.png) [@sander.vl](https://community.citystrides.com/u/sander.vl)
#### Post date: [August 19, 2021, 1:40pm UTC](https://community.citystrides.com/t/how-many-kms-does-my-city-have/23076/9 "2021-08-19T13:40:58Z")

</div>

> [@Marty](#):
>
> The OSM area ID needs to be added to 3600000000. I have no idea why that is 🤷‍♂️. With that I get below. Does that seem somewhat accurate for distance for your city?

Thanks a lot!

That’s ~175km in total, that’s slightly lower than I would have guessed but it is certainly possible. Loads of dead ends though 🙃

I also checked the ‘larger’ nearby cities:  
Mechelen ([Relation: ‪Mechelen‬ (‪412864‬) | OpenStreetMap](https://www.openstreetmap.org/relation/412864)), this returned 351km, which again feels a bit on the low side.

Antwerpen ([Relation: ‪Antwerpen‬ (‪59518‬) | OpenStreetMap](https://www.openstreetmap.org/relation/59518)), this one gave a more respectable 1285km, but elsewhere I read a figure of 2300km (though including “non-citystrides-roads”), so quite a bit less.

In short, the method possibly gives a bit of an underestimation but certainly a plausible number.

---

<div class="post-metadata">

### Author: ![8f7162110d9eeaf907ab](https://community.citystrides.com/letter_avatar_proxy/v4/letter/8/ad7895/32.png) [@8f7162110d9eeaf907ab](https://community.citystrides.com/u/8f7162110d9eeaf907ab)
#### Post date: [August 20, 2021, 8:12pm UTC](https://community.citystrides.com/t/how-many-kms-does-my-city-have/23076/10 "2021-08-20T20:12:52Z")

</div>

Hi Sander, you can run the query without the exclusions to get the total distance. The exclusions (all the !~ entries) are there so the query returns only citystridideable streets.

Sorry for being a bit lazy with the query, it’s possible to use only one area and the OSM ID, which would be more intuitive…
