[pygeoapi] configure a COG collection?

Tom Kralidis tomkralidis at gmail.com
Sun Apr 24 19:15:16 PDT 2022


Hi Travis:

1./ correct, OGC API - Coverages does not support HTTP Range request
headers at the moment. This
concept was presented and discussed at last week's Cloud Native Geospatial
Outreach Event.  As OGC API -
Coverages evolves, we may see a conformance class for cloud optimized
coverage requests.  Having said this,
I see a use case where we could provide this capability where if an HTTP
Range request is passed to /collections/{collectionId}/coverage, this would
override any OGC API - Coverages
functionality, thus kicking into "cloud optimized" mode.  Please feel free
to open a pygeoapi issue on GitHub
and I can take a deeper look.

Regarding using GDAL's OGC API - Coverages support, can you retry with the
following changed in your
pygeoapi provider configuration:

format:
   name: GTiff  # per
https://docs.pygeoapi.io/en/latest/data-publishing/ogcapi-coverages.html#rasterio
   mimetype: image/tiff; application=geotiff

This then works for me when running gdalinfo OGCAPI:
http://example.org/collections/foogdps-temperature -oo API=COVERAGE


2./ Regarding using AWS vars, I believe this is natively supported in
Rasterio proper via environment variables.

..Tom


On Sat, Apr 23, 2022 at 10:29 AM Travis Kirstine <traviskirstine at gmail.com>
wrote:

> Hi All,
>
> Sorry but I'm a bit of newb to the Open API / OGC API world and have a few
> questions that perhaps some kind person could shed some light on.
>
> I have a client who would like to leverage a swagger / open api interface
> to retrieve aerial imagery data in a Cloud Optimized Geotiff format using
> http range requests.  So my initial thought was to set up a collection with
> a coverage provider.  Is this possible using pygeoapi?
> The docs at this point aren't that clear but this is what I've set in the
> config:
>
>     halton_2021:
>         type: collection
>         title: Halton Imagery
>         description: Example imagery
>         keywords:
>             - canada
>             - ontario
>         extents:
>             spatial:
>                 bbox: [-80.174,43.281,-79.608,43.746]
>                 crs: http://www.opengis.net/def/crs/OGC/1.3/CRS84
>         providers:
>             - type: coverage
>               name: rasterio
>               data: tests/data/2137HALT_2m_overall_cog.tif
>               format:
>                   name: tif
>                   mimetype: image/tiff; application=geotiff;
> profile=cloud-optimized
>
> The issue I'm having is that it appears the OCGAPI coverage does not
> support http range requests and I'm having issues connecting to the data
> using GDAL OGCAPI driver.
>
> gdalinfo OGCAPI:http://server26.foobar.com:5000/collections/halton_2021
> -oo API=coverage
> ERROR 1: API coverage requested, but not available
>
> My second question is that eventually we would be moving this to a AWS
> instance in which the source COGs would be stored in s3 buckets using
> server side encryption AES-256.  Is it possible to use a http data source
> for a  coverage and can I configure the rasterio's GDAL AWS vars in the
> config.
>
> Thanks
>
>
>
>
>  At some point I'd be moving the application to AWS with
> _______________________________________________
> pygeoapi mailing list
> pygeoapi at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/pygeoapi
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pygeoapi/attachments/20220424/d4666a10/attachment.html>


More information about the pygeoapi mailing list