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

Have option to create output path automatically + return it #97

Open
theroggy opened this issue Apr 13, 2022 · 2 comments
Open

Have option to create output path automatically + return it #97

theroggy opened this issue Apr 13, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@theroggy
Copy link
Collaborator

When writing a GIS analysis geofileops, an uninteresting part of the code is preparing output file names, while most of the time they are really "standard".

Having an automatic way of creating output file names + returning it would be more practical.

I like readable filenames, so ideally there is a logic in how the filenames are created, the only/main disadvantage is that the filenames can become (too!) long...
However, the user needs to still be able to specify a filename, so he can always overrule when the name becomes too long?

@theroggy theroggy added the enhancement New feature or request label Apr 13, 2022
@theroggy theroggy added this to the 0.5.0 milestone Apr 14, 2022
@theroggy theroggy self-assigned this May 18, 2022
@theroggy
Copy link
Collaborator Author

Based on meeting with Sven and Jan:

  • Automatic filename generation based on input file(s)
    • if 1 input file, take first 80 chars of input file + operation (eg. "_DISS" for dissolve) + numeric suffix if filename exists already + extension of input file.
    • if 2 input files, take first 40 chars of input1 file + operation (eg. "INTERS" for intersection) + take first 40 chars of input2 file + numeric suffix (eg. "_1") if filename exists already + extension of input file (if one of them is gpkg, gpkg, ortherwise ext of input1)
  • directory to use
    • if output_path is None: create tmp dir (%temp%/geofileops_tmp/00001/)+ generate filename as above
    • if output_path is a dir: use the dir + generate filename as above
    • if output_path is a dir: use the path (= current behaviour)
  • return output_path in all cases

@theroggy
Copy link
Collaborator Author

Remark: think about what to do with combination of force=True/False versus automatic name creation with existing name...

@theroggy theroggy modified the milestones: 0.5.0, 0.6.0 Jun 4, 2022
@theroggy theroggy removed this from the 0.6.0 milestone Aug 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant