Skip to content

Commit a0078c3

Browse files
authored
Merge pull request #7 from LimnoTech/process-workaround
Process workaround
2 parents 46ac785 + 91e5491 commit a0078c3

59 files changed

Lines changed: 842 additions & 457 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Dockerfile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
# Copyright (c) 2020 Tom Kralidis
99
# Copyright (c) 2019 Just van den Broecke
10-
# Copyright (c) 2020 Francesco Bartoli
10+
# Copyright (c) 2025 Francesco Bartoli
1111
# Copyright (c) 2024 Angelos Tzotsos
1212
# Copyright (c) 2023 Bernhard Mallinger
1313
#
@@ -134,12 +134,11 @@ RUN python3 -m pip install --no-cache-dir -r requirements-docker.txt \
134134
ADD . /pygeoapi
135135

136136
# Install pygeoapi
137-
RUN python3 -m pip install --no-cache-dir -e .
137+
RUN python3 -m pip install --no-cache-dir -e .
138138

139-
RUN \
139+
RUN \
140140
# Set default config and entrypoint for Docker Image
141141
cp /pygeoapi/docker/default.config.yml /pygeoapi/local.config.yml \
142-
&& cp /pygeoapi/docker/entrypoint.sh /entrypoint.sh
142+
&& cp /pygeoapi/docker/entrypoint.sh /entrypoint.sh
143143

144144
ENTRYPOINT ["/entrypoint.sh"]
145-

docker/default.config.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#
77
# Copyright (c) 2019 Just van den Broecke
88
# Copyright (c) 2020 Tom Kralidis
9-
# Copyright (c) 2020 Francesco Bartoli
9+
# Copyright (c) 2025 Francesco Bartoli
1010
#
1111
# Permission is hereby granted, free of charge, to any person
1212
# obtaining a copy of this software and associated documentation
@@ -218,18 +218,18 @@ resources:
218218
# target_srs: EPSG:4326
219219
source_capabilities:
220220
paging: True
221-
221+
222222
source_options:
223223
# OGR_WFS_VERSION: 1.1.0
224224
OGR_WFS_LOAD_MULTIPLE_LAYER_DEFN: NO
225-
225+
226226
gdal_ogr_options:
227227
EMPTY_AS_NULL: NO
228228
GDAL_CACHEMAX: 64
229229
# GDAL_HTTP_PROXY: (optional proxy)
230230
# GDAL_PROXY_AUTH: (optional auth for remote WFS)
231231
CPL_DEBUG: NO
232-
232+
233233
crs:
234234
- http://www.opengis.net/def/crs/EPSG/0/4258
235235
- http://www.opengis.net/def/crs/EPSG/0/28992
@@ -269,18 +269,18 @@ resources:
269269
# target_srs: EPSG:4326
270270
source_capabilities:
271271
paging: True
272-
272+
273273
source_options:
274274
# OGR_WFS_VERSION: 2.0.0
275275
OGR_WFS_LOAD_MULTIPLE_LAYER_DEFN: NO
276-
276+
277277
gdal_ogr_options:
278278
EMPTY_AS_NULL: NO
279279
GDAL_CACHEMAX: 64
280280
# GDAL_HTTP_PROXY: (optional proxy)
281281
# GDAL_PROXY_AUTH: (optional auth for remote WFS)
282282
CPL_DEBUG: NO
283-
283+
284284
crs:
285285
- http://www.opengis.net/def/crs/EPSG/0/4258
286286
- http://www.opengis.net/def/crs/EPSG/0/26912
@@ -319,18 +319,18 @@ resources:
319319
# target_srs: EPSG:4326
320320
source_capabilities:
321321
paging: True
322-
322+
323323
source_options:
324324
# OGR_WFS_VERSION: 1.1.0
325325
OGR_WFS_LOAD_MULTIPLE_LAYER_DEFN: NO
326-
326+
327327
gdal_ogr_options:
328328
EMPTY_AS_NULL: NO
329329
GDAL_CACHEMAX: 64
330330
# GDAL_HTTP_PROXY: (optional proxy)
331331
# GDAL_PROXY_AUTH: (optional auth for remote WFS)
332332
CPL_DEBUG: NO
333-
333+
334334
crs:
335335
- http://www.opengis.net/def/crs/EPSG/0/4258
336336
- http://www.opengis.net/def/crs/EPSG/0/32632
@@ -374,14 +374,14 @@ resources:
374374
# target_srs: EPSG:4326
375375
source_capabilities:
376376
paging: True
377-
377+
378378
gdal_ogr_options:
379379
EMPTY_AS_NULL: NO
380380
GDAL_CACHEMAX: 64
381381
# GDAL_HTTP_PROXY: (optional proxy)
382382
# GDAL_PROXY_AUTH: (optional auth for remote WFS)
383383
CPL_DEBUG: NO
384-
384+
385385
id_field: osm_id
386386
layer: poi_portugal
387387

@@ -414,14 +414,14 @@ resources:
414414
# target_srs: EPSG:4326
415415
source_capabilities:
416416
paging: True
417-
417+
418418
gdal_ogr_options:
419419
EMPTY_AS_NULL: NO
420420
GDAL_CACHEMAX: 64
421421
# GDAL_HTTP_PROXY: (optional proxy)
422422
# GDAL_PROXY_AUTH: (optional auth for remote WFS)
423423
CPL_DEBUG: NO
424-
424+
425425
id_field: id
426426
layer: ne_110m_lakes
427427

@@ -457,14 +457,14 @@ resources:
457457
# target_srs: EPSG:4326
458458
source_capabilities:
459459
paging: True
460-
460+
461461
gdal_ogr_options:
462462
EMPTY_AS_NULL: NO
463463
GDAL_CACHEMAX: 64
464464
# GDAL_HTTP_PROXY: (optional proxy)
465465
# GDAL_PROXY_AUTH: (optional auth for remote WFS)
466466
CPL_DEBUG: NO
467-
467+
468468
id_field: id
469469
layer: ogrgeojson
470470

@@ -499,14 +499,14 @@ resources:
499499
# target_srs: EPSG:4326
500500
source_capabilities:
501501
paging: True
502-
502+
503503
gdal_ogr_options:
504504
EMPTY_AS_NULL: NO
505505
GDAL_CACHEMAX: 64
506506
# GDAL_HTTP_PROXY: (optional proxy)
507507
# GDAL_PROXY_AUTH: (optional auth for remote WFS)
508508
CPL_DEBUG: NO
509-
509+
510510
id_field: id
511511
layer: OGRGeoJSON
512512

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def __getattr__(cls, name):
112112
# built documents.
113113
#
114114
# The short X.Y version.
115-
version = '0.20.dev0'
115+
version = '0.21.dev0'
116116
# The full version, including alpha/beta/rc tags.
117117
release = version
118118

docs/source/data-publishing/ogcapi-features.rst

Lines changed: 40 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,24 @@ parameters.
1616

1717

1818
.. csv-table::
19-
:header: Provider, property filters/display, resulttype, bbox, datetime, sortby, skipGeometry, CQL, transactions, crs
19+
:header: Provider, property filters/display, resulttype, bbox, datetime, sortby, skipGeometry, domains, CQL, transactions, crs
2020
:align: left
2121

22-
`CSV`_,✅/✅,results/hits,❌,❌,❌,✅,❌,❌,✅
23-
`Elasticsearch`_,✅/✅,results/hits,✅,✅,✅,✅,✅,✅,✅
24-
`ERDDAP Tabledap Service`_,❌/❌,results/hits,✅,✅,❌,❌,❌,❌,✅
25-
`ESRI Feature Service`_,✅/✅,results/hits,✅,✅,✅,✅,❌,❌,✅
26-
`GeoJSON`_,✅/✅,results/hits,❌,❌,❌,✅,❌,❌,✅
27-
`MongoDB`_,✅/❌,results,✅,✅,✅,✅,❌,❌,✅
28-
`OGR`_,✅/❌,results/hits,✅,❌,❌,✅,❌,❌,✅
29-
`OpenSearch`_,✅/✅,results/hits,✅,✅,✅,✅,✅,✅,✅
30-
`Oracle`_,✅/✅,results/hits,✅,❌,✅,✅,❌,❌,✅
31-
`Parquet`_,✅/✅,results/hits,✅,✅,❌,✅,❌,❌,✅
32-
`PostgreSQL`_,✅/✅,results/hits,✅,✅,✅,✅,✅,✅,✅
33-
`SQLiteGPKG`_,✅/❌,results/hits,✅,❌,❌,✅,❌,❌,✅
34-
`SensorThings API`_,✅/✅,results/hits,✅,✅,✅,✅,❌,✅,✅
35-
`Socrata`_,✅/✅,results/hits,✅,✅,✅,✅,❌,❌,✅
36-
`TinyDB`_,✅/✅,results/hits,✅,✅,✅,✅,❌,✅,✅
22+
`CSV`_,✅/✅,results/hits,❌,❌,❌,✅,❌,❌,❌,
23+
`Elasticsearch`_,✅/✅,results/hits,✅,✅,✅,✅,✅,✅,✅,✅
24+
`ERDDAP Tabledap Service`_,❌/❌,results/hits,✅,✅,❌,❌,❌,❌,❌,
25+
`ESRI Feature Service`_,✅/✅,results/hits,✅,✅,✅,✅,❌,❌,❌,
26+
`GeoJSON`_,✅/✅,results/hits,❌,❌,❌,✅,❌,❌,❌,
27+
`MongoDB`_,✅/❌,results,✅,✅,✅,✅,❌,❌,❌,
28+
`OGR`_,✅/❌,results/hits,✅,❌,❌,✅,❌,❌,❌,
29+
`OpenSearch`_,✅/✅,results/hits,✅,✅,✅,✅,❌,✅,✅,✅
30+
`Oracle`_,✅/✅,results/hits,✅,❌,✅,✅,❌,❌,❌,
31+
`Parquet`_,✅/✅,results/hits,✅,✅,❌,✅,❌,❌,❌,
32+
`PostgreSQL`_,✅/✅,results/hits,✅,✅,✅,✅,❌,✅,✅,✅
33+
`SQLiteGPKG`_,✅/❌,results/hits,✅,❌,❌,✅,❌,❌,❌,
34+
`SensorThings API`_,✅/✅,results/hits,✅,✅,✅,✅,❌,❌,✅,✅
35+
`Socrata`_,✅/✅,results/hits,✅,✅,✅,✅,❌,❌,❌,
36+
`TinyDB`_,✅/✅,results/hits,✅,✅,✅,✅,✅,❌,✅,✅
3737

3838
.. note::
3939

@@ -538,9 +538,6 @@ PostgreSQL
538538

539539
Must have PostGIS installed.
540540

541-
.. note::
542-
Geometry must be using EPSG:4326
543-
544541
.. code-block:: yaml
545542
546543
providers:
@@ -755,18 +752,35 @@ Data access examples
755752
* list all collections
756753

757754
* http://localhost:5000/collections
755+
758756
* overview of dataset
759757

760758
* http://localhost:5000/collections/foo
759+
761760
* queryables
762761

763762
* http://localhost:5000/collections/foo/queryables
763+
764+
* queryables on specific properties
765+
766+
* http://localhost:5000/collections/foo/queryables?properties=title,type
767+
768+
* queryables with current domain values
769+
770+
* http://localhost:5000/collections/foo/queryables?profile=actual-domain
771+
772+
* queryables on specific properties with current domain values
773+
774+
* http://localhost:5000/collections/foo/queryables?profile=actual-domain&properties=title,type
775+
764776
* browse features
765777

766778
* http://localhost:5000/collections/foo/items
779+
767780
* paging
768781

769782
* http://localhost:5000/collections/foo/items?offset=10&limit=10
783+
770784
* CSV outputs
771785

772786
* http://localhost:5000/collections/foo/items?f=csv
@@ -779,24 +793,31 @@ Data access examples
779793
* query features (attribute)
780794

781795
* http://localhost:5000/collections/foo/items?propertyname=foo
796+
782797
* query features (temporal)
783798

784799
* http://localhost:5000/collections/foo/items?datetime=2020-04-10T14:11:00Z
800+
785801
* query features (temporal) and sort ascending by a property (if no +/- indicated, + is assumed)
786802

787803
* http://localhost:5000/collections/foo/items?datetime=2020-04-10T14:11:00Z&sortby=+datetime
804+
788805
* query features (temporal) and sort descending by a property
789806

790807
* http://localhost:5000/collections/foo/items?datetime=2020-04-10T14:11:00Z&sortby=-datetime
808+
791809
* query features in a given (and supported) CRS
792810

793811
* http://localhost:5000/collections/foo/items?crs=http%3A%2F%2Fwww.opengis.net%2Fdef%2Fcrs%2FEPSG%2F0%2F32633
812+
794813
* query features in a given bounding BBOX and return in given CRS
795814

796815
* http://localhost:5000/collections/foo/items?bbox=120000,450000,130000,460000&bbox-crs=http%3A%2F%2Fwww.opengis.net%2Fdef%2Fcrs%2FEPSG%2F0%2F28992&crs=http%3A%2F%2Fwww.opengis.net%2Fdef%2Fcrs%2FEPSG%2F0%2F32633
816+
797817
* fetch a specific feature
798818

799819
* http://localhost:5000/collections/foo/items/123
820+
800821
* fetch a specific feature in a given (and supported) CRS
801822

802823
* http://localhost:5000/collections/foo/items/123?crs=http%3A%2F%2Fwww.opengis.net%2Fdef%2Fcrs%2FEPSG%2F0%2F32633

docs/source/data-publishing/ogcapi-records.rst

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ pygeoapi core record providers are listed below, along with a matrix of supporte
1515
parameters.
1616

1717
.. csv-table::
18-
:header: Provider, properties (filters), resulttype, q, bbox, datetime, sortby, properties (display), CQL, transactions
18+
:header: Provider, properties (filters), resulttype, q, bbox, datetime, sortby, properties (display), domains, CQL, transactions
1919
:align: left
2020

2121
`ElasticsearchCatalogue`_,✅,results/hits,✅,✅,✅,✅,✅,✅,✅
22-
`TinyDBCatalogue`_,✅,results/hits,✅,✅,✅,✅,❌,✅,✅
23-
`CSWFacade`_,✅,results/hits,✅,✅,✅,❌,❌,❌,❌
22+
`TinyDBCatalogue`_,✅,results/hits,✅,✅,✅,✅,❌,✅,✅,✅,✅
23+
`CSWFacade`_,✅,results/hits,✅,✅,✅,❌,❌,✅,❌,❌
2424

2525

2626
Below are specific connection examples based on supported providers.
@@ -107,6 +107,18 @@ Metadata search examples
107107

108108
* http://localhost:5000/collections/foo/queryables
109109

110+
* queryables on specific properties
111+
112+
* http://localhost:5000/collections/foo/queryables?properties=title,type
113+
114+
* queryables with current domain values
115+
116+
* http://localhost:5000/collections/foo/queryables?profile=actual-domain
117+
118+
* queryables on specific properties with current domain values
119+
120+
* http://localhost:5000/collections/foo/queryables?profile=actual-domain&properties=title,type
121+
110122
* browse records
111123

112124
* http://localhost:5000/collections/foo/items

pygeoapi/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#
3131
# =================================================================
3232

33-
__version__ = '0.20.dev0'
33+
__version__ = '0.21.dev0'
3434

3535
import click
3636
try:

pygeoapi/api/__init__.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# Ricardo Garcia Silva <ricardo.garcia.silva@geobeyond.it>
99
#
1010
# Copyright (c) 2025 Tom Kralidis
11-
# Copyright (c) 2022 Francesco Bartoli
11+
# Copyright (c) 2025 Francesco Bartoli
1212
# Copyright (c) 2022 John A Stevenson and Colin Blackburn
1313
# Copyright (c) 2023 Ricardo Garcia Silva
1414
#
@@ -212,6 +212,7 @@ def example_method(api: API, request: APIRequest, custom_arg):
212212
:param request: The web platform specific Request instance.
213213
:param supported_locales: List or set of supported Locale instances.
214214
"""
215+
215216
def __init__(self, request, supported_locales):
216217
# Set default request data
217218
self._data = b''
@@ -336,7 +337,7 @@ def _get_format(self, headers) -> Union[str, None]:
336337

337338
# Format not specified: get from Accept headers (MIME types)
338339
# e.g. format_ = 'text/html'
339-
h = headers.get('accept', headers.get('Accept', '')).strip() # noqa
340+
h = headers.get('accept', headers.get('Accept', '')).strip() # noqa
340341
(fmts, mimes) = zip(*FORMAT_TYPES.items())
341342
# basic support for complex types (i.e. with "q=0.x")
342343
for type_ in (t.split(';')[0].strip() for t in h.split(',') if t):
@@ -1134,10 +1135,10 @@ def describe_collections(api: API, request: APIRequest,
11341135

11351136
# OAPIF Part 2 - list supported CRSs and StorageCRS
11361137
if collection_data_type in ['edr', 'feature']:
1137-
collection['crs'] = get_supported_crs_list(collection_data, DEFAULT_CRS_LIST) # noqa
1138-
collection['storageCRS'] = collection_data.get('storage_crs', DEFAULT_STORAGE_CRS) # noqa
1138+
collection['crs'] = get_supported_crs_list(collection_data, DEFAULT_CRS_LIST) # noqa
1139+
collection['storageCRS'] = collection_data.get('storage_crs', DEFAULT_STORAGE_CRS) # noqa
11391140
if 'storage_crs_coordinate_epoch' in collection_data:
1140-
collection['storageCrsCoordinateEpoch'] = collection_data.get('storage_crs_coordinate_epoch') # noqa
1141+
collection['storageCrsCoordinateEpoch'] = collection_data.get('storage_crs_coordinate_epoch') # noqa
11411142

11421143
elif collection_data_type == 'coverage':
11431144
# TODO: translate
@@ -1176,7 +1177,7 @@ def describe_collections(api: API, request: APIRequest,
11761177
collection['extent']['spatial']['grid'] = [{
11771178
'cellsCount': p._coverage_properties['width'],
11781179
'resolution': p._coverage_properties['resx']
1179-
}, {
1180+
}, {
11801181
'cellsCount': p._coverage_properties['height'],
11811182
'resolution': p._coverage_properties['resy']
11821183
}]
@@ -1418,7 +1419,7 @@ def get_collection_schema(api: API, request: Union[APIRequest, Any],
14181419

14191420
if p.type != 'coverage':
14201421
schema['properties']['geometry'] = {
1421-
'$ref': 'https://geojson.org/schema/Geometry.json',
1422+
'format': 'geometry-any',
14221423
'x-ogc-role': 'primary-geometry'
14231424
}
14241425

0 commit comments

Comments
 (0)