-
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added valves quest #644
Added valves quest #644
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
From my point of view, the Quest is ready for review. I have tested it myself and it works well. |
Almost forgotten: The three pictures with the dark blue background are copyrighted. The author from Austria consents to their use with reference to the license, his name and his website. Is this sufficient via the authors.txt? Or should the name be written on the image? Or should I write to the author personally and ask? |
This comment was marked as resolved.
This comment was marked as resolved.
https://www.schwalbe.com/clik-valve-ventil/ |
Co-authored-by: Holger Jeromin <mailgithub@katur.de>
|
@HolgerJeromin (Off-Topic): I created the wiki page for valves. I could also include the new Schwalbe Clik valve, but I wanted to make sure that you would also have captured it with |
@mcliquid Good question. |
Yes, I'd suggest making a poll at https://community.openstreetmap.org/c/general/tagging/70 what people would prefer (and link to that community discussion here and on wiki talk page) |
Let's see how things will develop. Not relevant for this PR right now :) |
app/src/main/java/de/westnordost/streetcomplete/quests/valves/ValvesItem.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/de/westnordost/streetcomplete/quests/valves/ValvesItem.kt
Outdated
Show resolved
Hide resolved
getMapData().filter("nodes, ways with amenity = compressed_air or service:bicycle:pump = yes or compressed_air = yes") | ||
|
||
override fun applyAnswerTo(answer: List<Valves>, tags: Tags, geometry: ElementGeometry, timestampEdited: Long) { | ||
tags["valves"] = answer.joinToString(";") { it.osmValue } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think sorting the values could be useful?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question, there are already all possible combinations in taginfo. I guess a consuming app will have to extract the values anyway. As far as I can see there are only the Orchard Produce and the Sports Quest with multi-value answers, and neither does sort the values. Would it be easy to implement?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I too see no benefit to sorting...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be easy to implement?
should be answer.sortedBy { it.osmValue }.joinToString(";") { it.osmValue }
There is no benefit for consumers checking for specific valves, but e.g. if SCEE ends up being the most used editor for this tag (and thus values being mostly sorted), it could make reading a list as posted by @mnalis a little easier.
Is it possible to make the images a little smaller, so this quest doesn't add another ~700 kB to apk size? |
Sure, I completely misunderstood the image sizes here: https://github.com/streetcomplete/StreetComplete/blob/master/CONTRIBUTING_A_NEW_QUEST.md#new-photos I thought if it says 384px for three columns then it's 1152px for two columns, but it's for one. So instead of 1152px it should be 576px. Fixed that! |
Also, passing images through some optimizer reduces the size significantly more, for basically no quality loss. Using gimp with jpeg quality set to 50% (and few advanced options like non-progressive arithmetic coding with 4:2:0 subsampling), can produces JPEG files of just 12138 bytes, with extremely tiny differences which do not impact the usability at all, like . That is over 65% size reduction compared to original images. Can you @mcliquid save in such optimized format, or would you like me to preprocess those images for you? |
Well, for this example in this PR, it seems iit slipped? e.g.:
Usually yes, but in my example 50% was fine too, with only very tiny changes.
Wow, it looks quite good even at 20%. Even while differences are detectable; that is not what we care about here -- we care about images being equally good for their function, and both of those images look equally good to me even on a desktop screen; I doubt I'd even be able to see the artifacts on mobile screen. So yes, I think this is much better, especially for 68% size reduction (to just 32% of original)!
Definitely not in this PR, I'd say. But I'd say please do for all images this PR introduces (taking care they don't degrade visually too much to become ugly, of course). And probably not in SCEE (Idea is to try to keep as much common base as possible with upstream, to reduce merge issues). But I think it should be suggested in upstream as it would benefit equally well (assuming images there are equally unoptimized as ones in this PR); but the bigger issue with replacing all images is that each image should be checked whether there is noticeable degradation before replacing it. And "how to optimize image size" should be mentioned in instructions at https://github.com/streetcomplete/StreetComplete/blob/master/CONTRIBUTING_A_NEW_QUEST.md#new-photos (but also as new PR at upstream) |
JFYI https://squoosh.app/ |
To get back to the topic and not get any further off-topic here:
|
app/src/main/java/de/westnordost/streetcomplete/quests/valves/AddValvesForm.kt
Outdated
Show resolved
Hide resolved
* general advice about reducing file size manually * mention online tools to simplify size/quality comparison from discussion at Helium314#644 (comment) * emphasize playing with quality, without recommending exact values * mention online SVGOMG * mention GIMP * do not mention values at all
Fixes streetcomplete#4450
TODO: