Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Documentation for OGC API Coverages Formats #1765

Open
SpeckiJ opened this issue Jul 29, 2024 · 0 comments
Open

Fix Documentation for OGC API Coverages Formats #1765

SpeckiJ opened this issue Jul 29, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@SpeckiJ
Copy link

SpeckiJ commented Jul 29, 2024

Is your feature request related to a problem? Please describe.

There currently exists a hardcoded list of allowed FORMAT_TYPES every request is validated against. All requests with non-conforming formats are directly dropped as invalid by the API.

The Examples in the documentation for OGC API Coverages use different format types, i.e. application/x-grib2 or zarr, without any mention that those are not supported without prior modifications to the source-code.

There is a very small comment in this [commit] (d25d0cf), that modifications to the source-code are necessary, but this is not easily findable and does not really offer guidance on how to fix the issue

Describe the solution you'd like

Either FORMAT_TYPES should be extendable by providers (every provider adds his own TYPES, or the documentation should include a large disclaimer that these examples are only exemplary and not functional. The current disclaimer:

The Rasterio provider format.name directive requires a valid GDAL raster driver short name.

is very misleading as it suggests that you can use any valid GDAL raster driver short name, when in fact you can not use a single one of these as none of them match FORMAT_TYPES

Describe alternatives you've considered

You can workaround the issue by serving a different mime_type when requesting a valid format, as demonstrated here (this passes validation as html is a valid type, but actually image/tiff is returned). But this is certainly not a clean solution and probably not compatible with most clients.

    providers:
      - type: coverage
        name: rasterio
        data: ./test.tif
        format:
          name: html
          mimetype: image/tiff
@SpeckiJ SpeckiJ added the enhancement New feature or request label Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant