Solved

Increase significant digits of world file (tfw)


Badge +22
  • Contributor
  • 1959 replies

Is there a way to increase the number of significant digits in the world file on the tif writer?

 

 

I have a large imagery dataset with a native resolution of 2.9456395e-6.

When tiling them as set of tif+tfw (required for 3rd party software) the tfw is written as 0.0000029456.

This truncation leads to minor offsets in the tiled images and every 340000 pixels or so, the cumulative offset is a full pixel, leading to black lines when the adjoining tiles are mosaiked.

 

 

icon

Best answer by mark2atsafe 3 July 2019, 18:06

View original

5 replies

Userlevel 4
Badge +25

tif reader? Or writer?

Badge +22

tif reader? Or writer?

Writer. I plead no caffeine today.

Userlevel 4
Badge +25

I suspect that's a limitation of the writer and I'll pass it on to the developers to see what they can do. I don't think it's a limitation of the world file format (since an example on the Esri web site shows more digits than that).

What to do... I can only think to use a FeatureWriter to write the tif data, then follow that up by updating/overwriting the tfw file with the correct info.

But I'll put it to the developers and see what they can do.

Userlevel 4
Badge +25

Writer. I plead no caffeine today.

No worries. I know the feeling when I don't get my morning cup of tea. Filed with the developers as FMEENGINE-60590 and I'll let you know the response.

Badge +22

I suspect that's a limitation of the writer and I'll pass it on to the developers to see what they can do. I don't think it's a limitation of the world file format (since an example on the Esri web site shows more digits than that).

What to do... I can only think to use a FeatureWriter to write the tif data, then follow that up by updating/overwriting the tfw file with the correct info.

But I'll put it to the developers and see what they can do.

It's not a limitation on the world file format.

I am currently post processing the tfws to restore the resolution, but it's not the ideal scenario.

 

 

I'm okay with rounding/truncating the resolution in general, because I wouldn't want a resolution of 1.00000000000001 for instance, but it should be based on significant digits, not string length.

 

 

Reply