Raster, TAB and TFW - different insertion points, same result?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Raster, TAB and TFW - different insertion points, same result?

Robert Fritz

[hidden email] 

Hi,

I have a TIF file which came with an TFW and TAB file for georeferencing informations (sample data from the Ordance Survey, UK).

The TFW looks like:


############### TFW : start
5.000000000000000
0.000000000000000
0.000000000000000
-5.000000000000000
280002.500000000000000
179997.500000000000000
############### TFW : End

I insert the file in QGIS and check the insertion point (Raster Layer Properties >> Metadata), which is 280000,180000. The coordinate is different from the coordinate in the TFW file.

The insertion coordinate in the TAB file is different from the insertion coordinate in the TFW file:


############### TAB : start
!table
!version 3 00
!charset WindowsLatin1

Definition Table
  File "SS86.TIF"
  Type "RASTER"
  (280000,160000) (0,4000) Label "Pt 1",
  (300000,160000) (4000,4000) Label "Pt 2",
  (300000,180000) (4000,0) Label "Pt 3",
  (280000,180000) (0,0) Label "Pt 4"
  CoordSys Earth Projection 8, 79, "m", -2, 49, 0.9996012717, 400000, -100000
  Units "m"
############### TAB : End

When I insert the raster image and use now the TAB file as source for the georeference information, QGIS displays as insertion point 280000,180000.

Both images (one geoferenced by the TFW, one by the Tab) match exactly in QGIS.

My questions:
1. Why are there different insertion points in the TFW and TAB file (for the same image)
2. And why is the image inserted on position 280000,180000, if I use the TFW file but the TFW file contains a different insertion point 280002.500000000000000, 179997.500000000000000 ?

regards, Ro bert



Jetzt neu! Schützen Sie Ihren PC mit McAfee und WEB.DE. 3 Monate   
kostenlos testen. http://www.pc-sicherheit.web.de/startseite/?mc=022220  

_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: Raster, TAB and TFW - different insertion points, same result?

CraigLeat
robert fritz <[hidden email]> wrote:

> I have a TIF file which came with an TFW and TAB file for georeferencing informations (sample data from the Ordance Survey, UK).
>
> The TFW looks like:
>
> ############### TFW : start
> 5.000000000000000
> 0.000000000000000
> 0.000000000000000
> -5.000000000000000
> 280002.500000000000000
> 179997.500000000000000
> ############### TFW : End
>
> I insert the file in QGIS and check the insertion point (Raster Layer Properties >> Metadata), which is 280000,180000. The coordinate is different from the coordinate in the TFW file.
>
> The insertion coordinate in the TAB file is different from the insertion coordinate in the TFW file:
>
> ############### TAB : start
> !table
> !version 300
> !charset WindowsLatin1
>
> Definition Table
>  File "SS86.TIF"
>  Type "RASTER"
>  (280000,160000) (0,4000) Label "Pt 1",
>  (300000,160000) (4000,4000) Label "Pt 2",
>  (300000,180000) (4000,0) Label "Pt 3",
>  (280000,180000) (0,0) Label "Pt 4"
>  CoordSys Earth Projection 8, 79, "m", -2, 49, 0.9996012717, 400000, -100000
>  Units "m"
> ############### TAB : End
>
> When I insert the raster image and use now the TAB file as source for the georeference information, QGIS displays as insertion point 280000,180000.
>
> Both images (one geoferenced by the TFW, one by the Tab) match exactly in QGIS.
>
> My questions:
> 1. Why are there different insertion points in the TFW and TAB file (for the same image)
> 2. And why is the image inserted on position 280000,180000, if I use the TFW file but the TFW file contains a different insertion point 280002.500000000000000, 179997.500000000000000 ?
>
> regards, Robert
>
>  

Hi Robert

Your raster has cells measuring 5 x 5m and so the centre point is 2.5m
from each edge. Notice that the co-ordinates you provided for the two
insertion points differ by 2.5m, north and east. The reason for the
difference is that the World File uses the co-ordinates for the *centre*
of the upper left pixel to position the raster and the TAB file is using
the *top left corner* of the upper left pixel of your raster.

Details on the World File specification are available here:
http://en.wikipedia.org/wiki/World_file

Best regards

Craig.

_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user