Closed rajeeja closed 2 weeks ago
I'm wondering if this implementation can be generalized as a Grid.from_geopandas()
or similar method as discussed in https://github.com/UXARRAY/uxarray/issues/635#issuecomment-1907005496
I'm wondering if this implementation can be generalized as a
Grid.from_geopandas()
or similar method as discussed in https://github.com/UXARRAY/uxarray/issues/635#issuecomment-1907005496
This makes sense, I will try to generalize it and at least add a test case for geojson also. It would have to be seen how the reader object is different when reading different kinds of format that are supported by geopandas: We may support a limited subset and we can specify what we support in test cases.
Thanks so much for the review. I will push the changes shortly
will
I'm wondering if this implementation can be generalized as a
Grid.from_geopandas()
or similar method as discussed in #635 (comment)This makes sense, I will try to generalize it and at least add a test case for geojson also. It would have to be seen how the reader object is different when reading different kinds of format that are supported by geopandas: We may support a limited subset and we can specify what we support in test cases.
Thanks so much for the review. I will push the changes shortly
Maybe for our Grid
, it would make the most sense to have a Grid.from_geodataframe()
method, where the user can provide a GeoDataFrame
that contains the geometry we will read in.
The workflow would require the user to use the geopandas.read_file()
or similar methods to first obtain a GeoDataFrame
and then pass it into a Grid
import geopandas as gp
import uxarray as ux
# load in a shape (or other) file
gdf = gp.read_file(...)
# create a Grid from the GeoDataFrame
uxgrid = ux.Grid.from_geodataframe(gdf)
Pinging @kmsampson for any thoughts.
We should consider a basic User Guide notebook for this too. I can provide the
quad-hexagon
grid in multiple different formats (i.e. shape, geoparquet, etc.) to showcase this functionality.
I have some mesh files as a part of this, we want to be careful with how many we bundle as a part of the repo.
We should consider a basic User Guide notebook for this too. I can provide the
quad-hexagon
grid in multiple different formats (i.e. shape, geoparquet, etc.) to showcase this functionality.I have some mesh files as a part of this, we want to be careful with how many we bundle as a part of the repo.
Maybe using online files rather than having them all hosted in the repo?
We should consider a basic User Guide notebook for this too. I can provide the
quad-hexagon
grid in multiple different formats (i.e. shape, geoparquet, etc.) to showcase this functionality.I have some mesh files as a part of this, we want to be careful with how many we bundle as a part of the repo.
Maybe using online files rather than having them all hosted in the repo?
Do we have an issue open for this topic in general?
We should consider a basic User Guide notebook for this too. I can provide the
quad-hexagon
grid in multiple different formats (i.e. shape, geoparquet, etc.) to showcase this functionality.I have some mesh files as a part of this, we want to be careful with how many we bundle as a part of the repo.
Maybe using online files rather than having them all hosted in the repo?
Do we have an issue open for this topic in general?
Closes #635
Support Polygon and Multipolygon