GeoTIFF – Reversing Geo-Referencing Formula Using World File Information

geometrygeoreferencingworld-file

I am trying to reverse the georeferencing formula for a TIFF using the world file information. Formula found at http://webhelp.esri.com/arcims/9.3/General/topics/author_world_files.htm

The raster is a UK Ordnance Survey OS Terrain 50 extract (50m resolution)

Conversion on the X coord is fine, but the y coord goes wrong putting me in a raster one cell to the north of the one it should be.

The referencing formula for y coord is:

y1 = Dx + Ey + F

Where: y1 = calculated y-coordinate of the pixel on the map x = column number of a pixel in the image y = row number of a pixel in the image D = rotation terms on the Y Axis F = translation terms; x,y map coordinates of the center of the upper-left pixel E = negative of y-scale; dimension of a pixel in map units in y direction

The D value is 0 (no rotation) in these files so I am left with:

y1 = Ey + F

To reverse this to find y form a known y1 coord I get

y = (y1-F)/E

I can't see what is wrong the above, and similar version works fine for the X coords.

Does anyone know if there is something missing from the original formula / georeferencing process or see what is going wrong?

Best Answer

I do not see what is wrong with a simple example with your formulas

y1 = Ey + F
y = (y1-F)/E

E=-2
y=100 
F=1000 

y1 = -2*100 + 1000 = 800

Reverse with y1 gives the original y

y = (800-1000)/-2 = 100
Related Question