Commit Graph

940 Commits

Author SHA1 Message Date
Francesco Frassinelli 0fc4f829f2 Accept additional arguments for get(...) (#1154) 2023-02-26 16:57:09 -05:00
Tom Kralidis af312f115d add server limit to EDR calls that support paging (#1153) 2023-02-21 16:43:32 -05:00
Benjamin Webb 906c0fd619 Fix setting default templates (#1145) 2023-02-17 19:44:09 -05:00
Benjamin Webb 1a9f38347c Add limit query arg to processes (#1147)
* Add limit query arg to processes

* Update per requested changes
2023-02-17 16:41:10 -05:00
Tom Kralidis ddd9c70f93 unpin pygeoif (#1146)
* unpin pygeoif

* Update requirements-docker.txt

* Update requirements-provider.txt
2023-02-16 19:49:48 +02:00
Tom Kralidis 5008a4de01 add radius to flask/django/starlette routes (#1144) 2023-02-16 11:54:52 -05:00
Tom Kralidis fa0351a626 support EDR radius queries (#1143) 2023-02-15 22:18:04 -05:00
Peter Garnæs 9834e4db84 EDR bbox parameter support for cube queries (#1127)
* bbox query parameter support for EDR cube queries

As per Requirement A.61 C, D and E, as well as A.7 in the EDR standard.

* bbox queries support z-axis dimension

* xarray-edr provider cube query support, edr cube unit tests

---------

Co-authored-by: Peter Garnæs <pga@dmi.dk>
2023-02-15 21:26:24 -05:00
Benjamin Webb e1af5e1ca5 Add json-ld templating for feature collection item (#868)
* Render template if specified in config and provide example config

Update linked_data.py

Merge branch 'geopython:master' into jsonld

Rended from json-ld output

Render jinja2 json-ld template from json-ld output instead of json output

Merge branch 'geopython:master' into jsonld

Add documentation

- Add documentation
- Add test to workflow

Update pygeoapi-test-config.yml

Update test_api.py

Update api.py

Update linked_data.py

Move template declaration in configuration

Update docs

Update configuration.rst

Update configuration.rst

* Updates per requested changes

* Fix spelling

* Fix json-ld template pathing

* Remove  root path for the templating

* Move json-ld template from api.py

- Move single item json-ld templating to inside geojson2jsonld
- Reformat json-ld configuration for context and item_template to children of json-ld block
- Update docs and example configurations

* Fix ref

* Use FileSystemLoader to control template search path

search for templates is in order of `template_paths` list

* s/json-ld/linked-data/ig

rename json-ld to more generic name
2023-02-15 21:12:19 -05:00
Mathieu Tachon 25e60c4a8b fix(conformance): updated link to OpenAPI requirements class (#1142) 2023-02-15 20:53:46 -05:00
Benjamin Webb 6844a85220 Use upstream encoding for gzip with CSV formatter (#1140) 2023-02-14 22:31:45 -05:00
Mathieu Tachon 70804d22fa feat(OGRProvider): allow to use 'geom_field' in the config for OGR pr… (#1141)
* feat(OGRProvider): allow to use 'geom_field' in the config for OGR provider

* docs: show an example of using OGR for publishing data from a PostGIS database

* fix: does not check for empty geometry in this PR

* docs: add back ESRIJSON source_type
2023-02-14 19:29:09 -05:00
Mathieu Tachon 74ddb1215d fix(geom2schemageo): use only x,y dimensions when rendering GeoShape (#1133)
* fix(geom2schemageo): use only x,y dimensions when rendering GeoShape

Ignore possible third dimension when unpacking the coordinates of shapely
geometrical object in function 'geom2schemageo'. This fixes the ValueError
thrown when requesting features in JSON-LD format with 3D geometries.

* fixing unpacking of multipoint coordinates
2023-02-13 08:00:56 -05:00
Mathieu Tachon 7f047348b5 fix(OGRProvider_init): make the 'id_field' attribute mandatory in provider config (#1135)
As for the 'layer' attribute, the 'id_field' should be specified in the
configuration file for the OGRProvider. The 'get' method of a OGRProvider
instance (e.g. when requesting a single feature) needs the feature ID when
setting an attribute filter on the layer. If the 'id_field' attribute is
omitted in the configuration file, the error thrown is more explicit.
2023-02-10 15:06:23 -05:00
Benjamin Webb 30f279b7ad Fix CSV provider for a single item (#1138)
* Add larger test data for CSV provider

* Fix CSV provider for single item
2023-02-10 14:48:24 -05:00
Benjamin Webb 983530ac55 Allow Sqlite provider to return None as a geometry if it is missing. (#1136) 2023-02-09 22:11:26 -05:00
Tom Kralidis a15f9f2b52 add note for running WSGI and a virtualenv (thanks Australia BOM) (#1131)
* add note for running WSGI and a virtualenv (thanks Australia BOM)

* docs sweep

* fix
2023-02-03 20:50:21 -05:00
KoalaGeo ef5cab1310 Add postgres properties filter example to documentation & k8s installation notice (#1032)
* Add postgres properties filter example

* Add note for kubenetes use

* requested changes

* Update ogcapi-features.rst

* Update ogcapi-features.rst

* Update installation.rst

---------

Co-authored-by: Tom Kralidis <tomkralidis@gmail.com>
2023-02-03 20:30:33 -05:00
Tom Kralidis d6ad4f8724 upgrade Elasticsearch support to 8 (#1017)
* upgrade Elasticsearch support to version 8

* Update ogcapi-features.rst
2023-02-03 08:45:03 -05:00
Tom Kralidis 86b786d723 PostgreSQL: add numberMatched and numberReturned to query response (#1007) (#1121)
* PostgreSQL: add numberMatched and numberReturned to query response (#1007)

* address comments

* fix
2023-02-03 08:37:29 -05:00
Angelos Tzotsos 9086383b42 Removing Python 3.6 from CI and requirements (#1089) 2023-02-03 08:29:34 -05:00
Angelos Tzotsos 39ecf74a42 back to dev 2023-02-03 15:02:26 +02:00
Angelos Tzotsos 7b925f1bbb update release version 2023-02-03 14:36:50 +02:00
Angelos Tzotsos 96c23c7fbe Sort requirements 2023-02-03 14:33:35 +02:00
Angelos Tzotsos 8ff36f4373 Pin SQLAlchemy to previous release until pygeofilter fixed upstream 2023-02-03 14:33:35 +02:00
Tom Kralidis f3151b0231 update CSV provider property typing (#1122)
* update CSV provider property typing

* fix test

* fix ref

* fix ref

* fix ref

* fix truthy evaluations
2023-01-31 06:26:31 -05:00
Peter Garnæs ff9ea1b6fc Edr Providers can raise Request Entity Too Large HTTP status (#1119)
* Edr Providers can raise Request Entity Too Large HTTP status

* Rename and move entity too large exception to provider base module

* Get request too large exception message from base exception message

* Rename request to large exception

---------

Co-authored-by: Peter Garnæs <pga@dmi.dk>
2023-01-29 12:18:32 -05:00
Tom Kralidis d7d5fa6dc1 Merge pull request #1120 from tomkralidis/issue-1117
add links to process list endpoint (#1117)
2023-01-28 16:58:10 -05:00
Tom Kralidis 0806757a01 add links to process list endpoint (#1117) 2023-01-28 16:49:15 -05:00
Tom Kralidis 94dc76bf57 update GeoJSON provider property typing (#1116) 2023-01-25 17:49:29 +01:00
Tom Kralidis 754bbffb94 Merge pull request #1113 from geopython/items-id-path
support paths in item IDs
2023-01-23 10:30:56 -05:00
Francesco Bartoli cefd976a92 Fix module name (#1114) 2023-01-23 10:27:46 -05:00
Tom Kralidis f26582e4ce add examples in docs 2023-01-23 09:28:05 -05:00
Tom Kralidis 8686c9e265 support paths in item IDs 2023-01-23 07:45:49 -05:00
Just van den Broecke c436baf739 #1110 try fix hanging Docker build GH Workflow - downgrade GH build env 2023-01-20 14:30:24 +01:00
Just van den Broecke 79688e9917 #1110 try fix hanging Docker build GH Workflow - split RUNs 2023-01-20 11:35:39 +01:00
Just van den Broecke 0e22b4fea5 #1110 - disable build for test and upgrade action versions (#1112) 2023-01-19 09:42:47 -05:00
Tom Kralidis 7cde469bd9 fix string formatting in item HTML template (#1107) (#1109) 2023-01-19 08:26:49 +01:00
Massimo Di Stefano 2d4d8e6646 docker: upgrade ubuntu version (#1093)
* docker: upgrade ubuntu version

Upgrade rhe ubuntu version used in the main Dockerfile to latest stable version `20.04`

* Update Dockerfile

amended ubuntu version 20 -> 22

but then the following error:

```
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
Processing triggers for dbus (1.12.20-2ubuntu4.1) ...
gpg: error running '/usr/bin/gpg-agent': probably not installed
gpg: failed to start agent '/usr/bin/gpg-agent': Configuration error
gpg: can't connect to the agent: Configuration error
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/softwareproperties/shortcuthandler.py", line 423, in add_key
PPA publishes dbgsym, you may need to include 'main/debug' component
Repository: 'deb https://ppa.launchpadcontent.net/ubuntugis/ubuntugis-unstable/ubuntu/ jammy main'
Description:
Unstable releases of Ubuntu GIS packages. These releases are more bleeding edge and while generally they should work well, they dont receive the same amount of quality assurance as our stable releases do.
More info: https://launchpad.net/~ubuntugis/+archive/ubuntu/ubuntugis-unstable
Adding repository.
Adding deb entry to /etc/apt/sources.list.d/ubuntugis-ubuntu-ubuntugis-unstable-jammy.list
Adding disabled deb-src entry to /etc/apt/sources.list.d/ubuntugis-ubuntu-ubuntugis-unstable-jammy.list
Adding key to /etc/apt/trusted.gpg.d/ubuntugis-ubuntu-ubuntugis-unstable.gpg with fingerprint 6B827C12C2D425E227EDCA75089EBE08314DF160
    subprocess.run(cmd.split(), check=True, input=keys)
  File "/usr/lib/python3.10/subprocess.py", line 524, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['gpg', '-q', '--no-options', '--no-default-keyring', '--batch', '--keyring', '/etc/apt/trusted.gpg.d/ubuntugis-ubuntu-ubuntugis-unstable.gpg', '--homedir', '/tmp/tmpjlr98185', '--import']' returned non-zero exit status 2.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/add-apt-repository", line 364, in <module>
    sys.exit(0 if addaptrepo.main() else 1)
  File "/usr/bin/add-apt-repository", line 357, in main
    shortcut.add()
  File "/usr/lib/python3/dist-packages/softwareproperties/shortcuthandler.py", line 222, in add
    self.add_key()
  File "/usr/lib/python3/dist-packages/softwareproperties/shortcuthandler.py", line 425, in add_key
    raise ShortcutException(e)
softwareproperties.shortcuthandler.ShortcutException: Command '['gpg', '-q', '--no-options', '--no-default-keyring', '--batch', '--keyring', '/etc/apt/trusted.gpg.d/ubuntugis-ubuntu-ubuntugis-unstable.gpg', '--homedir', '/tmp/tmpjlr98185', '--import']' returned non-zero exit status 2.
````

Removing the ubuntugis PPA  build without error - is ubuntugis a requirements? probably Jammy has up-to-date packages for pygeoapi dependencies

* Update Dockerfile

removing ubuntugis PPA

* Update Dockerfile

adding  `python3-pytest` and `python3-pyld`  dependencies

* Update Dockerfile

* Update Dockerfile

* fixing docker environment with suggested changes

* replace ubuntu version with codename

* Update .dockerignore

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* Update entrypoint.sh

skip the SensorThings and other tests that require a local server

Co-authored-by: Just van den Broecke <just@justobjects.nl>
2023-01-18 15:04:36 +01:00
Benjamin Webb a1a70a4139 Return empty field set (#1106)
- Return empty field set instead of throwing an error.
- Update license year
2023-01-17 23:14:28 -05:00
Tom Kralidis c8d55ecef8 autodetect SQLiteGPKG geometry columns, normalize fields into JSON Schema types (#1088) (#1103) 2023-01-14 08:04:13 -05:00
Tom Kralidis 3bc40624b7 add warning when flask_cors is not enabled (#1083) (#1097)
* add warning when flask_cors is not enabled (#1083)

* fix
2023-01-12 12:10:12 -05:00
Angelos Tzotsos 126da2cc41 Reverting SensorThings test fix 2023-01-12 18:22:49 +02:00
Tom Kralidis 808fe82edf add OAMaps datetime to OpenAPI (#1095) (#1096) 2023-01-12 18:11:23 +02:00
Kevin Ngai daca503b43 Fix calls of render_j2_template() to pass in request.locale as the param (not SYSTEM_LOCALE) in order to apply proper translations for /jobs/**/*.html pages and /collection/tiles/index.html templates (#1094)
Co-authored-by: Kevin Ngai <afswken@geomet-dev-03.cmc.ec.gc.ca>
2023-01-12 08:05:14 +01:00
Angelos Tzotsos 2e1f181461 Fix spatialite version 2023-01-10 12:35:10 +02:00
Angelos Tzotsos 9c9111b096 Updating SensorThing test 2023-01-10 12:35:10 +02:00
Angelos Tzotsos 511f0ef09f Update debian control file 2023-01-07 15:19:43 +02:00
Tom Kralidis 30e1adeb79 Happy New Year! 🥳 2023-01-01 12:57:56 -05:00
Tom Kralidis 82c432794e various updates (#1082) 2022-12-27 07:26:21 -05:00