What is required by back-ends to give users an ideal experience with GeoTiff imagery in the Web Editor?
- All GeoTiffs must be valid GeoTiffs (including all required metadata) and should be valid cloud-optimized (COGs). If the files are not exported as COGs, the Editor needs to read the whole GeoTiff file at once which will usually fail with larger files (> 10 MB).
- Range requests must be supported by the server to allow reading COGs.
- CORS must be sent by the server providing the files, especially you need to allow
Range
headers inAccess-Control-Expose-Headers
additionally. - COGs should provide overviews in the files whenever the files get larger than 1 or 2 MB in size. The overview tiles should have a size of at least 128x128 pixels and at maximum 512x512 pixels.
- The GeoTiff must be readable by geotiff.js, especially the data type and the compression must be supported.
- The GeoTiff metadata in the file should contain:
- The no-data value in
TIFFTAG_GDAL_NODATA
, if applicable - A projection, via the "geo keys"
ProjectedCSTypeGeoKey
orGeographicTypeGeoKey
(otherwise provide at least a unit inProjLinearUnitsGeoKey
orGeogAngularUnitsGeoKey
) - GDAL metadata should be provided in the tag
TIFFTAG_GDAL_METADATA
per band:- Minimum and Maximum values (tags:
STATISTICS_MINIMUM
andSTATISTICS_MAXIMUM
) - A band name (tag:
DESCRIPTION
)
- Minimum and Maximum values (tags:
- The
PhotometricInterpretation
of the image should be set to1
(BlackIsZero) if an RGB interpretation is not clear. If RGB is set as interpretation (2
) and you have more than 3 samples per pixel (SamplesPerPixel
), theExtraSamples
should be set. ColorMap
s are supported.
- The no-data value in
- For batch jobs, the STAC metadata is recommended to contain per asset:
- The no-data value either in
file:nodata
(deprecated) or innodata
inbands
- The
minimum
andmaximum
values per band in thestatistics
object inbands
- A band
name
inbands
- The projection in
proj:code
(recommended),proj:wkt2
(not well suported by OpenLayers) orproj:proj4
(deprecated by STAC) - The
type
must be set to the corresponding media type (see below)
- The no-data value either in
- For synchronous execution, the
Content-Type
in the header of the response must be set to the corresponding media type (see below)
Links to the corresponding STAC extensions:
Media Types:
- COGs (
image/tiff; application=geotiff; cloud-optimized=true
) - GeoTiffs (
image/tiff; application=geotiff
)