Open
Description
A tentative API for all CRS specific operations:
-
Dataset.proj.assign_crs(...)
: (re-)set a CRS without data transformation- create the spatial reference coordinate if it doesn't exist yet
- see Method name for setting a CRS #3
-
Dataset.proj.guess_crs(...)
: try setting a new CRS from the metadata of an existing spatial reference (scalar) coordinate. -
Dataset.proj.to_crs(...)
: set a new CRS with data transformation (re-projection) -
Dataset.proj.write_crs_info(...)
: add metadata to a spatial reference coordinate given some "flavor"- e.g., CF grid mapping attributes,
crs_wkt
, etc. - Accessor: add methods to write or clear CRS info #20
- e.g., CF grid mapping attributes,
-
Dataset.proj.clear_crs_info(...)
: remove metadata from a spatial reference coordinate
Alternatively we could expose the same functionality through fewer methods, e.g., assign_crs
would guess the CRS from coordinate metadata if no CRS is given, assign_crs
may also write metadata depending on a keyword argument, etc. I think I prefer the suggestion above, though (more methods with limited scope and clean API).
We should probably avoid being too opinionated here about how CRS is represented in metadata, but since pyproj
supports many formats it would make sense for xproj
(= Pyproj Xarray wrapper) to provide convenient API like guess_crs
, write_crs_info
and clear_crs_info
.
Metadata
Metadata
Assignees
Labels
No labels