Skip to content

Blacklist polygon rules should be treated as "all" in whitelist pass#57

Merged
rapkin merged 2 commits into
aspectumapp:masterfrom
jwheare:patch-1
Mar 4, 2026
Merged

Blacklist polygon rules should be treated as "all" in whitelist pass#57
rapkin merged 2 commits into
aspectumapp:masterfrom
jwheare:patch-1

Conversation

@jwheare

@jwheare jwheare commented Feb 27, 2026

Copy link
Copy Markdown
Contributor

My understanding of blacklist rules is they are effectively "all with exceptions". The exceptions are handled in the first blacklist pass, so the second pass should treat them as all.

Example that should be a polygon (natural=water) https://www.openstreetmap.org/way/9641206

there is a natural=* tag and its value is not any of: no, coastline, cliff, ridge, arete nor tree_row;
https://wiki.openstreetmap.org/wiki/Overpass_turbo/Polygon_Features

@jwheare

jwheare commented Feb 27, 2026

Copy link
Copy Markdown
Contributor Author

The failing test appears to be due to highway being both a blacklist and a whitelist. The blacklist seems redundant if there's already a whitelist.

@jwheare

jwheare commented Feb 27, 2026

Copy link
Copy Markdown
Contributor Author

I see now why there's the extra blacklist for highway. I've pushed a better fix with test for the issue I'm seeing. All tests should now pass.

This involves an extra loop through the polygon features list in the second pass for blacklists.

@rapkin

rapkin commented Mar 4, 2026

Copy link
Copy Markdown
Collaborator

Thank you for your work, this is looking good!

@rapkin rapkin merged commit 7f6d00d into aspectumapp:master Mar 4, 2026
20 checks passed
@jwheare jwheare deleted the patch-1 branch March 4, 2026 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants