pygeoapi icon indicating copy to clipboard operation
pygeoapi copied to clipboard

No Type on collections page or Tiles heading in the collection when only provider is OA-Tiles

Open KoalaGeo opened this issue 3 years ago • 3 comments

Description When a collection has only a provider for MVT to serve OGC API - Tiles, the HTML pages at the /collections/ level have Type = blank for that collection. The HTML page for the collection itself, doesn't have a subheading "Tiles" with link to the Tiles url eg http://pygeoapi-2018-main.kube-idev.bgslcdevops.test/collections/BGSGeology625kBedrock/tiles as the user sees when there is also OGCAPI - Features available.

Steps to Reproduce Steps to reproduce the behavior:

Expected behavior HTML pages for tiles only collections should match feature + tiles collections

On the /collections/ pages Type should be "Tiles" When Features and Tiles are available Type = "Features, Tiles"

Screenshots/Tracebacks Type is blank image

No Tiles subheading although link to Tiles as HTML and Tiles as JSON is available image

Expected layout with Tiles subheading, as generated when OA-Features also present image

Environment

  • OS: Docker image
  • Python version: Docker Image
  • pygeoapi version: 0.11dev0

Additional context Add any other context about the problem here.

KoalaGeo avatar Oct 25 '21 21:10 KoalaGeo

See current config https://github.com/BritishGeologicalSurvey/bgs-pygeoapi

KoalaGeo avatar Oct 26 '21 14:10 KoalaGeo

I have a similar issue, but the "tiles" keyword does not appear also when along with OGC API Features - only "feature" is displayed at collection level. mvt1 Then the tiles are exposed in the links of the collection mvt2 But an error is displayed, when trying to access them: pygeoapi_es | Traceback (most recent call last): pygeoapi_es | File "/usr/lib/python3/dist-packages/flask/app.py", line 2446, in wsgi_app pygeoapi_es | response = self.full_dispatch_request() pygeoapi_es | File "/usr/lib/python3/dist-packages/flask/app.py", line 1951, in full_dispatch_request pygeoapi_es | rv = self.handle_user_exception(e) pygeoapi_es | File "/usr/lib/python3/dist-packages/flask_cors/extension.py", line 161, in wrapped_function pygeoapi_es | return cors_after_request(app.make_response(f(*args, **kwargs))) pygeoapi_es | File "/usr/lib/python3/dist-packages/flask/app.py", line 1820, in handle_user_exception pygeoapi_es | reraise(exc_type, exc_value, tb) pygeoapi_es | File "/usr/lib/python3/dist-packages/flask/_compat.py", line 39, in reraise pygeoapi_es | raise value pygeoapi_es | File "/usr/lib/python3/dist-packages/flask/app.py", line 1949, in full_dispatch_request pygeoapi_es | rv = self.dispatch_request() pygeoapi_es | File "/usr/lib/python3/dist-packages/flask/app.py", line 1935, in dispatch_request pygeoapi_es | return self.view_functions[rule.endpoint](**req.view_args) pygeoapi_es | File "/pygeoapi/pygeoapi/flask_app.py", line 304, in get_collection_tiles pygeoapi_es | headers, status_code, content = api_.get_collection_tiles( pygeoapi_es | File "/pygeoapi/pygeoapi/api.py", line 122, in inner pygeoapi_es | return func(cls, headers_, format_, *args, **kwargs) pygeoapi_es | File "/pygeoapi/pygeoapi/linked_data.py", line 53, in inner pygeoapi_es | return func(*args, **kwargs) pygeoapi_es | File "/pygeoapi/pygeoapi/api.py", line 1544, in get_collection_tiles pygeoapi_es | tiles['tileMatrixSetLinks'] = p.get_tiling_schemes() pygeoapi_es | File "/pygeoapi/pygeoapi/provider/mvt.py", line 119, in get_tiling_schemes pygeoapi_es | tile_matrix_set_links = [ pygeoapi_es | File "/pygeoapi/pygeoapi/provider/mvt.py", line 121, in <listcomp> pygeoapi_es | 'tileMatrixSet'] in self.options['schemes']] pygeoapi_es | TypeError: 'NoneType' object is not subscriptable

doublebyte1 avatar Dec 13 '21 17:12 doublebyte1

I added a PR to address this issue: https://github.com/geopython/pygeoapi/pull/834

doublebyte1 avatar Dec 17 '21 12:12 doublebyte1