add sauna theme #2382
No reviewers
Labels
No labels
Android-shell
awaiting feedback
awaiting fix confirmation
bug
enhancement
Help Wanted
high-priority
huge
low-priority
Meta
NLNet
OSOC21:Cycling-OVL
Performance
question
search-ui-enhancement
Studio
Tailwind
Themes
UI
upstream-issue
usertest
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MapComplete/MapComplete!2382
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "Osmwithspace/MapComplete:sauna"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
#2376
Opening a pull request on MapComplete
Hey! Thanks for opening a pull request on Mapcomplete! This probably means you want to add a new theme - if so, please
follow the checklist below. If this pull request is for some other issue, please ignore the template.
Adding your new theme
Thanks for taking the time to create your theme and to add it to the main repository!
To making merging smooth, please make sure that each of the following conditions is met:
are read and followed
@ -0,0 +20,4 @@"opening_hours",{"id": "charge_cost_rewritten","rewrite": {Wow, you are using a 'rewrite'-block. That is pretty neat
@ -0,0 +98,4 @@"source": {"osmTags": {"and": ["leisure~.*sauna.*",The 'source' is a bit weird. First of all,
leisure~.*sauna.*will give all items which have a substringsaunain the leisure key.Second, it seems like you are only selecting sauna's which have at least some item missing. This means that someone might add a sauna, fill out all details close MC. Upon reopening MC, the sauna they added will not show up again, as all information is known. This will cause them to add it again and to loose confidence in MapComplete, as "the data that they contributed dissappeared".
Keep in mind that MapComplete is not a todo app like streetcomplete, but also a 'browse OSM data'-app.
It's a very rare case, but I want to cover
leisure=water_park;saunafor example.No, it's the other way around.
leisure=saunaunfortunately has the problem that it's not clear whether it's a single sauna as part of a sauna area or an entire sauna area. Since I only want to display entire sauna areas, I filter in thesaunalayer byopening_hours,websiteorphone.Therefore, I want to prevent the addition of POIs in this theme.
I know that's not quite clean, but I think it's an acceptable way of dealing with the current situation.
There were 5
leisure=water_park;saunain OSM, I did retag them all. It happens that, when I make a theme, I do some initial data cleanup first too.Hmm, this is an interesting case. Your approach ain't foolproof, as someone might have tagged it on both the 'area' and the individual sauna parts.
Maybe an approach with loading the outlines of swimming pool facilities, water parks, ... too and then removing sauna's within such amenity (with some metatagging) might work. Could you link a few examples?
Also: how do we deal with private sauna's in someones backyard?
Oh, I didn't catch that. The MapComplete paradigm is to allow addition as much as possible too. Otherwise, I'll have an issue pretty soon stating "cannot add new sauna" ;)
So, I can exceptionally allow this, but only if all else fails.
For this I would need your help.
Here is an interesting example: https://www.openstreetmap.org/node/673997403
In the sauna_at_leisure layer I have an access question and then I exclude private ones. I could do this in the sauna layer as well.
I don't know how we could do this so that it's foolproof.
The first step is to creata a layer with sport facilities and load it in the theme.
Then, use the calculatedTags-feature - especially enclosing features in the sauna layer. You will be able to detect if it is within a swimming pool.
The last step is to use an (on by default) filter to hide them, or to steal information (e.g. opening hours) from the enclosing features.
@ -0,0 +120,4 @@"render": {"en": "{name}"}}Please, also add an
allowMoveblock. These aren't added by default in Studio, but it is required for official themes. It is also what caused the build to fail.The simplest way is to add
"allowMove": true@ -0,0 +86,4 @@]},"contact","defibrillator.defibrillator-fixme"You are reusing the 'fixme' for 'defibrillators'. This results in a question 'are there any other things you want to say about this defibrillator ?'. That is pretty confusing as this is about sauna's...
In general, I try to not use 'fixme' as it burdens more experienced mappers and tends to make that users just restate some facts that are already captured in a tag.
As far as i see, the sentences are not specific for defibrillators.
In fact, I'm not entirely happy with it either. I wanted to offer a way to make low-threshold posts/comments when you have reached the functional limits of the theme.
The dutch (
nl) one is ;)In any case, it is a bad habit of reusing this tagrendering from an unrelated layer. I propose you move the "fixme" into the "questions/questions.json"-file (and drop the dutch text). Then, you can reuse it.
Then maybe
note=*ordescription=*is more fitting? Anyway,fixme=*is acceptable as well if you insist. Related: #1678Those free text fields are also quite good indicators of what the functional limits are and serve as great inspiration for new questions.
I moved it
MapComplete/MapComplete@c7ec2e6cabI will review the 'sauna-at-amenity'-layer on, but might, in the meantime, also work on some code to make this type of question reuse easier (i.e. to automatically 'prefix' every key)
Another small issue (which causes the build to block) is that
sauna_at_leisureshould be in its own directory inlayers/sauna_at_leisureI've created a new way to reuse tagRenderings where you can set a prefix. It can be used as following:
This will import all questions from the sauna layer and modify all keys to have
sauna:in front of it. The only thing you still need to create is a question if there is a sauna.Again; highly experimental!
Congratulations! This PR been successfully built and has been deployed. It is (temporarily) available on https://builds.mapcomplete.org/2382
Allright, I've finally had the time to pick this up again and to have a look.
First of all, I've made a few tweaks and pushed it to your repo to have the build working. Furhtermore, I think I've also found a solution to your previous problem and a hole in the tagging. AFAIK, there are a few ways that sauna's can appear in the world:
IMHO, we were struggling earlier because we conflate the first (the physical sauna) and the last (the sauna as wellness amenity) concepts. I've had a look at some "sauna" near me (in Ghent), most of them are wellness salons also offering services as massages, silent room, a small swimming pool, jacuzzi, steam bath, bed&breakfast...
The other sauna=yes is in a large, public swimming pool.
Allright, I had another go at this PR, I think I've figured out how to handle this:
sauna_at_leisure.sauna_groupedto have a dropdown with those questions, withsauna_at_leisure.sauna_expandedto get the questions directly or as standalone layer in a theme, in which case it'll show just the block for everything that hassauna=yes.sauna-layer has those expanded questions + contact info etc, as you had it earliersauna_at_leisure.sauna_groupedblock to other layers (e.g. tourism_accomodation which includes hotels, sports_centre and beauty_shops)This way we can show sauna information on all supported categories (and have a fallback), yet without the need to whip up a 'wellness-salon' type.
There are still a few loose ends, e.g. a beauty salon tagged as 'sauna' cannot be corrected by the end user (and the distinction between 'massage salon', beauty salon, sauna, ... is often hard to make in the first place anyway)
Congratulations! This PR been successfully built and has been deployed. It is (temporarily) available on https://builds.mapcomplete.org/2382