2

I found the following TFW file

0.05     # x-scale; each pixel is 0.05 meters wide
0        # rotation about x-axis
0        # rotation about y-axis
-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?

3
  • 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?
    – Ian Turton
    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?
    – HJA24
    Commented Sep 17, 2022 at 19:02

1 Answer 1

3
+25

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

which reads:

-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)

2
  • 1
    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?
    – HJA24
    Commented Sep 17, 2022 at 19:16
  • 1
    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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.