Commit Graph

1152 Commits

Author SHA1 Message Date
Bernhard Mallinger 8d377072b9 Allow retrieving extra properties in oracle provider (#1544)
* Implement extra_properties in oracle Provider

These can be used to configure additional database-computed fields
in the config file which are returned on `get` and `query` calls

* Allow mandating properties which are not part of the output

Previously, properties which were not requested for the output
were not part of `fields`, which means that they were not passed
in to the provider as filter properties for e.g. `query()`.

This commit adds them there and introduces a new variable
`filtered_fields`, which is used for limiting the output of queries.

There is also some minor refactoring, but the existing and also the
newly written tests should avoid regressions.

* Restore previous behavior for default arguments
2024-03-06 10:24:51 -05:00
Francesco Bartoli 34d595accf Update openapi.py (#1574) 2024-03-03 16:49:02 -05:00
Jo b6bf0a72b2 - updated emoji to something more readable (#1571) 2024-03-02 13:31:21 -05:00
Tom Kralidis 80b7a0c48c clean up API docs, move plugins to wiki (#1572) 2024-03-02 17:44:10 +00:00
Francesco Bartoli 4f97c5ebac Uncomment gdal (#1567)
* Uncomment gdal
* Add step to use UbuntuGIS unstable ppa
* Fix sudo privileges
* Pin gdal below 3.8.4
Pin gdal below 3.8.4
* Fix OGR tests which are intermittently giving inconsistent results
2024-03-02 13:59:08 +02:00
Angelos Tzotsos 11824d28ee Enable back UbuntuGIS to get GDAL 3.8.x. (#1570)
* Enable back UbuntuGIS to get GDAL 3.8.x.
* Update to latest Jammy base image.
* Add software-properties-common to Build dependencies so it gets removed on cleanup.
2024-03-01 18:35:59 +02:00
Jo 74f4772a63 Make tiling scheme parameter optional (#1566)
* - Remove the need to define a tiling scheme in the configuration, for providers that support only one scheme
- Support only WebMercatorQuad for  mvt-elastic tiles

* - updated documentation for MVT-elastic provider

* - remove the need of a tiling scheme option in MVT-tippecanoe provider

* - updated tiles documentation with support to tiling-schemes

* - fixed regression bug with coordinate order on vector tile preview

* - add working url for wmts-facade code snippet

* - fixed flake8 example
2024-03-01 11:03:50 -05:00
Tom Kralidis 8ecb00a6b7 update HTML collection page (#1568) (#1569) 2024-03-01 11:03:26 -05:00
Simon Seyock 5764d3b926 WMTS Provider (#1473)
* feat: add WMTSFacadeProvider

* feat: add tileset metadata to tile page

* feat: add jpeg format

* fix: minor adjustments

* fix: remove tms_facade

* chore: fix flake8 errors

* docs: add docs for publishing with the WMTS provider

* docs: spelling

* fix: adjust metadata_format for WMTSFacade

* fix: address review

* fix: use mimetype as link type
2024-03-01 08:42:38 -05:00
Peter Garnæs f092cf548e Django server: EDR sanity test (#1530)
* EDR queries without instance id works

Django URL's without instance IDs called a method requiring instance
IDs, resulting in a crash.

Instance ID defaults to None, which is also standard for the provider
that ultimately will be called.

Regression test added

* Use fixtures in django server tests

---------

Co-authored-by: Peter Garnæs <pga@dmi.dk>
2024-02-29 13:48:57 -05:00
Peter Garnæs 462b4f3566 EDR /locations and /locations/{locId} endpoints (#1487)
* Expose EDR locations queries to the provider interface

The EDR specification allows for locations queries to be performed:
https://docs.ogc.org/is/19-086r6/19-086r6.html#_60c4d31c-62f2-4dc7-9a3e-6a1a9127d29e

Providers should be allowed to implement these query types.

* Generate correct OpenAPI spec for EDR locations collections

* Imlement EDR locations query routing for providers in django

---------

Co-authored-by: Peter Garnæs <pga@dmi.dk>
2024-02-29 13:48:07 -05:00
Tom Kralidis 3ce68acdb8 keep 4326 bbox and crs for coverages (#1564) 2024-02-28 18:04:18 +02:00
Tom Kralidis 78c6e953bc fix OACov based collection output (#1561) 2024-02-28 07:01:34 -05:00
Aleksandar Zec f4c2ff970f #1545 fix: resolved issues on Breadcrumb routes for TMS endpoints (#1555) 2024-02-28 05:48:27 -05:00
Resad Hajdarpasic f472a5f8a6 fix Django EDR implementation on non-instance endpoints (#1528) (#1549)
* fix Django EDR implementation on non-instance endpoints (#1528)

* clean up code to follow PEP8 and fix docstring (#1528)

* remove trailing comma from view definition args (#1528)

---------

Co-authored-by: Resad Hajdarpasic <resad.hajdarpasic@planetsoft.eu>
2024-02-28 03:34:46 -05:00
PascalLike a640f7c487 PostGIS MVT provider and docs (#1552)
* Adding mvt Postgis provider

* Fix test

* Update docs

* Rename mvt_postgis to mvt_proxy

* Update ogcapi-tiles.rst

* Update mvt_proxy.py

* Remove not implemented method

* Fix typo

---------

Co-authored-by: Tom Kralidis <tomkralidis@gmail.com>
2024-02-27 14:56:02 -05:00
Tom Kralidis 452e8c4254 align OACov to latest specification updates (#1548)
* align OACov to latest specification updates

* fix

* fix

* fix

* fix
2024-02-27 13:25:51 -05:00
Emmanuel Jolaiya 988d8aa7e2 fixed bug with breadcrumb routes (#1554)
* fixed bug with breadcrumb routes

* removed example files in commit

* Delete example-openapi.yml

* Delete example-config.yml
2024-02-27 16:37:56 +00:00
bojanKuzma 4b2b60c1de Added translations for Serbian and Bosnian language (#1553)
Co-authored-by: Bojan Kuzmanovic <bkuzmanovic@planetsoft.ba>
2024-02-27 10:37:27 -05:00
Bernhard Mallinger 6bd1bc1118 Clear up space before running CI (#1550)
* Clear up space before running CI

With all the databases and dependencies more than the 19G is
needed (this is the amount which is currenlty available on runners).

There is a github action which meddles with the disc layout, which is
probably too much for our use case, but it gave me the idea that you can
delete files which are needed to support certain platforms such as
dotnet and android.
https://github.com/easimon/maximize-build-space

With only manually removing those files, around 30G are available which
should be enough for the foreseeable future

* Update main.yml

---------

Co-authored-by: Tom Kralidis <tomkralidis@gmail.com>
2024-02-27 07:52:02 -05:00
David Huard b54bdd80a8 Use get to fetch units attribute to avoid error if missing. (#1539) 2024-02-22 23:13:24 -05:00
Jo c85d6003b4 Merge pull request #1535 from geopython/docs-oatiles-ri
add OGC API - Tiles as RI in docs
2024-02-09 15:07:33 +00:00
Tom Kralidis c3adc94269 add OGC API - Tiles as RI in docs 2024-02-09 07:59:00 -05:00
Ricardo Garcia Silva 88ae474627 run api in another thread when using starlette (#1533) 2024-02-02 20:34:09 +01:00
Jo ffd33fafc1 Merge pull request #1532 from doublebyte1/fix-rel-type
Fixed typo in the tiling scheme "rel" property
2024-02-02 16:46:37 +00:00
doublebyte cb3b2cd2dc - fixed typo in the tiling scheme rel type 2024-02-02 16:23:38 +00:00
Aontnio Cereicllo c6d506aa0b Get tiles metadata also from URL (#1526) 2024-02-01 10:15:02 +01:00
Ricardo Garcia Silva 2d0fc5df3e Convert coordinates to storage crs when filtering via cql (#1489)
* Allow either URL or URN CRS URIs

* Implemented transformation of geometries in CQL filter

* Fixed flake8 issue

* Removed commented out code

* Implemented support for the filter-crs query parameter

* Remove unneeded print() calls
2024-01-30 20:16:12 -05:00
Jo de787b0f22 Return a 400 status code for an "out-of-range" get tile request (#1503)
* - return a 400 error, when the MVT_elastic provider receives a request for a tile out of range

* -Catching errors on get_tile requests for mvt-elastic provider:
 - if the status code is bellow 500, it throws a ProviderInvalidQueryError (status code 404)
 - otherwise it throws a server error (status code 500)
- the api catching of errors is left as it was before, as the appropriated status code is being sent by the provider.

* - updated condition on tiles request (mvt-provider), to exclude responses with a status of 500 from throwing a client error
2024-01-30 20:11:13 -05:00
Jo 18eeaf79e4 Addressing Requirements class 2 (Requirements Class Tileset) of the OGC API Tiles Standard (#1497)
* - refactored mvt classes to support all implemented metadata formats, regardless of the provider

* - fixed formatting issues

* Implementing basic tile metadata methods

* Fixing yml models

* Adding additional format

* Fixing schema set on load

* Removing unused field from documentation

* - added support to TileMatrixSets endpoint
- added TileMatrixSet definitions for WorldCRS84Quad and WebMercatorQuad

* - added tiling-schemes link in the json representation of the landing page

* - added html pages for tilematrixset endpoints

* - advertise json and html representations of the tiling schemes in the landing page

* - Use api definition of Well-known TileMatrixSets in the tiling-schemes element of the tiles metadata page

* - added tiling-scheme url on tiles metadata page, for es and tippecanoe providers

* - fixed flak8 formatting errors

* - updated number of links  on the landing page, on the api test

* - Manage tile matrix set id dinamically, on tilematrix set flask endpoint

* - renamed functions to lower case

* - renamed tilematrix set functions on flask

* - Use TtileMatrixSetId parameter in tilematrixset api function

* - added support to TileMatrixSet endpoints on starlette

* - added test for tileMatrixSets api endpoint

* - added test for the tilematrixset endpoint

* - added routes for django

---------

Co-authored-by: Antonio Cerciello <antonio.cerciello@gmail.com>
2024-01-30 20:10:43 -05:00
Bernhard Mallinger 278004d703 Pass OPENAPI_DOCUMENT to API also in django mode (#1510)
* Pass OPENAPI_DOCUMENT to API also in django mode

Fixes #1509

* Add basic test for django

This only verifies that one page loads, which however
covers most of the django setup.

* Install django requirements in CI
2024-01-30 14:57:45 -05:00
Ricardo Garcia Silva 8e7f8fc26d Added pre-commit config file (#1508)
* Added .pre-commit-config.yaml file

* Initial pass of pre-commit with its default rules and flake8

* Revert "Initial pass of pre-commit with its default rules and flake8"

This reverts commit 86d39e964e8122580d675f4639ae2d15b85c02e2.

* Made pre-commit only act on code files

* Added sql to the pre-commit file pattern

* Initial pass of pre-commit
2024-01-30 12:37:16 -05:00
Jo c5353d889a Give support to serving mvt-tippecanoe tiles from an url (#1507)
* - give support to serving mvt-tippecanoe tiles from an url

* - replaced use of os.path by Path
2024-01-30 17:40:47 +01:00
Jo 3f991a225e Merge pull request #1511 from doublebyte1/conformance
Update conformance declaration for OGC API - Tiles
2024-01-30 09:03:17 +00:00
Jeff McKenna ac95a88511 expand TinyDB path message, for ProviderConnectionError (#1518)
* expand TinyDB msg

* expand TinyDB msg

* fix long line

* fix long line
2024-01-29 11:27:40 -05:00
Ricardo Garcia Silva 8ffc354adf Fixed warnings related to migration to sqlalchemy2 in tests (#1520) 2024-01-29 08:25:01 -05:00
doublebyte 04bbecbd02 - update conformance declaration for OGC API - Tiles 2024-01-22 15:12:16 +00:00
Jo e1fe05c1c1 - return 200 on the response headers of a successfull get tile request (#1500) 2024-01-17 14:05:55 +01:00
Aontnio Cereicllo 09cb2c07bd Tiles Metadata provider refactor (#1482)
* - refactored mvt classes to support all implemented metadata formats, regardless of the provider

* - fixed formatting issues

* Implementing basic tile metadata methods

* Fixing yml models

* Adding additional format

* Fixing schema set on load

* Removing unused field from documentation

* Change method name to generic vendor

* Keeping extra metadata info for tippecanoe provider

* Fix flake validations error

---------

Co-authored-by: doublebyte <doublebyte@hushmail.com>
2024-01-15 20:21:07 +01:00
Tom Kralidis c36f8ad9ba Update dummy.py 2024-01-15 13:56:13 -05:00
Matt Walker ae94e17952 Log exception detail when debugging a process (#1496)
Swap LOGGER.error for LOGGER.exception so that details of an exception that occurs during process execution are logged including the traceback to make debugging easier.
2024-01-15 13:54:22 -05:00
Bernhard Mallinger 1da681bf1b Generalize provider error handling to processes (#1495)
This allows triggering errors from a processor with specific
http status code, ogc exception code and a custom message.

This is very useful the processor realizes that the input parameters
don't make sense or are not allowed, in which case it can supply a
descriptive error message and an http status code different from 500.
2024-01-15 13:54:00 -05:00
Bernhard Mallinger af5dbb8350 Add tests for get_job_result (#1494)
This api method did not have any tests until now.

This also contains a small fix: If no content type was requested,
then by default, the header specified the content type
`application/json`, whereas the content was actually html. Note that
this is rarely a problem because browsers do request html explicitly.
2024-01-15 13:53:06 -05:00
Ricardo Garcia Silva f0638f445f Removed the dependency on nest-asyncio (#1493) 2024-01-15 13:52:37 -05:00
Ricardo Garcia Silva 62b8d67018 fixed failing starlette tests (#1491) 2024-01-15 01:07:26 +01:00
Tom Kralidis 635562f966 import Admin module based on runtime configuration (#1469) (#1485) 2024-01-09 17:32:47 -05:00
Sarah Jordan fe7ea108a7 Data return for STAC collections (#1483)
* render data viewing page for collections #1409

render data viewing page for STAC collections if there is no STAC item below.

* flake8

* flake8

* add additional check for collections

* render data viewing page for collections #1409

render data viewing page for STAC collections if there is no STAC item below.

* flake8

* flake8

* add additional check for collections
2024-01-09 16:14:02 -05:00
Francesco Bartoli e9bb5dcc95 Check docker image CVEs in vulnerabilities workflow (#1480)
* Add step for checking docker image CVEs

* Add buildx command and path to Dockerfile

* Fix working directory

Fix working directory

Fix working directory

Fix working directory

* Use trivy action

Use trivy action

* Use github placeholder over custom variable
2024-01-06 19:12:33 -05:00
Francesco Bartoli 3c5a4cda9c Add a step in CI for CVEs scanning (#1478)
* Add a step in CI for CVEs scanning

* Move the check for vulnerabilities on its own workflow

* Clean the clone job and comment accepted risk

* Add a badge for vulnerabilities clearance in the readme
2024-01-06 11:37:37 -05:00
Benjamin Webb 0a47ad28c9 Update starlette documentation (#1461)
* Add starlette / docker

* Update Starlette documentation

* Remove starlette docker example

* Revert "Add starlette / docker"

This reverts commit 6cb6d6f10a789c9c6a0adf5e925857be5183009d.

* Partially revert "Update starlette documentation"
2024-01-05 19:32:09 -05:00