You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you read the documentation of HydroMT, different data types are explained as a clear entity in HydroMT.
These data types are not represented as a different entity in the code:
A rasterdataset, dataset and geodataset are all represented by a xr.Dataset with different properties (and the vector and raster accessors defined in the gis submodule. A dataframe is a pd.DataFrame and a geodataframe is a gpd.GeoDataFrame.
This makes the signatures of different functions hard to use. Different methods should live close to the data are now part of different classes in HydroMT. Examples include:
mosaicking in a rasterdataset, get_bbox, get_timerange and all different utility methods now spread throughout the code.
I propose to have different data classes that we use in the code. I know that the rasterdataset is not implemented as an xarray accessor: https://docs.xarray.dev/en/stable/internals/extending-xarray.html, but a thin wrapper that gives us a clear what methods there are and which arguments are valid will help keep the code maintainable.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
If you read the documentation of HydroMT, different data types are explained as a clear entity in HydroMT.
These data types are not represented as a different entity in the code:
A
rasterdataset
,dataset
andgeodataset
are all represented by axr.Dataset
with different properties (and thevector
andraster
accessors defined in thegis
submodule. Adataframe
is apd.DataFrame
and ageodataframe
is agpd.GeoDataFrame
.This makes the signatures of different functions hard to use. Different methods should live close to the data are now part of different classes in HydroMT. Examples include:
mosaicking in a
rasterdataset
,get_bbox
,get_timerange
and all different utility methods now spread throughout the code.I propose to have different data classes that we use in the code. I know that the
rasterdataset
is not implemented as an xarray accessor: https://docs.xarray.dev/en/stable/internals/extending-xarray.html, but a thin wrapper that gives us a clear what methods there are and which arguments are valid will help keep the code maintainable.Beta Was this translation helpful? Give feedback.
All reactions