Skip to content

Implementation of CRS storage in rasterio with PROJ.4 & WKT #2723

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
snowman2 opened this issue Jan 29, 2019 · 10 comments
Closed

Implementation of CRS storage in rasterio with PROJ.4 & WKT #2723

snowman2 opened this issue Jan 29, 2019 · 10 comments

Comments

@snowman2
Copy link
Contributor

Continuation of the discussion from #2722 to move onto implementation details.

@snowman2
Copy link
Contributor Author

Tag: @fmaussion @djhoese

@fmaussion
Copy link
Member

Sorry for being late on this one. Yes, I agree that the "coordinate attribute" is worth a try.

To avoid redundancy in the name one could name the coord variable attributes simply wkt and proj4, like:

<xarray.DataArray 'crs' ()>
array(0)
Coordinates:
    crs          int64 0
Attributes:
    wkt:  PROJCS["UTM Zone 15, Northern Hemisphere",GEOGCS["WGS 84",D...
    proj4: +proj=...

@snowman2
Copy link
Contributor Author

snowman2 commented Feb 4, 2019

I definitely agree 💯 with you on avoiding redundancy. I actually had the same thought. However, part of the reason for using crs_wkt is motivated by CF 1.7 convention. I figured it was a small change that sacrifices redundancy for consistency across the community. The crs_proj4 name was just an attempt to be consistent with your original comment and the crs_wkt. But, I think renaming it to proj4 to remove redundancy is a good choice as well.

@snowman2
Copy link
Contributor Author

@fmaussion just a ping for what are your thoughts are for next steps on this?

@snowman2
Copy link
Contributor Author

snowman2 commented Feb 6, 2020

Going to close this as it is over a year old.

For reference, WKT support is in rioxarray.
https://corteva.github.io/rioxarray/stable/examples/crs_management.html

@snowman2 snowman2 closed this as completed Feb 6, 2020
@dcherian
Copy link
Contributor

dcherian commented Feb 6, 2020

@snowman2 @djhoese It'd be nice to update our docs to link to rioxarray and other relevant packages. (e.g. here https://xarray.pydata.org/en/stable/io.html#rasterio).

Adding an example on doing these manipulations would also be very welcome.

@snowman2
Copy link
Contributor Author

snowman2 commented Feb 6, 2020

Adding an example on doing these manipulations would also be very welcome.

What types of manipulations are you thinking about? Reprojection? Export to geotiff? Clip? Reading in files?

@fmaussion
Copy link
Member

I think we should seriously consider removing all rasterio logic in xarray and make rioxarray an optional dependency to read geotiff files with xarray.

@dcherian
Copy link
Contributor

dcherian commented Feb 6, 2020

@snowman2 Any/all of those "common operations" sounds good. We don't have a single geoTIFF example: https://xarray.pydata.org/en/stable/examples.html so at this point anything would be a big improvement

I think we should seriously consider removing all rasterio logic in xarray and make rioxarray an optional dependency to read geotiff files with xarray.

👍 Though maybe we should wait till the backends refactor is done so that things are a little more easy.

@snowman2
Copy link
Contributor Author

snowman2 commented Feb 6, 2020

@dcherian Maybe a link to these examples in that section then?
https://corteva.github.io/rioxarray/stable/examples/examples.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants