openstreetmap / id-tagging-schema

🆔🏷 The presets and other tagging data used by the iD editor
ISC License
160 stars 163 forks source link

Use different surface field for sport pitches #336

Open boothym opened 2 years ago

boothym commented 2 years ago

At the moment when adding a surface to leisure=pitch, you need to scroll far down the surface field dropdown when trying to add common values like grass, artificial_turf, etc.

Could a different surface field be used which prioritises common pitch surfaces values?

matkoniecz commented 2 years ago

https://github.com/streetcomplete/StreetComplete/blob/7fcad22711e28da4866aeac42c9e89bd2dd81cd6/app/src/main/java/de/westnordost/streetcomplete/quests/surface/Surface.kt#L48-L55 may be useful

val PITCH_SURFACES = listOf(
    GRASS, ASPHALT, SAND, CONCRETE,
    CLAY, ARTIFICIAL_TURF, TARTAN, DIRT,
    FINE_GRAVEL, PAVING_STONES, COMPACTED,
    SETT, UNHEWN_COBBLESTONE, GRASS_PAVER,
    WOOD, METAL, GRAVEL, PEBBLES,
    ROCK
)

Note that values such as asphalt cannot be excluded as some are still appearing on actual leisure=pitch.

1ec5 commented 2 years ago

Right, in reality, asphalt- and concrete-paved surfaces are common for sports like basketball and baseball. paved and unpaved should probably remain because it isn’t always easy to tell a more specific surface from aerial imagery. (StreetComplete is aiming to be more precise in that regard.)

boothym commented 2 years ago

Yes, I'd seen StreetComplete have a different list of surfaces for the pitch quest. Their list above is basically the most common combinations from what I can see on taginfo:

97.4k grass 41.8k asphalt 38.8k sand 28.1k concrete 24.5k paved 18.4k artificial_turf 18.2k clay 11.2k tartan 3.3k dirt 1.8k unpaved

Is there a way to automatically get the most common surface + leisure=pitch combinations, or does it just have to be ordered manually?

1ec5 commented 2 years ago

Yes, the taginfo API does have a method for retrieving the combinations, which iD would have to filter down to surface=*. I think schema-builder would have to add an option for the field to suggest combinations with a certain tag. Since this combination list includes a wide enough variety of surfaces, maybe hard-coding it wouldn’t be so bad either.

matkoniecz commented 2 years ago

https://taginfo.openstreetmap.org/tags/leisure=pitch#combinations

or overpass api with out count;

boothym commented 2 years ago

Whoops, I had a look at the UK taginfo and there was only one page, then didn't notice there was 7 pages on the global version 😅

In which case the 16 most popular pitch surfaces could be added manually?