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

ENH: improve handling of string passed for columns parameter in e.g. copy_layer #523

Open
theroggy opened this issue Apr 8, 2024 · 0 comments
Labels
good first issue Good for newcomers

Comments

@theroggy
Copy link
Collaborator

theroggy commented Apr 8, 2024

Now this is treated as any other iterable, requesting columns for each character in the string.

Easiest for the user would be that a single string is also supported and is treated that there is only one column to be retained, so everywhere before a columns - like columns is used put something like this:

if isinstance(columns, str):
    columns = [columns]

In practice this will have to end up on several places:

  • _ogr_util.vector_translate
  • fileops._append_to_nolock
  • _geoops_sql._single_layer_vector_operation
  • _geoops_sql._two_layer_vector_operation
  • _geoops_gpd._apply_geooperation_to_layer
  • _geoops_gpd.dissolve
  • ...?
@theroggy theroggy added the good first issue Good for newcomers label Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant