html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue
https://github.com/pydata/xarray/issues/2288#issuecomment-405166458,https://api.github.com/repos/pydata/xarray/issues/2288,405166458,MDEyOklzc3VlQ29tbWVudDQwNTE2NjQ1OA==,10050469,2018-07-16T07:23:53Z,2018-07-16T07:23:53Z,MEMBER,"Correct me if I'm wrong, but from the xarray side it would already be enough if there is a way in xarray to have a special ``crs`` attribute which is preserved by all operations. What the ``crs`` really is shouldn't bother xarray, and it can be specific to the downstream library [1]. With a crs and xarray's coordinates the geoloc can be sorted out in almost all cases, right?
The solution currently is to store ``crs`` as a [scalar coordinate]( [comment](https://github.com/pydata/xarray/issues/1271#issuecomment-280574680)) as mentioned above.
What could also be a possibility (without knowing how the internals would look like) is to have a registry of ""special attributes"" names which would always be preserved by xarray's operations. This registry would live in xarray and can be updated by downstream libraries and/or accessors. (xref: https://github.com/pydata/xarray/issues/1614 ).
[1] : my preference goes for a simple PROJ4 string ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,341331807
https://github.com/pydata/xarray/issues/2288#issuecomment-405106421,https://api.github.com/repos/pydata/xarray/issues/2288,405106421,MDEyOklzc3VlQ29tbWVudDQwNTEwNjQyMQ==,10050469,2018-07-15T17:42:21Z,2018-07-16T07:18:44Z,MEMBER,"This has been discussed from time to time, although not in such an extensive way: thanks!
For me, the long list of discussion points that you mention is a clear argument for a dedicated package which will have to solve all these issues. A good example of difficulty to tackle is the fact that geo libraries often do not use the same standards (see the [incompatibility](https://github.com/SciTools/cartopy/issues/813) between ``pyproj`` and ``cartopy.crs`` objects as a striking example).
Regarding the xarray side: I also brought this up for my own geo-lib a while ago, and it seems that the cleanest solution to carry a ``crs`` info is to store it as (scalar) coordinate instead of an attribute, which are lost in arithmetic computations (see @shoyer 's [comment](https://github.com/pydata/xarray/issues/1271#issuecomment-280574680)).
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,341331807
https://github.com/pydata/xarray/issues/2288#issuecomment-405113116,https://api.github.com/repos/pydata/xarray/issues/2288,405113116,MDEyOklzc3VlQ29tbWVudDQwNTExMzExNg==,10050469,2018-07-15T19:39:28Z,2018-07-15T19:39:28Z,MEMBER,geopandas would be a great template for a geoxarray package ;-),"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,341331807