-
Notifications
You must be signed in to change notification settings - Fork 12
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
Improve oe_get_keys #257
Improve oe_get_keys #257
Conversation
The warning message is triggered when one or more keys were already extracted from the other_tags field
These look like really nice changes. |
# ) | ||
|
||
# Therefore, I try to prefer the .gpkg files. The only problem is that | ||
# some of the keys might be excluded from the other-tags field in a .gpkg |
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.
True that.
|
||
# Therefore, I try to prefer the .gpkg files. The only problem is that | ||
# some of the keys might be excluded from the other-tags field in a .gpkg | ||
# file, so I will add a warning message. |
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.
How about adding to the warning message to re-convert, e.g. with
if (any(existing_fields %!in% default_fields)) {
warning(
"The following keys were already extracted from the other_tags field: ",
paste0(setdiff(existing_fields, default_fields), collapse = " - "),
"You can try again with force_vectortranslate = TRUE",
call. = FALSE
)
}
R/get-key-values.R
Outdated
if (layer %!in% sf::st_layers(zone)[["name"]]) { | ||
stop( | ||
"The matched file does not contain the selected layer. ", | ||
"Check the examples in the docs to see how to add it.", |
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.
Worth adding this line below?
"You can try again with force_vectortranslate = TRUE",
Thanks, done! |
Fix #251. The result of the following commit is summarised below:
Created on 2022-05-06 by the reprex package (v2.0.1)
other-tags
fieldCreated on 2022-05-06 by the reprex package (v2.0.1)
I will write the tests after we merge #255