Add dedicated surface field for sport pitches#2079
Add dedicated surface field for sport pitches#2079tyrasd merged 9 commits intoopenstreetmap:mainfrom
Conversation
|
🍱 Your pull request preview is ready Please use this preview to check your changes. Ideally use the test documentation template and document your test results by commenting on the PR. This will speed up the review process for everyone. FYI, once this PR is merged, you can use the iD Editor Preview to test your changes in interaction with all other changes. |
I wonder how you arrived at these numbers (and the resulting order). When I go to And I wonder why is it useful that the order ( |
Sorry about that — I used older data when writing the description. |
|
@Hufkratzer @matkoniecz I've updated the options order based on the correct taginfo data and fixed the formatting. Would appreciate a review when you get a chance! |
|
@Hufkratzer @matkoniecz I've addressed both points — removed the accidentally included christian.json changes and added woodchips at the end of the options list. Should be ready for review now! |
|
@matkoniecz done — artificial_turf is now right after grass. |
Description, Motivation & Context
Related issues
Closes #336
What this PR does
Creates a new
surface_sport_pitchfield specifically forleisure=pitchpresets. The field prioritizes common pitch surfaces at the top of the
dropdown instead of showing all surfaces alphabetically, improving the
mapping experience for sport pitches.
Changes
data/fields/surface_sport_pitch.json— new field usingstringsCrossReferenceto inherit all translations from the existingsurfacefield, with options reordered by frequency of use on sport pitchesdata/presets/leisure/pitch.jsonto usesurface_sport_pitchinstead of the generic
surfacefieldLinks and data
Relevant OSM Wiki links:
Relevant tag usage stats:
Source: https://taginfo.openstreetmap.org/tags/leisure=pitch#combinations
Notes
Used GitHub Copilot for initial file structure assistance.
Test-Documentation
Preview links & Sidebar Screenshots
https://pr-2079--ideditor-presets-preview.netlify.app/id/dist/#locale=en&map=18.00/48.841708/2.587656
Tested the surface field on a Sport Pitch — options now appear ordered
by pitch usage frequency with grass first, followed by artificial_turf,
asphalt, sand, concrete, clay etc. instead of alphabetical order.
Search
Searched "sport pitch" in edit mode — preset appears correctly with
the new surface field showing pitch-relevant surfaces prioritized.
Wording
name,aliases(if present) use Title Caseterms(if present) use lower case, sorted A-Z