Skip to content
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

No "What can be left here for recycling?" for recycling containers mapped as way #5735

Closed
fxedel opened this issue Jul 10, 2024 · 5 comments
Closed
Labels

Comments

@fxedel
Copy link

fxedel commented Jul 10, 2024

An amenity=recycling with recycling_type=container may be mapped as a single node or as an area. While nodes are way more common (373 388) than ways/areas (10 977), there is definitely a good reason to map larger recycling container areas as an area, for example this one, which consists of 23 individual containers:

IMG_20240710_191819

The corresponding OSM way is: https://www.openstreetmap.org/way/1276097081

Of course, also areas should be enriched with the recycling:* tags to specify what can be recycled there.

How to Reproduce
Go to an recycling container area (any overlay is fine), no quest arises.

Expected Behavior
Quest "What can be left here for recycling?" should arise.

Versions affected
v58.2

Note: If I understand PR #4936 correctly, this already works for the glass recycling quest. The fix for all recycling containers could be similar.

@fxedel fxedel added the bug label Jul 10, 2024
@westnordost
Copy link
Member

Are you sure that it is not asked for recycling areas? Looking at the code, it certainly should. See #4907

@mnalis
Copy link
Member

mnalis commented Jul 10, 2024

Agree with the premise that it should be asked on a ways too, and it seems to me that it is asked on other ways, as cursory look at the code would suggest it should do:

class AddRecyclingContainerMaterials : OsmElementQuestType<RecyclingContainerMaterialsAnswer> {
private val filter by lazy { """
nodes, ways with
amenity = recycling
and recycling_type = container
and access !~ private|no
""".toElementFilterExpression() }

however I can confirm (in 58.1) that that it is not being asked on that specific way 1276097081 for some reason.

@mnalis
Copy link
Member

mnalis commented Jul 10, 2024

playing in SCEE, Quest is also not shown on way 1276097081, but if I edit that way to add any unrelated tag (like level=0), suddenly the quest pops up! Could be it related to element timestamp? There is this override which perhaps might influence it? :

override fun isApplicableTo(element: Element): Boolean =
/* Only recycling containers that do either not have any recycling:* tag yet or
* haven't been touched for 2 years and are exclusively recycling types selectable in
* StreetComplete. */
filter.matches(element) && (
!element.hasAnyRecyclingMaterials()
|| recyclingOlderThan2Years.matches(element) && !element.hasUnknownRecyclingMaterials()
)

small_Screen_Recording_20240710_220709_SCEE.mp4

@westnordost
Copy link
Member

Oh, I see the mistake. It's in line 36.

@fxedel
Copy link
Author

fxedel commented Jul 10, 2024

Thanks for the quick fix @westnordost! ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants