Description
from_template() returns a DataArray whose attrs carry res and crs (the EPSG int). The CRS units and the projection's human-readable name both follow from the EPSG code, but neither is surfaced, so a caller inspecting the result has to look them up separately.
Proposed change
Add two keys to the returned attrs:
crs_units: the unit of the CRS ("m" for projected templates, "degree" for country codes in EPSG:4326). This is the same value already attached to the x/y coordinate units.
crs_name: the projection's human-readable name, for example "NAD83 / Conus Albers" for EPSG:5070 or "WGS 84" for EPSG:4326.
The name is resolved through the existing two-tier CRS path (the LiteCRS built-in table first, then a pyproj fallback). For EPSG codes outside the built-in table when pyproj isn't installed, crs_name is left off rather than raising, so the default non-reproject path stays dependency-free.
Why
It makes the template result self-describing. Downstream code and notebooks can print or assert on the projection name and units without a separate pyproj lookup.
Description
from_template()returns a DataArray whoseattrscarryresandcrs(the EPSG int). The CRS units and the projection's human-readable name both follow from the EPSG code, but neither is surfaced, so a caller inspecting the result has to look them up separately.Proposed change
Add two keys to the returned
attrs:crs_units: the unit of the CRS ("m"for projected templates,"degree"for country codes in EPSG:4326). This is the same value already attached to thex/ycoordinateunits.crs_name: the projection's human-readable name, for example"NAD83 / Conus Albers"for EPSG:5070 or"WGS 84"for EPSG:4326.The name is resolved through the existing two-tier CRS path (the
LiteCRSbuilt-in table first, then a pyproj fallback). For EPSG codes outside the built-in table when pyproj isn't installed,crs_nameis left off rather than raising, so the default non-reproject path stays dependency-free.Why
It makes the template result self-describing. Downstream code and notebooks can print or assert on the projection name and units without a separate pyproj lookup.