# Interpretation of line 7 and 8 of TFW file

I found the following TFW file

0.05     # x-scale; each pixel is 0.05 meters wide
-0.05    # y-scale; each pixel has a height of 0.05 meter
-749.975 # horizontal coordinate of the center of the top left pixel
649.975  # vertical coordinate of the center of the top left pixel
30000    # ?
26000    # ?

I know what the values in the first 6 lines represent.

However, what do the additional two lines represent?

• I'm not sure there should be a line 7 or 8 - see en.wikipedia.org/wiki/World_file Where did you get the file from? Commented Aug 22, 2022 at 11:46
• Just a guess, number of pixels in x and y?
– Bera
Commented Aug 24, 2022 at 13:01
• @BERA I think you're right. If we divide 649.975 / 0.05 = 12,999.50. If we multiply this by 2 and add 1 we get 26000 / the 8th line. Any idea what's the idea behind this? Commented Sep 17, 2022 at 19:02

These are non-standard lines in a TFW file, but they seem to be consistenly used in the website you mentioned in your comment.

For example, besides course.tfw, on the same page there is terrain01.tfw

-0.049997
0.000669
0.000669
0.049997
205.177746
-71.561698
4147
9872

However, both course.jpg and terrain01.jpg are square images:

\$ identify terrain01.jpg
terrain01.jpg JPEG 4096x4096 4096x4096+0+0 8-bit sRGB 3.84914MiB 0.000u 0:00.000
\$ identify course.jpg
course.jpg JPEG 2048x2048 2048x2048+0+0 8-bit sRGB 1.07962MiB 0.000u 0:00.000

Therefore I would not bother: this is just a site-specific implementation. (I reamin curious, however, about the meaning and use of those lines)

• If we divide 649.975 / 0.05 = 12,999.50. If we multiply this by 2 and add 1 we get 26000 / the 8th line. Any idea what's the idea behind this or what could be the purpose of it? Commented Sep 17, 2022 at 19:16
• Good observation. also: 30 000/750 = 26 000/650 = 40, however that doesn't work for the other file (course.tfw). By the way: 649.975 is actually 650 - 0.5/2 because it is the coordinate to the center of the top-left pixels Commented Sep 18, 2022 at 8:33