Georeferencing tiff by creating tfw file
Ed McNierney
ed at TOPOZONE.COM
Wed Nov 16 07:50:45 PST 2005
Dejan -
The gdalinfo utility is telling you the pixel size. The fourth line of
the output below, beginning with "Origin = ", ends with "Pixel Size = ".
Those are the very same values you would use in the first and fourth
lines, respectively, of a TFW file. It looks like this is the same
value you calculated, and it appears to be correct.
- Ed
Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA 01863
ed at topozone.com
(978) 251-4242
-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Gambin Dejan
Sent: Wednesday, November 16, 2005 8:59 AM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] Georeferencing tiff by creating tfw file
Hi,
Even there are probably some utils I can use, I would still like to know
how can I calculate the "pixel size" parameter in tfw file (so the first
and fourth parameter) from the existing tiff file and the following
informations:
For example, "gdalinfo my.tif" says
Driver: GTiff/GeoTIFF
Size is 8857, 5905
Coordinate System is `'
Origin = (5455749.998925,5021000.001075) Pixel Size =
(0.00215084,-0.00215084)
Metadata:
TIFFTAG_XRESOLUTION=300
TIFFTAG_YRESOLUTION=300
TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch) Corner Coordinates:
Upper Left ( 5455749.999, 5021000.001)
Lower Left ( 5455749.999, 5020987.300)
Upper Right ( 5455769.049, 5021000.001)
Lower Right ( 5455769.049, 5020987.300)
Center ( 5455759.524, 5020993.651)
Band 1 Block=8857x5905 Type=Byte, ColorInterp=Palette
Color Table (RGB with 2 entries)
0: 255,255,255,255
1: 0,0,0,255
I have xy coordinates (in meters): 5455750 and 5021000 and the scale of
25.40363554. I have tried using the simple formula like:
pixel size in inches = scale/resolution, so 25.40363554/300 and
converting it to meters gives me 0.002150841. But this is not correct,
right?
Wiht CAD overlay I have got 0.08467878514170, that is probably right...
What am I doing wrong? Is it the resolution that I am using? Do I have
to use screen resolution or what?
thanks
regards, dejan
More information about the MapServer-users
mailing list