Commit Graph

1068 Commits

Author SHA1 Message Date
Tom Kralidis 48b5b3b163 add HTTP OPTIONS handling to Django (#1203) 2023-04-04 09:49:22 +02:00
Sander Schaminee 41f3bd801a API design rule support (#1152)
* API design rule support (#1134):

- Change config model
- Change Flask, Starlette, and Django apps for API rule adherence
- Add Flask and Starlette mock clients to test API rule adherence
- Add get_base_url() util function to replace all config['server']['url'] refs
- Ensure that any internal links have URL prefixes if needed
- Add tests and update docs

* Prevent fcntl import error (breaks tests when running locally on Windows)

* Prefer trailing slash in landing page URL when strict_slashes=True (#1134)
2023-04-03 21:30:58 -04:00
Ricardo Garcia Silva c047582155 Generate openapi job endpoint definitions without checking for manager (#1202)
* Generate openapi job endpoint definitions without checking for manager

* Remove has_manager test
2023-04-03 20:30:58 -04:00
Mathieu Tachon 1a1d6362c1 fix(automap): fixes naming conflicts for PostgreSQLProvider (#1184)
* fix(automap): fix naming conflicts for PostgreSQLProvider

Automaping classes and relationships from database schema throws an error if a
column name is the same as a relationship name (see
https://docs-sqlalchemy.readthedocs.io/ko/latest/orm/extensions/automap.html#handling-simple-naming-conflicts).

* renaming function name_for_scalar_relationship -> _name_for_scalar_relationship

* test: test that PostgreSQL provider can handle naming conflicts

Re-use data file from https://github.com/geopython/pygeoapi/pull/1185, and make
to new and empty tables that create naming conflicts when queried.

* Change test function post_collection_items -> get_collection_items

* fix path to table
2023-03-31 13:05:31 +02:00
Tom Kralidis e8acad7120 add support for STAC Azure blob storage backend (#1196) 2023-03-30 16:49:16 -04:00
Benjamin Webb 0f7a8a122c Use sqlalchemy URL function (#1158)
- Use SQL Alchemy URL creation instead of passing a string to create_engine function
- Add Cloud SQL example to docs
2023-03-30 14:52:33 -04:00
Benjamin Webb 9debd89cd8 SensorThings API provider refactor (#1183)
* SensorThingsAPI Provider refactor

- Make code more readable
- Prevent empty SensorThings entity from erroring out pygeoapi

* Fix SensorThings Provider

* Only count on hits

* Fix ref

* Fix ref

- Speed up get_fields
- Simplify intralink process

* Cleanup STA examples

* Add docstrings to functions

* Small fixes

- Split out inner functions
- Add default @iot.id
- Add more debug statements

* Refactor STA paging

- Refactor STA paging
- Reorganize _geometry function
- Update logging
2023-03-30 07:45:12 -04:00
Alexander Pilz d9c377ef62 Feature/mongodb jobmanager (#1186)
* MongoDB Jobmanager

* Add MongoDB-Jobmanager

Example configuration included

* Requested Fixes

Fixes Issues mentioned in latest Review

* Flake8 fixes

Code is fixed on the basis of a flake8 report

* Update ogcapi-processes.rst

* Update ogcapi-processes.rst

* Flake8 fixes

Fixes of flake8 errors
2023-03-30 07:38:43 -04:00
Tom Kralidis 466a1df723 Merge pull request #1190 from tomkralidis/tinydb-updates 2023-03-28 03:41:53 -04:00
Tom Kralidis afc9409491 Merge pull request #4 from rouault/tinydb_fix_bbox_intersects 2023-03-28 03:35:14 -04:00
Even Rouault 13d9cf532f TinyDB provider: fix bbox_intersects() to work with all polygon geometries 2023-03-28 09:30:09 +02:00
Tom Kralidis 21ad9ea8a1 update TinyDBCatalogue based on OARec updates 2023-03-28 03:11:52 -04:00
Even Rouault 4689daab19 TinyDB provider: set [properties][extent][spatial][bbox] from geometry if not provided (#1188) 2023-03-27 12:24:48 -04:00
Even Rouault fcacf69c5b OGC API Features Part 4 fixes: create without id + options (#1187) 2023-03-25 01:32:50 -04:00
Francesco Bartoli 02d6349fd4 Fix returned properties for an item from postgres (#1182)
Fix returned properties for an item from postgres
2023-03-18 16:19:13 +01:00
Tom Kralidis fbf0f4c81a safeguard id detection (#1175) 2023-03-15 21:47:07 +01:00
Sander Schaminee 91051e5df0 Add enclosure link prefetcher and tests (#1169) (#1173) 2023-03-15 09:38:34 -04:00
Aontnio Cereicllo d3590f9047 Upgrading elastisearch.py lib in docker image (#1162)
* Upgrading elastisearch.py lib in docker image

* Unused compatibility mode
2023-03-14 13:18:10 -04:00
Benjamin Webb 4a18393662 Allow STA entity to be URL encoded (#1171) 2023-03-14 12:41:32 -04:00
Benjamin Webb 2f8fff4c8b Use consistent version of leaflet (#1170)
Import consistency for leaflet versions across the templates that use maps

Co-authored-by: Tom Kralidis <tomkralidis@gmail.com>
2023-03-14 11:18:33 -04:00
Benjamin Webb 8eb3e129f3 Fix STA tests (#1168) 2023-03-13 10:00:23 -04:00
Tom Kralidis 4c8d446ae2 default item transactions to GeoJSON payloads (#1166) 2023-03-13 06:59:09 -04:00
Tom Kralidis 2c6de08a44 make locale directory configurable (#1167) 2023-03-13 06:24:32 -04:00
Tom Kralidis a75a606005 safeguard ES aliases (#1164)
* safeguard ES aliases

* add debug
2023-03-06 14:23:31 -05:00
Jo 185255f8e4 - switched coordinate order, to match Leaflet LatLngBounds object (#1163)
https://leafletjs.com/reference.html#latlngbounds
2023-03-06 08:07:19 -05:00
Just van den Broecke 57cfbb5e3f Move PostgreSQL API tests out of test_api.py (#1160)
Moved Postgresql tests from `test_api.py` to `test_postgres_provider.py`.
2023-03-02 17:05:59 +01:00
Benjamin Webb 38299e2dcc Show all columns in /items (#1148)
- Show all columns on /items and overflow table in x direction.
- Render properties missing keys as None in /items HTML table
2023-02-27 18:15:58 -05:00
Tom Kralidis 579251ff5b support GeoJSON id in ES backend (#1159)
* support GeoJSON id in ES backend

* fix
2023-02-27 18:10:50 -05:00
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