-
Notifications
You must be signed in to change notification settings - Fork 119
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
Add crop to landuse #1926
base: master
Are you sure you want to change the base?
Add crop to landuse #1926
Conversation
I'm fine including this at zoom 15+, but not at earlier zooms as it'll prevent landuse merging. https://wiki.openstreetmap.org/wiki/Key:crop So in addition to adding it, you need to drop it at lower zooms. And we should document the typical values (and even whitelist them). |
Ok, sure, but I am not sure how to add write it so it will be included only in zoom 15+. How can I do this? |
I anticipate adding comments to this and other PRs on Wednesday. |
Ok, I understand. Thank you a lot for your patience with me :). |
You can drop from low zooms by adding |
Whitelisting and remapping values: Use this for example of whitelisting AND remapping values:
For crop values that have at least 200 instances (per TagInfo), and aren't funky:
Ones that are funky and need to be remapped (using the WHEN syntax in the above example):
Some of the other ones are really other landuse types (eg orchard with tree tags), we'll ignore them completely and treat them as untrapped tagging errors. |
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.
Please see comments about adding crop as kind_detail
on farmland, and remapping.
Also add test and documentation.
For test, use this one as a pattern: vector-datasource/integration-test/1588-quay-wharf-other-sort-rank.py Lines 63 to 86 in 5a64d33
Here's a legit rice paddy: So it'd be more like:
|
Hopefully I have changed it as you requested. |
The CI errors are related to:
We likely need to escape that value. |
Hm actually, I am not sure how to do this in Python. |
The rest of the string inputs are unicode right? Maybe this would work?
|
Hi @rmarianski thank you, I have changed it, but still the same output in the Circle. |
Hmm, the escaping didn't work. @rmarianski @iandees any suggestions here? There's a decent number of usages for those 2 forms so it'd be nice to include their remapping here. |
Says flake8:
|
Also, this should be in a new test file, not this test file
Good news: tests run now! Bad news:
Overall, we're almost there. I'll let Circle run tests again to confirm the updated test works. |
Ok, I can create a new test file, but could I ask you for explanation of the rules for creating names for test files? As of now, I don't know how to name that file. |
The new test passed! (We can ignore the unrelated test failures here) To make a new file, just name it: The general convention is to name it after the issue or PR number, and some descriptive text. |
@nvkelso Done. But tests are failing, I suspect that this is what you explained in previous comment: "There are unrelated OSM data changes causing some other existing tests to fail. That's beyond the scope of this PR but should be addressed before next release." |
@nvkelso is there something I can fix here in order for this PR to be merged? |
@rwrx Good to hear from you! Most our changes in the v1.9 milestone have been focused on reducing tile size and extending support for disputed boundaries. This PR would unfortunately increase tile size. I'd like to get it merged, but I think it needs to be paired with #2025, which would split all the "natural" landuse kinds over to it's own dedicate layer (which is also a breaking v2.0 change) so the size increases could be isolated and optional. In the meantime, can you bring this branch up to date, please? That'll make it much easier to reason about – I can review w/r/t the low and mid zoom tile size reduction configs, and I can extend #2025 to also consider this PR. |
I left comments in the other PRs. Thanks for dusting them off! :) |
No, please update this PR so it's mergeable after v1.9 is tagged and before v2.0 is tagged. Then #2025 will be limited in scope to a refactor instead of also bringing new features in. |
I have updated this PR. I hope that now it is ok. |
Add crop to landuse