Removal of sport=golf + leisure=pitch from golf=*

In the wiki for leisure=golf_course, it says

Do not use sport=golf or leisure=pitch.

I have come across enough of these for it to make sense to do an automated edit to remove them using an overpass query to get (way[golf!=driving_range][sport][leisure]; relation[golf!=driving_range][sport][leisure])with a total of 20,400+ features. It probably makes sense to exclude golf=driving_range from the query since those are not always within a golf course. Driving ranges would need a more manual edit.

Does it make sense to remove the tags or is their some reason the sport=* and leisure=* tags should be retained?

can you post share link to your overpass query?

From this post I do not get on which objects you want to perform your mass edit

Basically anything with golf=* + leisure=*+ sport=* … except golf=driving_range.

Surprisingly using golf!=driving_range takes a lot of resources and fails due to serverside RAM constraints. It is more efficient to use the query below (results on overpass turbo) and deal with it in JOSM.

(
  way[golf][sport][leisure];
  relation[golf][sport][leisure];
);
out geom;
// Below will be used when doing an import to JOSM.
// (._;>;); out meta;

With the results in JOSM, a search for golf=driving_rangeresults in the ways and relations to purge from JOSM. Then search for golf AND leisure=pitch AND sport=golf. The results of that search are the features to remove sport=golf + leisure=pitch from.

I am against catch-alls in such bot edits. This is asking for trouble with ATYL, for start.

This should be enumerated and limited to specific values.

2 Likes

Can you think of an actual error that your query would find?

Something like golf=hole; sport=golf is unnecessary, but not actually wrong.

Or am I misunderstanding what you are trying to fix? Can you give an example in OSM data?

1 Like

After filtering the overpass query in JOSM, it is limited to golf=* (excluding driving_range) + sport=golf + leisure=pitch. Only the exact features that go against what the wiki says would be left.

Can you think of an actual error that your query would find?

Something like golf=hole; sport=golf is unnecessary, but not actually wrong.

@SomeoneElse , add leisure=pitch and you have what I’m talking about. The wiki simply says “Do not to use” it. Other than that, I don’t know why it would is wrong. I haven’t seen any rendering issues. This is just something I have noticed a lot of while manually fixing golf courses. It would be a pretty simple automated edit if it does fix something.

Based on other comments in the wiki, it is starting to look like the wiki is wrong here??? So I think I’ll leave this tagging combination alone.

Ah - like this. Yes, I don’t think that it is correct to describe this golf green as a pitch. You’ll need to look for exceptions though (like these) to make sure that there aren’t any other issues. Those are driving ranges (and you mentioned those above) but there may be others elsewhere.

If you find tag A alongside tag B, and they have simply no business being tagged on the same item, then you don’t know if tag A, tag B or actually neither is correct until you’ve looked at the itsem in question.