Skip to main content
Question

Scale factor on COG

  • July 7, 2025
  • 8 replies
  • 85 views

jdh
Contributor
Forum|alt.badge.img+38

I have a COG with a scale factor (excerpt from GDALInfo)
Band 1 Block=1024x1024 Type=Int32, ColorInterp=Gray
  Min=-50313.000 Max=57304.000
  Minimum=-50313.000, Maximum=57304.000, Mean=4745.177, StdDev=7550.452
  NoData Value=-32767
  Offset: 0,   Scale:0.1

How do I apply this scale factor in FME?   If I clip the input and create a new tif,  the scale factor is dropped and the values are 10 times the expected.

In this particular case I can just scale the value back down, but in general, is there a way to retrieve the scale factor and apply it?

 

8 replies

geomancer
Evangelist
Forum|alt.badge.img+59
  • Evangelist
  • July 7, 2025

Untested, as I don't have a COG at hand, but the documentation mentions

geotiff_exif_digitalzoomratio Represents the digital zoom ratio when the image was shot. If the numerator of the recorded value is 0, this indicates that digital zoom was not used.

Hopefully this attribute is related to the scale GDALInfo mentions.


jdh
Contributor
Forum|alt.badge.img+38
  • Author
  • Contributor
  • July 7, 2025

I just checked and the geotiff_exif_digitalzoomratio tag is not populated.


geomancer
Evangelist
Forum|alt.badge.img+59
  • Evangelist
  • July 7, 2025

That's a pity...


crystalatsafe
Safer
Forum|alt.badge.img+26

Hi ​@jdh 

I don't believe FME currently supports scale factors in GeoTIFF. 
I have submitted an internal ticket for our development team (internal reference: FMEENGINE-87393) to explore the possibility of implementing this. I will make sure to update you on the progress. 


jdh
Contributor
Forum|alt.badge.img+38
  • Author
  • Contributor
  • July 15, 2025

Hi ​@jdh 

I don't believe FME currently supports scale factors in GeoTIFF. 
I have submitted an internal ticket for our development team (internal reference: FMEENGINE-87393) to explore the possibility of implementing this. I will make sure to update you on the progress. 

Even an interim solution where the scale factor can be retrieved as metadata would be a useful step forward.


crystalatsafe
Safer
Forum|alt.badge.img+26

Hi ​@jdh 

Can you please share your workspace and a sample dataset


jdh
Contributor
Forum|alt.badge.img+38
  • Author
  • Contributor
  • July 17, 2025

@crystalatsafe   The dataset is from https://zenodo.org/records/15689805    The workspace was just a Shapefile reader (AOI) → featureReader (clip to Initiator Envelope) → COG Writer


crystalatsafe
Safer
Forum|alt.badge.img+26

Hi ​@jdh 

I'm sorry for the late response!

While our development team continues to look into this, you could try embedding an external tool or Python into Form.

Perhaps a library like this may be able to extract metadata, such as scale factor: https://pypi.org/project/tifftools/