-
Notifications
You must be signed in to change notification settings - Fork 294
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
Optional arguments to override RasterDataset's filenames #1524
base: main
Are you sure you want to change the base?
Conversation
@microsoft-github-policy-service agree company="Ordnance Survey" |
We've actually had a lot of users ask for this feature. I guess my only question is, why stop at My original thinking when I designed this was that I'd have to think more about your use case, but I think it's still possible to create subclasses on-the-fly with the new |
Thank you for the response @adamjstewart . In our case we have a You can see the current workaround for this issue here, if you're looking for usage flavours: https://github.com/Pale-Blue-Dot-97/Minerva/blob/bc6aa3433336a715d7bb0ef41404b6fe1c6773a4/minerva/datasets.py#L230 I can see the rationale for "why only filename_*" prompting contemplation of a redesign, this is intended as the smallest non-harmful change... |
Ping @metazool |
A project that we are collaborating on has a scenario here where it would be very useful to be able to set the
filename_glob
andfilename_regex
arguments to aRasterDataset
subclass when it's being initialised, rather than always depend on them being set as class attributes.In our scenario we could be creating a
PairedDataset
(aRasterDataset
subclass) out of many different, user-suppliedRasterDataset
types:This PR suggests a change to replace the class attributes for
filename_glob
andfilename_regex
with optional arguments, if they're set, plus a small associated test.