.to_geodataframe()? #6973
Unanswered
raybellwaves
asked this question in
Ideas
Replies: 1 comment
-
I think it would be very useful, but IMO probably best is to implement it in a 3rd-party library. More generally, shapely provides vectorized numpy ufuncs for any geometry (object array). Maybe we could leverage that to provide more generic Xarray vs. Geopandas conversion methods, and port some of the GeoDataFrame features so that it works with Xarray objects too (therefore avoiding conversion if that's not necessary)? Some related discussion here: xarray-contrib/xarray_leaflet#69 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Similar to https://docs.xarray.dev/en/stable/generated/xarray.DataArray.to_dataframe.html but returns a Geopandas.GeoDataFrame with Points in the geometry column.
pros: Saves my additional code to convert my dataframe to a geodataframe
cons: may need geopandas deps; plenty of non-trivial things such as geo dims and CRS.
Beta Was this translation helpful? Give feedback.
All reactions