This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

How to count the number of trees bordering a road ?

0

Hello! What I would like to do is to write a script that would be able to tell me how many trees border each road in a small area. I'm using overpass-turbo, and I managed to get a list of roads with trees bordering them, with this script. However, I'm unable to count the trees. I then tried using this script, but all it does is count the number of roads with trees bordering them and not the number of trees bordering each road. Please let me know if you have any idea how I could do that. Thanks!

asked 19 Nov '22, 16:13

AloysP's gravatar image

AloysP
11112
accept rate: 0%


2 Answers:

0

Hi AloysP, It depends on the accuraty of the mapper, if he chooses for natural=tree_line it is not possible since there is no accurate data. If the trees are tagged natural=tree you should be able to define and select the area of the way with the surrounding natural=trees in a certain area. Due to these variable values I dont expect to find a solution than counting them yourself.

answered 19 Nov '22, 22:58

Hendrikklaas's gravatar image

Hendrikklaas
9.3k207238387
accept rate: 5%

0

Okay, thank you for your answer, I'll try another way

answered 25 Nov '22, 12:24

AloysP's gravatar image

AloysP
11112
accept rate: 0%

Source code available on GitHub .