Skip to content

Commit

Permalink
Add CRS transform to remaining providers (#1729)
Browse files Browse the repository at this point in the history
* Add CRS transform to remaining providers

* Update tinydb_.py

---------

Co-authored-by: Tom Kralidis <[email protected]>
  • Loading branch information
webb-ben and tomkralidis authored Jul 16, 2024
1 parent d9adbbd commit 5331518
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/source/data-publishing/ogcapi-features.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ parameters.

`CSV`_,✅/✅,results/hits,❌,❌,❌,✅,❌,❌,✅
`Elasticsearch`_,✅/✅,results/hits,✅,✅,✅,✅,✅,✅,✅
`ERDDAP Tabledap Service`_,❌/❌,results/hits,✅,✅,❌,❌,❌,❌,
`ERDDAP Tabledap Service`_,❌/❌,results/hits,✅,✅,❌,❌,❌,❌,
`ESRI Feature Service`_,✅/✅,results/hits,✅,✅,✅,✅,❌,❌,✅
`GeoJSON`_,✅/✅,results/hits,❌,❌,❌,✅,❌,❌,✅
`MongoDB`_,✅/❌,results,✅,✅,✅,✅,❌,❌,✅
Expand All @@ -31,7 +31,7 @@ parameters.
`SQLiteGPKG`_,✅/❌,results/hits,✅,❌,❌,✅,❌,❌,✅
`SensorThings API`_,✅/✅,results/hits,✅,✅,✅,✅,❌,❌,✅
`Socrata`_,✅/✅,results/hits,✅,✅,✅,✅,❌,❌,✅
`TinyDB`_,✅/✅,results/hits,✅,✅,✅,✅,❌,✅,
`TinyDB`_,✅/✅,results/hits,✅,✅,✅,✅,❌,✅,

.. note::

Expand Down
3 changes: 3 additions & 0 deletions pygeoapi/provider/erddap.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@

from pygeoapi.provider.base import (
BaseProvider, ProviderNotFoundError, ProviderQueryError)
from pygeoapi.util import crs_transform

LOGGER = logging.getLogger(__name__)

Expand Down Expand Up @@ -80,6 +81,7 @@ def get_fields(self):

return properties

@crs_transform
def query(self, offset=0, limit=10, resulttype='results',
bbox=[], datetime_=None, properties=[], sortby=[],
select_properties=[], skip_geometry=False, q=None,
Expand Down Expand Up @@ -164,6 +166,7 @@ def query(self, offset=0, limit=10, resulttype='results',
'numberReturned': returned
}

@crs_transform
def get(self, identifier, **kwargs):

query_params = []
Expand Down
4 changes: 3 additions & 1 deletion pygeoapi/provider/tinydb_.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

from pygeoapi.provider.base import (BaseProvider, ProviderConnectionError,
ProviderItemNotFoundError)
from pygeoapi.util import get_typed_value
from pygeoapi.util import crs_transform, get_typed_value

LOGGER = logging.getLogger(__name__)

Expand Down Expand Up @@ -116,6 +116,7 @@ def get_fields(self):

return fields

@crs_transform
def query(self, offset=0, limit=10, resulttype='results',
bbox=[], datetime_=None, properties=[], sortby=[],
select_properties=[], skip_geometry=False, q=None, **kwargs):
Expand Down Expand Up @@ -234,6 +235,7 @@ def query(self, offset=0, limit=10, resulttype='results',

return feature_collection

@crs_transform
def get(self, identifier, **kwargs):
"""
Get TinyDB document by id
Expand Down

0 comments on commit 5331518

Please sign in to comment.