Skip to content
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

Geopandas OGC API Features (OAF) Support (USGS/WMA - 33) #9

Merged
merged 8 commits into from
Jul 22, 2024

Conversation

C-Loftus
Copy link
Member

@C-Loftus C-Loftus commented Jul 17, 2024

  • Adds support for Geopandas in pygeoapi
  • Supports propertyfilters/display resulttype bbox datetime sortby skipGeometry for geopandas.
  • Adds unit tests for Geopandas provider
  • Adds data for unit tests
  • Passes existing CSV tests as well as gpkg tests for https://reference.geoconnex.us/collections/hu02/items

Note: I tested this all inside the current pygeoapi master inside a devcontainer docker volume. So I have not tested this in the CI pipeline for this repo yet. Will iterate if there are failures.

Only thing I am currently unsure on:

  • Sometimes the datatypes of the file read in by the geopandas read_file don't match the proper datatype. I am not entirely sure how to fix this in a generalized way since the file we are reading in doesn't always specify the type of the data (i.e. CSV) and might require a heuristic, but sometimes the geopandas heuristic is incorrect. The only place this matters is get_fields since it returns the type associated with the field.

@C-Loftus C-Loftus changed the title Geopandas Geopandas OGC API Features (OAF) Support (USGS/WMA - 33) Jul 17, 2024
@C-Loftus
Copy link
Member Author

Appears that the sitemap generator is broken.

Copy link
Member

@webb-ben webb-ben left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good!

Some small changes. Can you also use consistent quoting in your python files, I prefer single quotes. You will also need to do some formatting to pass flake8 tests.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
pygeoapi_plugins/provider/geopandas_provider.py Outdated Show resolved Hide resolved
pygeoapi_plugins/provider/geopandas_provider.py Outdated Show resolved Hide resolved
pygeoapi_plugins/provider/geopandas_provider.py Outdated Show resolved Hide resolved
pygeoapi_plugins/provider/geopandas_provider.py Outdated Show resolved Hide resolved
pygeoapi_plugins/provider/geopandas_provider.py Outdated Show resolved Hide resolved
tests/test_geopandas_provider.py Outdated Show resolved Hide resolved
@C-Loftus
Copy link
Member Author

Overall looks good!

Some small changes. Can you also use consistent quoting in your python files, I prefer single quotes. You will also need to do some formatting to pass flake8 tests.

Sounds good. Working on changes. By the way, what is your opinion on an autoformatter pre-commit for this repo? Wasn't sure if you want to keep this the same as the pygeoapi style. I honestly don't think about quote style or import order much since I usually just delegate that to ruff.

But obviously happy to change things however you prefer.

@webb-ben
Copy link
Member

webb-ben commented Jul 19, 2024

Why don't you add precommit here as well then? Fine by me

@webb-ben webb-ben self-requested a review July 22, 2024 16:56
@C-Loftus C-Loftus merged commit aa300a2 into cgs-earth:master Jul 22, 2024
2 checks passed
@C-Loftus C-Loftus deleted the geopandas branch July 22, 2024 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants