Skip to content

Add dedicated surface field for sport pitches#2079

Merged
tyrasd merged 9 commits intoopenstreetmap:mainfrom
Ambuj123554:add-surface-sport-pitch-field
Mar 19, 2026
Merged

Add dedicated surface field for sport pitches#2079
tyrasd merged 9 commits intoopenstreetmap:mainfrom
Ambuj123554:add-surface-sport-pitch-field

Conversation

@Ambuj123554
Copy link
Copy Markdown
Contributor

@Ambuj123554 Ambuj123554 commented Mar 17, 2026

Description, Motivation & Context

Related issues

Closes #336

What this PR does

Creates a new surface_sport_pitch field specifically for leisure=pitch
presets. 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

  • Added data/fields/surface_sport_pitch.json — new field using
    stringsCrossReference to inherit all translations from the existing
    surface field, with options reordered by frequency of use on sport pitches
  • Updated data/presets/leisure/pitch.json to use surface_sport_pitch
    instead of the generic surface field

Links and data

Relevant OSM Wiki links:

Relevant tag usage stats:

  • grass: 176,268 uses with leisure=pitch
  • sand: 74,541 uses with leisure=pitch
  • asphalt: 74,188 uses with leisure=pitch
  • concrete: 55,788 uses with leisure=pitch
  • artificial_turf: 46,867 uses with leisure=pitch
  • clay: 34,434 uses with leisure=pitch
  • paved: 33,280 uses with leisure=pitch
  • tartan: 24,506 uses with leisure=pitch
  • ground: 16,313 uses with leisure=pitch
    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.

image

Search

Searched "sport pitch" in edit mode — preset appears correctly with
the new surface field showing pitch-relevant surfaces prioritized.

image

Wording

  • American English
  • name, aliases (if present) use Title Case
  • terms (if present) use lower case, sorted A-Z

@github-actions
Copy link
Copy Markdown

🍱 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.

@Hufkratzer
Copy link
Copy Markdown
Contributor

Hufkratzer commented Mar 17, 2026

Relevant tag usage stats:
grass: 97,400 uses with leisure=pitch
asphalt: 41,800 uses with leisure=pitch
sand: 38,800 uses with leisure=pitch
concrete: 28,100 uses with leisure=pitch
artificial_turf: 18,400 uses with leisure=pitch
clay: 18,200 uses with leisure=pitch
tartan: 11,200 uses with leisure=pitch
Source: https://taginfo.openstreetmap.org/tags/leisure=pitch#combinations

I wonder how you arrived at these numbers (and the resulting order). When I go to taginfo, I get different results:
taginfo

And I wonder why is it useful that the order (grass, artificial_turf, asphalt, sand ...) in the new field surface_sport_pitch differs from the statistics?

@Ambuj123554
Copy link
Copy Markdown
Contributor Author

Relevant tag usage stats:
grass: 97,400 uses with leisure=pitch
asphalt: 41,800 uses with leisure=pitch
sand: 38,800 uses with leisure=pitch
concrete: 28,100 uses with leisure=pitch
artificial_turf: 18,400 uses with leisure=pitch
clay: 18,200 uses with leisure=pitch
tartan: 11,200 uses with leisure=pitch
Source: https://taginfo.openstreetmap.org/tags/leisure=pitch#combinations

I wonder how you arrived at these numbers (and the resulting order). When I go to taginfo, I get different results: taginfo

And I wonder why is it useful that the order (grass, artificial_turf, asphalt, sand ...) in the new field surface_sport_pitch differs from the statistics?

Sorry about that — I used older data when writing the description.
Checked taginfo again and you're right, the correct order by actual
usage should be grass, sand, asphalt, concrete, artificial_turf, clay,
paved, tartan, ground. Updating the options array now to match this.

@Ambuj123554
Copy link
Copy Markdown
Contributor Author

Ambuj123554 commented Mar 18, 2026

@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
Copy link
Copy Markdown
Contributor

I like this order.

I would add woodchips at the end. We only have 185 pitch +woodchips in the database, but woodchips is also listed in the original surface field.

Perhaps the new field could also be used in the preset for leisure=track (?)
track

The additions to the field christian (babtist, ...) probablly do not belong to this PR, at least they are not explained above.

Comment thread data/presets/amenity/place_of_worship/christian.json Outdated
@Ambuj123554
Copy link
Copy Markdown
Contributor Author

@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!

Comment thread data/fields/surface_sport_pitch.json Outdated
@Ambuj123554
Copy link
Copy Markdown
Contributor Author

@matkoniecz done — artificial_turf is now right after grass.

@tyrasd tyrasd merged commit ed27fa0 into openstreetmap:main Mar 19, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use different surface field for sport pitches

5 participants