Replies: 1 comment 1 reply
-
Thanks for the suggestion! This will probably be solved once we refactor to TorchData (composition instead of inheritance). No timeline for this at the moment, but it's something I want to explore this fall. @calebrob6 actually wanted to get rid of |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
GeoDatasets (RasterDataset and VectorDataset) both have attributes for finding/parsing files, e.g.
Where the index is then built in
__init__
using these attributes. It looks like the preferred way to override these attributes is to create a subclass, e.g.I think it would be useful to allow overriding these attributes on initialization, e.g.
I'm using a number of different datasets that are small variations on a Raster/VectorDataset, so instead of writing classes for each, I've added a dynamic attribute override in GeoDataset (see diff):
Of course, this could be done in a less dynamic, and probably safer, way such as listing out all attributes in RasterDataset/VectorDataset. But in any case, I think this would allow torchgeo to work with a greater variety of raw datasources without requiring the users to write their own classes for each source.
Beta Was this translation helpful? Give feedback.
All reactions