-
Notifications
You must be signed in to change notification settings - Fork 10
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
Support re-projecting of coordinates #5
Comments
I wonder if it would be worth collaborating with |
Yes, even depend on GeoPandas would be fine, since I guess users will often do conversion between vector data cubes and geo dataframes.
Yes a custom accessor would certainly be a nice addition here. To go even further we could probably replicate most of the Which name should we choose for the accessor? Is
I guess it would be OK to support different ways of getting the CRS information from the geometry coordinate. I would suggest the following (in order of precedence):
|
@keewis |
Not really, I just thought that since One example I could imagine, though, is to use |
I believe that we should be able to re-project coordinates and adapt crs in the index adequately. It would mean depending on pyproj on top of shapely and xarray which I assume is fine anyway. We should probably even store CRS
ShapelySTRTreeIndex.crs
aspyproj.CRS
object anyway. Right now, we sort of assume that as our examples usegeopandas.GeometryArray
that comes withpyproj.CRS
but if you pass a numpy.array of shapely geoms, it can be anything. I'd follow geopadnas example here and use pyproj to handle that and enableto_crs()
.I am less sure about the actual API. Maybe via a custom
.vec
accessor? AsDataArray.vec.coords_to_crs(coordinates, target_crs,, **coords_kwargs)
wrappingDataArray.assign_coords
?The text was updated successfully, but these errors were encountered: