-
Notifications
You must be signed in to change notification settings - Fork 408
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
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 |
Is this still a work in progress? We're preparing for a new release and trying to close out old issues/PRs. |
Thank you for following this up, I was on sabbatical during the original earlier pings and am no longer working for the org supporting the torchgeo dependent project, though i do still follow its changes. It might be worth checking quickly with @Pale-Blue-Dot-97 whether it's still a problem, but i'm in principle happy to close this with no action |
No response from @Pale-Blue-Dot-97. I'll close this PR for now, but let me know if it should be reopened. |
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.