Skip to content
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

Check for trees that are too big #2200

Open
ivanbranco opened this issue Apr 14, 2024 · 9 comments
Open

Check for trees that are too big #2200

ivanbranco opened this issue Apr 14, 2024 · 9 comments

Comments

@ivanbranco
Copy link

ivanbranco commented Apr 14, 2024

According to the Guinness World Records, the greatest circumference for a tree is 43m. I suggest implementing a check for trees with circumferences exceeding this value, as they are likely to be errors.

For instance, we currently have 2001 nodes in the database with a circumference of 45: https://overpass-turbo.eu/s/1JUU. Osmose could suggest to check them and

  1. delete the value if plainly wrong or
  2. fix 'circumference=45' to 'circumference=0.45' or 'circumference=45 cm'

Another check could be on height. Trees taller than Hyperion (tallest tree in the world with 116m) are likely to be errors.

@Famlam
Copy link
Collaborator

Famlam commented Apr 14, 2024

https://overpass-turbo.eu/s/1JWd
At least 62638 trees worldwide affected by the circumference limit of 43m (excluding those with units or decimals).

I suspect this might be interesting for JOSM, for their numerical validation rules (which we synchronize with Osmose). That way it benefits more people ànd people who add those trees get a warning prior to uploading it in the first place.

Could you report it to them please?
If they decline, we can still add it to Osmose directly :)

@ivanbranco
Copy link
Author

Done here: https://josm.openstreetmap.de/ticket/23621#ticket

@sekerob
Copy link

sekerob commented Apr 19, 2024

Clicked on one where curiously the crown was given a lower value of 35 v 45. The JOSM tool with the measured values plugin gives good indication of crown size, seen many exceeding 150-200 m2. Maybe add a crown/trunk ratio test to home in further, venture to think if a mapper goes into mapping these, both will be tagged.

image

@Famlam
Copy link
Collaborator

Famlam commented Apr 19, 2024

I'm not a biologist, so I'm not sure if there's trees where it could be true (a cactus perhaps?). I played around a bit to get some stats though:

This mapcss rule that compares circumference with diameter_crown and warns if the latter is smaller than the former gives 62489 results, of which 17620 with a circumference <= 43m:
Big mistake, I had forgotten the factor π to convert diameter to circumference. With that included - updated below - there's only 1454 left, 1039 with a circumference < 43m (May 19 numbers). Given that we'd actually need to take a margin (trees aren't perfect cyclinders), the relevant number will likely be much less.

node[circumference][diameter_crown][to_float(tag("circumference")) > 3.15*to_float(tag("diameter_crown"))] {
  throwWarning: tr("circumference larger than diameter_crown");
}

This mapcss rule finds (I think) all 73369 trees with a circumference > 43 m. Still excluding trees measured in feets, inches & other uncommon units of course.

node[circumference=~/^([1-9][0-9]{2,}|[4-9][0-9])(\.[0-9]+)?( ?m)?$/][circumference!~/^4[0-3]/] {
  throwError: tr("TEST: circumference of new world record");
}

@ivanbranco
Copy link
Author

ivanbranco commented Apr 23, 2024

Another idea I had (I created a MaprouletteChallenge here: https://maproulette.org/browse/challenges/44817) is to check for invalid species. Looking for species without a space " " would be enough (tree species are formed by two words), this would flag elements such as:

species=UNKNOWN, this could be deleted
species=oak, this is the english name of the genus, not the species, should be changed in genus=Quercus (+genus:en=Oak eventually)
species=Quercus_suber, here an underscore was used, fix it in "species=Quercus suber"
species=., just delete it
species=Abies, again, this should be changed in genus=Abies

@frodrigo
Copy link
Member

Another idea I had (I created a MaprouletteChallenge here: https://maproulette.org/browse/challenges/44817) is to check for invalid species. Looking for species without a space " " would be enough (tree species are formed by two words), this would flag elements such as:

Note, there is already one, but limited to french. https://github.com/osm-fr/osmose-backend/blob/dev/plugins/TagFix_Tree_Lang_fr.py

@ivanbranco
Copy link
Author

ivanbranco commented Apr 23, 2024

Another idea I had (I created a MaprouletteChallenge here: https://maproulette.org/browse/challenges/44817) is to check for invalid species. Looking for species without a space " " would be enough (tree species are formed by two words), this would flag elements such as:

Note, there is already one, but limited to french. https://github.com/osm-fr/osmose-backend/blob/dev/plugins/TagFix_Tree_Lang_fr.py

Cool!

Species could also be used to suggest leaf_type and leaf_cycle. I created a list with the most popular (in OSM database) trees here: https://wiki.openstreetmap.org/wiki/Tag:natural%3Dtree/List_of_Species
My hope is that someday one QA tool would, for example, flag a species=Acer pseudoplatanus with "leaf_type=broadleaved and leaf_cycle=deciduous are missing, consider adding them" or "This tree is tagged as "Acer pseudoplatanus", but the current leaf_type is needleleaved. Species or leaf_type are wrong, check and fix it". But maybe I'm going to far :p

@Famlam
Copy link
Collaborator

Famlam commented Apr 24, 2024

But maybe I'm going to far :p

It sounds like an interesting thing to implement!
I would however recommend filing this as a separate issue as this single issue is already about 3 different feature requests (big circumferences, circumference vs diameter_crown, and now this one) ;)

Famlam added a commit that referenced this issue May 17, 2024
Famlam added a commit that referenced this issue May 17, 2024
Famlam added a commit that referenced this issue May 18, 2024
Implements the request at #2200 (comment)

See PR discussion about semi_deciduous/semi_evergreen exclusion
@Famlam
Copy link
Collaborator

Famlam commented Jun 16, 2024

@ivanbranco the results of the check of species vs. leaf_*, based on the documented values for species on the wiki page, can be found here: https://osmose.openstreetmap.fr/nl/issues/open?item=3120&class=31201 (results are still updating)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants