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
for a dataset without an existing spatial_ref, this will create a new spatial_ref variable with no attrs. This is confusing because if the spatial_ref variable was present, those existing attrs will be preserved (and possibly out-of-date).
I think it would be good to be consistent here --- either the spatial ref always has attributes (kept in sync with the index) or it never has attributes.
Agreed. It is possible to always have attributes kept in sync with the index (by implementing CRSIndex.create_variables()). However, we would need to choose and stick with one set of conventions for the attributes, and we would need to handle that in .proj.write_crs_info().
We should also check for conflicts between the CRS passed as an option and any existing attribute of an existing spatial_ref (I don't think we're doing it currently).
Activity
benbovy commentedon Jun 30, 2025
Agreed. It is possible to always have attributes kept in sync with the index (by implementing
CRSIndex.create_variables()). However, we would need to choose and stick with one set of conventions for the attributes, and we would need to handle that in.proj.write_crs_info().We should also check for conflicts between the CRS passed as an option and any existing attribute of an existing
spatial_ref(I don't think we're doing it currently).dcherian commentedon Jun 30, 2025
Another confusing one is when there is no
spatial_refvariable, it is created with no attributes.