Comments (5)
Additional notes:
- GDAL does not support
grid_mapping
defined as:"CRS: x y"
- GDAL does not support
grid_mapping
with 2 CRS:"CRS: x y CRSWGS84: lat lon"
- GDAL looks to the
spatial_ref
(crs_wkt) attribute in the CRS coordinate - GDAL expects the
crs_wkt
to start withGEOGCS
butpyproj
provides thecrs_wkt
starting withGEOGCRS
!!!
from geoxarray.
Sorry it took so long for me to get to this @ghiggi. I know we talked a little bit on slack about this, but when I started reading the issue and realized how long it was I wasn't going to have time to give it a proper review. I'm hoping I can start that discussion now...
First, thanks for putting all these ideas together. It is clear you've run into problems with existing tools and tried to come up with interfaces that support as much as possible. These are, in general, not easy things to figure out and nail down.
My main issue with what you've suggested here is that it conflates/confuses/combines two or more separate topics. The CRS is specifically the coordinate system which has a datum and possibly some bounds associated with it, but it does not have an idea of pixel resolution or shape/size or even coordinates (at least not ones specific to pixels or an array of data). This is made even more confusing by pyresample's hack of generating cartopy CRS objects where the bounds of the CRS are set based on the bounds of the data (a bad decision in hindsight by me). You might be trying to handle that with your area_crs
keyword argument in some of the conversion methods, but I'm not sure I understand what that kwarg does.
So I think I'd be hesitant to want to put this type of functionality in an accessor called .crs
. You also refer to all of this stuff as being related to CF, but it isn't clear to me why CF matters for most of this functionality. For the stuff that is CF specific or has to be done differently to make CF happy, would this functionality be more appropriate for cf_xarray
(https://cf-xarray.readthedocs.io/en/latest/)?
I think the parts of this functionality that are xarray-specific could go in geoxarray in the sense that they need to know about coordinates and the CRS and other potentially other DataArrays in a Dataset. Otherwise I would hope that the functionality would go in GDAL, or rasterio, or pyproj, and then come "out of the box" by accessing a pyproj CRS object. For the parts of CF that aren't supported by GDAL or other libraries, could lowering the CF standard being supported allow for more flexibility currently (CF 1.6 or 1.7 instead of 1.8)?
Side note: I think cartopy can now accept pyproj CRS objects since it now subclasses from them. Or at least they can be easily made. Similarly, I would hope that libraries like pyresample or rioxarray would not require a user to explicitly convert to a certain CRS/area-like object before being called, but would rather depend on accessors like those in geoxarray/cf_xarray/rioxarray to get the information they need.
CC @snowman2 who is the maintainer or is a contributor to at least 25% of the packages mentioned in this issue.
from geoxarray.
I would definitely pay attention to what odc-geo is doing: https://github.com/opendatacube/odc-geo
from geoxarray.
Related Issues (17)
- Plans for geoxarray? HOT 1
- Add `sel` and `loc` methods for selection by standard names HOT 8
- cf-xarray
- MNT: Stop using ci-helpers in appveyor.yml HOT 1
- Dask re-projection support HOT 2
- Renaming 'master' to 'main'
- Design: active versus passive coordinate assignment HOT 8
- custom `numpy` dtypes HOT 5
- Design differences with rioxarray HOT 30
- Collaboration with salem package HOT 19
- Use new proj.4 to manage projections
- Consider any lessons learned by CF group for defining swaths
- Project Status HOT 2
- rioxarray HOT 6
- Handling of CRS objects in coordinates HOT 9
- Design for CRS extension HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from geoxarray.