-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
✨ PyogrioReaderIterDataPipe for reading vector OGR files #19
Conversation
Vectorized vector I/O using OGR!
An iterable-style DataPipe for vector data! Uses pyogrio with geopandas for the I/O. Included a doctest and unit test, added a new section in the API docs and some more intersphinx mappings.
Extra keyword arguments to pass to | ||
`pyogrio.read_dataframe <https://pyogrio.readthedocs.io/en/latest/api.html#geopandas-integration>`_. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally the intersphinx directive would look like this, but the permalink is not available for some reason. Closest I could get to pyogrio.read_dataframe
is using https://pyogrio.readthedocs.io/en/latest/api.html#geopandas-integration.
Extra keyword arguments to pass to | |
`pyogrio.read_dataframe <https://pyogrio.readthedocs.io/en/latest/api.html#geopandas-integration>`_. | |
Extra keyword arguments to pass to :py:func:`pyogrio.read_dataframe`. |
Edit: PR at geopandas/pyogrio#130 to resolve this.
8d16ab1
to
f65b70f
Compare
Making a proper build matrix now! Minimal tests (no optional dependencies) run on Python 3.8, while full tests (with all dependencies) run on Python 3.9. Wanted to do Python 3.10 for full tests, but need to wait for rasterio 1.3.0 to come out of beta first.
Conserve GitHub Actions Continuous Integration resources when a Pull Request is in draft mode.
@@ -21,6 +21,7 @@ classifiers = [ | |||
python = "^3.8" | |||
rioxarray = ">=0.10.0" | |||
torchdata = ">=0.3.0" | |||
pyogrio = {version = ">=0.4.0a1", extras = ["geopandas"], optional = true} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to bump this to stable pyogrio=0.4.0
version once that is released. Edit: see PR #21.
Using the stable version of pyogrio, patch the intersphinx link as mentioned in #19 (comment), and bumped `geopandas` version in poetry.lock from 0.10.2 to 0.11.0 to reduce number of deprecation warnings. * 📌 Pin minimum pyogrio version to 0.4.0 Bumps [pyogrio](https://github.com/geopandas/pyogrio) from 0.4.0a1 to 0.4.0. - [Release notes](https://github.com/geopandas/pyogrio/releases) - [Changelog](https://github.com/geopandas/pyogrio/blob/v0.4.0/CHANGES.md) - [Commits](geopandas/pyogrio@v0.4.0a1...v0.4.0) * 📝 Update permalink to pyogrio.read_dataframe Get the intersphinx link to point to https://pyogrio.readthedocs.io/en/latest/api.html#pyogrio.read_dataframe. * ⬆️ Bump geopandas from 0.10.2 to 0.11.0 Bumps [geopandas](https://github.com/geopandas/geopandas) from 0.10.2 to 0.11.0. - [Release notes](https://github.com/geopandas/geopandas/releases) - [Changelog](https://github.com/geopandas/geopandas/blob/main/CHANGELOG.md) - [Commits](geopandas/geopandas@v0.10.2...v0.11.0)
An iterable-style DataPipe for vector data! Also added Python 3.8 job to CI build matrix which doesn't include 'vector' dependencies. That job is also skipped when PR is in draft mode.
i/O handled using pyogrio. IterDataPipe based on https://github.com/pytorch/data/blob/v0.3.0/torchdata/datapipes/iter/load/iopath.py#L37-L83
Preview at https://zen3geo--19.org.readthedocs.build/en/19/api.html#module-zen3geo.datapipes.pyogrio
Note that since
pyogrio
is made an optional dependency, users would need to dopip install zen3geo[vector]
to install the extra 'vector' packages that includespyogrio
andgeopandas
.TODO:
pyogrio
as optional dependencyPyogrioReaderIterDataPipe
pyogrio
dependency in one runReferences: