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
Currently Dataset.proj("coord_name").crs can be used to access the CRS of either a spatial reference (scalar) coordinate or a CRS-aware indexed coordinate.
This could probably be extended to data variables as well, which may also be CRS-aware if they have spatial dimensions. Dataset.proj("data_var_name").crs could either return:
The CRS returned by Dataset.proj("spatial_ref_name").crs if Dataset["data_var_name"].attrs["grid_mapping"] == "spatial_ref_name" (as inspired by CF conventions)
Implicitly fallback to Dataset.proj.crs if there is a unique CRS
To set the CRS of a data variable we could reuse Dataset.map_crs(spatial_ref_name=["data_var_name"]), which will basically (re)set the "grip_mapping" attribute of the given data variable(s).
The text was updated successfully, but these errors were encountered:
I agree with setting the grid_mapping attribute. My general preference is to encourage users to annotate their data properly rather than rely on implicit behaviour.
I agree with your preference, instead of a fallback we could simply raise an error with some clear instructions in the message. Manually annotating data may be tedious, though. It would be nice if we could provide some API to help doing that in an automated but explicit way.
Currently
Dataset.proj("coord_name").crs
can be used to access the CRS of either a spatial reference (scalar) coordinate or a CRS-aware indexed coordinate.This could probably be extended to data variables as well, which may also be CRS-aware if they have spatial dimensions.
Dataset.proj("data_var_name").crs
could either return:Dataset.proj("spatial_ref_name").crs
ifDataset["data_var_name"].attrs["grid_mapping"] == "spatial_ref_name"
(as inspired by CF conventions)Dataset.proj.crs
if there is a unique CRSTo set the CRS of a data variable we could reuse
Dataset.map_crs(spatial_ref_name=["data_var_name"])
, which will basically (re)set the "grip_mapping" attribute of the given data variable(s).The text was updated successfully, but these errors were encountered: