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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
POSTGRESQL_PASSWORD: ${{ env.POSTGRESQL_PASSWORD }}
run: |
pytest tests/test_ckan_provider.py
pytest tests/test_geopandas_provider.py
pytest tests/test_postgresql_provider.py
pytest tests/test_sitemap_process.py
pytest tests/test_sparql_provider.py
Expand Down
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Additional OGC API - Feature providers are listed below, along with a matrix of
| `CKAN` | ✅/✅ | results/hits | ❌ | ❌ | ✅ | ✅ | ❌ | ❌ | ✅ |
| `PsuedoPostgreSQL` | ✅/✅ | results/hits | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ |
| `SPARQL` | ❌/✅ | results/hits | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| `GeoPandas` | ✅/✅ | results/hits | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ |

The provider names listed in the table are only accessible in [internetofwater/pygeoapi](https://github.com/internetofwater/pygeoapi), otherwise the full python path is required.

Expand Down Expand Up @@ -78,6 +79,23 @@ The SPARQL Provider only uses variables prefixed with sparql\_ in the configurat
- `sparql_subject`: The SPARQL variable representing the subject URI in the query.
- `sparql_predicates`: A mapping of attribute names to SPARQL predicates. These predicates will be used to query specific attributes in the SPARQL data source.

### GeoPandas

The GeoPandas Provider enables OGC API - Feature support using GeoPandas as the backend. This integration can read in data files in [any of the geospatial formats supported by GeoPandas](https://geopandas.org/en/stable/docs/user_guide/io.html#supported-drivers-file-formats).

`id_field` is the only field that is required to be labelled.

```yaml
providers:
- type: feature
name: pygeoapi_plugins.provider.geopandas_.GeoPandasProvider
# Example data
data: 'https://www.hydroshare.org/resource/3295a17b4cc24d34bd6a5c5aaf753c50/data/contents/hu02.gpkg',
id_field: id
```

You can also use plain CSV and read in points by providing an `x_field` and `y_field` in the config the [same way you would with the default pygeoapi CSV provider](https://github.com/geopython/pygeoapi/blob/510875027e8483ce2916e7cf315fb6a7f6105807/pygeoapi-config.yml#L137).

## OGC API - Processes

Additional OGC API - Process are listed below
Expand Down
Loading
Loading