Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Allow to chain add_osm_feature/s function calls #299

Merged
merged 6 commits into from
Feb 2, 2023

Conversation

jmaspons
Copy link
Collaborator

@jmaspons jmaspons commented Jan 3, 2023

Make add_osm_feature(s) do the proper AND and OR additions to the osm feature filters

Before the patch:

  • add_osm_feature collapse features from add_osm_features if called first
  • if add_osm_feature is called first, features get eliminated after calling add_osm_features

After:

  • add_osm_feature add features to each item from opq$features
  • add_osm_features add features to the opq$features vector with new items

Bonus: features parameter now is parsed using paste_features which allow
to pass more than one value for each list item

Before the patch:
* add_osm_feature collapse features from add_osm_features if called first
* if add_osm_feature is called first, features get eliminated after calling add_osm_features

After:
* add_osm_feature add features to each item from opq$features
* add_osm_features add features to the opq$features vector with new items

Bonus: features parameter now is parsed using paste_features which allow
to pass more than one value for each list item

# Conflicts:
#	R/opq.R
Useful if the code is reran
@jmaspons
Copy link
Collaborator Author

Ready for review @mpadge

@jmaspons
Copy link
Collaborator Author

jmaspons commented Feb 1, 2023

All green now, @mpadge

@mpadge
Copy link
Member

mpadge commented Feb 2, 2023

Great, thanks @jmaspons 😀

@mpadge mpadge merged commit cbbb59e into ropensci:main Feb 2, 2023
@jmaspons jmaspons deleted the add_osm_feature branch February 2, 2023 09:58
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants