[Gdal-dev] TFW / WLD file error

Frank Warmerdam fwarmerdam at gmail.com
Fri May 20 08:30:03 EDT 2005


On 5/19/05, Carl Anderson <carl.anderson at vadose.org> wrote:
> 
> I have blundered into an error handling WLD files in Lat/Long usages
> 
> For the following examples I tried tif + tfw, pnm + wld, jpg + wld, jpg
> + jpw image and georeferencing  files.
> I even tried passing it through gdal_translate.
> 
> first example produces invalid info
> 
> if the WLD file is
> 2.014
> 0
> 0
> -2.014
> -85.34
> 34.53
> 
> gdalinfo my.tif
> Driver: GTiff/GeoTIFF
> Size is 395, 511
> Coordinate System is `'
> Origin = (-86.347000,35.537000)
> Pixel Size = (2.01400000,-2.01400000)
> Corner Coordinates:
> Upper Left  ( -86.3470000,  35.5370000)
> Lower Left  (     -86.347,    -993.617)
> Upper Right (     709.183,      35.537)
> Lower Right (     709.183,    -993.617)
> Center      (     311.418,    -479.040)
> Band 1 Block=395x20 Type=Byte, ColorInterp=Red
> Band 2 Block=395x20 Type=Byte, ColorInterp=Green
> Band 3 Block=395x20 Type=Byte, ColorInterp=Blue

Carl,

I'm not sure what you consider to have gone wrong.   Perhaps
you should explain what you were expecting or hoping for. 

I would add that the origin in the world file is the center of
the top left pixel so the gdalinfo top left corner will be half a 
pixel north-west of the origin in the world file.   

In the above example, the values you gave for the origin
seemed like they might be lat/long, but the pixelsize (over
2 degrees by 2 degrees) was quite large.  Is it possible
you thought these pixel sizes were supposed to be in meters
or that they were the width and height of the whole image? 

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the Gdal-dev mailing list