BYOC: changes on COG header and tile size and request resolution

Increasing COG header size limit

We increased header size limit from 30k bytes to 1 megabyte, which means now you can import even bigger images.

Constraining COG tile size

Currently, we support the ingestion of COG files with any internal tile size as far as it is the same across all overviews. However, very small or very large internal tiles are not optimal for processing. This is why we plan to constrain the COG internal tile size to be between 256 * 256 pixels to 2048 * 2048 pixels. When preparing COGs with GDAL, the internal tile size can be set as the value of the BLOCKSIZE parameter, e.g. gdal_translate -co BLOCKSIZE=1024 ... will result in an internal tile size of 1024 * 1024 pixels. The default value of the BLOCKSIZE parameter is 512. COG files that won’t meet the constraint will be rejected at the ingestion of BYOC tiles. This will not impact already ingested BYOC data.

We plan to introduce the constraint on the 7th of September.

Constraining request resolution

Currently, we limit requesting of BYOC data (using Process API or OGC services) to 1500 meters per pixel per request regardless of what the source data spatial resolution is. This can be very limiting when working with low resolution data (e.g. 5000 m/pixel) or can result in performance problems when requesting high resolution data (e.g. 0.5 m/pixel). We plan to change this so that the request limit will depend on the data in each BYOC collection. The limit, referred to as “collection maxMetersPerPixel”, will be set to:

  • collection maxMetersPerPixel = max (500 meters per pixel, 5 x median of tiles’ maxMetersPerPixel)
  • tile maxMetersPerPixel = maximum meters/pixel of all bands’ imagery (= main images and valid overviews)
  • valid overview = an overview that has maximum dimension greater than or equal to 256 pixels

If you prepare COG files using GDAL’s COG driver you do not need to set OVERVIEWS parameter since its default setting ensures that all overviews are “valid” (as defined above).

You will be able to check the values of the limits using BYOC API or in Sentinel Hub Dashboard. This constraint will also be introduced on the 7th of September.

1 Like

Here’s where you can get collection maxMetersPerPixel from BYOC API and in Sentinel Hub Dashboard.