OpenStreetMap logo OpenStreetMap

Removing quantity= tags from pitches in the San Francisco Bay Area

Posted by spughetti on 23 April 2023 in English. Last updated on 1 October 2023.

I haven’t used this diary up until now, but better late than never! Figured it was time to start logging my mapping projects. :)

One of the first things I noticed when I was starting to map sport pitches in the Bay Area was the use of the quantity= tag. It was often used to map multiple pitches under one area instead of mapping each pitch individually. I’ve also seen it used to note how many of the same pitches were near each other. For example 3 basketball courts next to each other would all have a quantity=3 tag. Although I’ve seen the latter usage far less.

Mapping multiple pitches under one area makes the map less accurate, as the leisure=pitch tag is only supposed to be used for one pitch.

I’ve been fixing pitches mapped with this tag for a while when I came across them. But yesterday I learned how to use overpass turbo and now I’m able to find every pitch using the quantity= tag far more easily. I’ve been spending last night and today fixing every pitch with a quantity= tag and plan to finish fixing them in the next few hours.

Example

These 3 tennis courts were all mapped out using one tennis court area with a quantity=3 tag. In order to fix this I swapped out the leisure=pitch tag for a landuse=recreation_ground tag to turn the area into a recreation ground.

I then swapped the quantity=3 tag for a courts=3 tag, which in contrast to the quantity= tag is a registered tag on the OSM wiki.

Lastly I mapped each individual tennis court. In this case I also added a barrier=fence tag to the recreation ground.

Example image

The end result looks much cleaner, and is also more accurate. You can find the courts here!

Location: Civic Center, South of Market, San Francisco, California, 94102, United States

Discussion

Comment from mboeringa on 23 April 2023 at 14:14

I think tagging it as leisure=sports_centre is more appropriate than landuse=recreation_ground. A sport centre tagged facility does not have to be a building in OSM, it can be outdoor:

osm.wiki/Tag:leisure%3Dsports_centre

From what I’ve seen, the most established use for landuse=recreation_ground is (parts of) public parks which contain some facilities like a small sandy beach next to a small lake contained in the park, mowed and maintained grass fields to get a tan or pick-nick, some outdoor training gear, or e.g. public toilets.

Comment from spughetti on 23 April 2023 at 14:38

Hey mboeringa,

Great suggestion! I was under the impression that leisure=sports_centre was only used for buildings, I’ll start replacing the recreation ground tags soon.

Thank you for your comment! :)

Comment from kucai on 24 April 2023 at 03:14

I would just map 3 leisure pitches = tennis and be done with that. I like simple stuff :)

Comment from mboeringa on 24 April 2023 at 08:21

You probably meant to suggest “leisure=pitch” & “sport=tennis” as the correct tagging ;-)

Comment from :wq on 24 April 2023 at 12:04

Thanks for posting that. I would occasionaly hear about overpass turbo, but never tried using it. Turns out it’s easy to use and gives very useful output.

Comment from SK53 on 25 April 2023 at 18:46

Both leisure=sports_centre and landuse=recreation_ground tags have meant many things to many people over the years. Originally I presume the first was meant for the kind of place with both outside pitches and indoor facilities and often multi-sport (often called leisure centres when publicly owned in the UK), whereas the second gradually subsumed a tag leisure=playing_field, but was at the outset meant for areas with lots of pitches, whether for several sports or the facilities of a single club.

Recreation ground has come to mean something akin to landuse=leisure, whereas leisure=sports_centre has broadened it’s meaning to mean any place dedicated to one-or-more sports. In general a broadening of tag semantics usually means that another tag needs to be created to restore the ability to identify things which had the original meaning.

Back to the post. Mapping multiple pitches as one is an entirely reasonable thing to do, particularly if they are mapped as a side activity to the original intent. It is however always useful to add some information about the actual number of items: quantity obviously does this, but may to too general, courts is probably too specific as it can’t be applied to any old pitch. Long ago I suggested pitch:count which provides a fairly generic way (i.e., key=tag, tag:count=#) to provide a count when multiple objects are mapped as one (tennis courts are undoubtedly the major example, but bollards are too).

You can also look for tennis courts which are unfeasibly large with overpass-Turbo, in which case you may find areas with no indication that multiple pitches are involved.

Comment from spughetti on 25 April 2023 at 20:09

Hey SK53!

I disagree, I don’t think the leisure=pitch tag was ever meant for more than one pitch, mapping each pitch individually is more accurate and makes the data more accessible. Say if someone were to try and find out how many tennis courts there are in San Francisco using overpass turbo without taking the quantity= tag into account. They’ll get an accurate result now, where as to before all those tennis courts that were mapped using one pitch area would’ve shown up as one court in the datamine. I’ve demonstrated said datamine here!

Comment from SK53 on 28 April 2023 at 13:13

@publicerination: I had a look at how tennis courts are mapped in Great Britain and more than half are not single courts. Lejun has just posted a follow-up showin how to do the same kind of analysis directly in R.

Comment from Minh Nguyen on 30 April 2023 at 16:11

I’m curious if folks would recommend also mapping a single fenced-in court as a pitch surrounded by a leisure=sports_centre. Otherwise it’s kind of inconsistent to map some courts along the out-of-bounds line and others at the edge of the pavement.

Comment from SK53 on 30 April 2023 at 16:38

@Minh Nguyen: Not sure if any consensus was even reached vis-a-vis the marked vs. actual playing area. When only one court of the three down the road is in use people can make use of the full extent (should their skills allow).

Another question I had was “What surface is used for hard courts?”, which AIUI are not usually asphalt these days. And related to your question: if using the info for things like calculating surface run-off from sealed surfaces the marked court area gives the wrong impression.

Comment from LivingWithDragons on 6 May 2023 at 08:15

Could it be that quantity=* is from an import, or from when there was lesser quality aerial imagery. So only possible to outline the larger area, but some ground survey/knowledge or authority records were able to specify how many courts are available.

If so, I see this as part of the design of OpenStreetMap. Limited quality data has been put into OSM but it is better than nothing. That data can be improved/replaced when better knowledge/skills/sources become available. As you’ve demonstrated, the initial data is even helpful to finding where there is ability to improve OpenStreetMap.

Keep up the good work, and thanks for sharing!

Comment from spughetti on 6 May 2023 at 10:20

Hey LivingWithDragons,

I hadn’t considered that, it could definitely be the case. Thank you for your comment!

Log in to leave a comment