[gdal-dev] OAPIF and apikey

Even Rouault even.rouault at spatialys.com
Wed May 13 02:28:26 PDT 2020


> The generated requests contain &limit=10 and &limit=5 and value 10 is used.
> HTTP:
> Fetch(https://avoin-paikkatieto.maanmittauslaitos.fi/maastotiedot/features/
> v1/collections/hylky/items?next=MDoxMzk%3D&api-key=12be7903-e203-4836-9bd9-8
> cc6bdfcf880&limit=10&api-key=12be7903-e203-4836-9bd9-8cc6bdfcf880&limit=5)

Yes, there's no logic to de-duplicate KVP parameters. It just append any present in the 
connection string

> 
> This leads to next question: Is there a way to run ogrinfo for a small
> sample of OAPIF collection that can contain millions of features? I can set
> the page size (limit) with an open option but ogrinfo follows the "next"
> links until the end of data.

Apart Ctrl-C, no. Adding a -limit option to ogrinfo could also be done.

> Finally, I think that the default page_size could be increased to 1000 from
> the default that is 10.

The server can advertize a larger default page size in the API document. This was 
implemented in the QGIS OPAIF provider, but I see that it isn't in the OGR one. Anyway, 
servers seem to stick to the default 10 which was chosen in the standard. I presume this 
might be for HTML rendering. Or maybe just the result of a (dodecahedronal) die roll.

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20200513/01c627b8/attachment.html>


More information about the gdal-dev mailing list