Open bertcoerver opened 3 years ago
I'd be curious to see if you find this in the GDAL tagged metadata.
const image = geotiff.getImage(0);
console.log(image.getGDALMetadata());
Also worth trying with a specific band (e.g. image.getGDALMetadata(1)
);
If your data is available that others can access it, that would make it easier to figure out what is possible.
As far as I can tell, GDAL uses this tag https://www.awaresystems.be/imaging/tiff/tifftags/gdal_metadata.html with OFFSET
and SCALE
XML tags. So it should be possible to get those values for each band and multiply the result.
I'm thinking of doing this inside of readRasters
directly, controlled with a parameter.
I'm thinking of doing this inside of
readRasters
directly, controlled with a parameter.
The nodata values might complicate this story.
Can nodata be converted to NaN / user-defined value (for non-float bands) automatically?
Given an GeoTIFF like the one below, is it possible with Geotiff.js to somehow get the scale and offset factors that are defined inside the file at the band-level? For now I'm hardcoding the scale-factors into my code, but it would be convenient if I could read them from the geotiffs themselves (or even better if geotiff.js would already apply them to the data, like for example QGIS is doing).