Georeferencing tiff by creating tfw file
Ed McNierney
ed at TOPOZONE.COM
Wed Nov 16 13:53:35 PST 2005
Dejan -
Well, that's not the GeoTIFF output you posted the first time <g>!
What is the "scale" you have (the value that's 25.40363554)? What is
the definition of that value, and its units (if any)? And what are the
definition and the units of the "CAD Overlay" output, too? It's hard to
work with dimensionless, undefined numbers - where did they come from?
We need some more details to be able to help. Thanks!
- Ed
P.S. Please always reply to the whole list, not just to the first
responder.
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: Dejan Gambin [mailto:dejan.gambin at pula.hr]
Sent: Wednesday, November 16, 2005 4:31 PM
To: Ed McNierney
Subject: RE: [UMN_MAPSERVER-USERS] Georeferencing tiff by creating tfw
file
Ed,
Sorry, I have run gdalinfo on the tiff with already existing tfw file
that I have calculated and that is WRONG...
Running gdalinfo on this tif (that has no associated tfw) results in:
Driver: GTiff/GeoTIFF
Size is 8857, 5905
Coordinate System is `'
Metadata:
TIFFTAG_XRESOLUTION=300
TIFFTAG_YRESOLUTION=300
TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch) Corner Coordinates:
Upper Left ( 0.0, 0.0)
Lower Left ( 0.0, 5905.0)
Upper Right ( 8857.0, 0.0)
Lower Right ( 8857.0, 5905.0)
Center ( 4428.5, 2952.5)
Band 1 Block=8857x5905 Type=Byte, ColorInterp=Palette
Color Table (RGB with 2 entries)
0: 255,255,255,255
1: 0,0,0,255
So, I have this output, I have xy coordinates (in meters): 5455750 and
5021000 and I have the scale of 25.40363554. The question remains - how
do I calculate the "pixel size" (first and fourth parameter) of tfw file
that I need to create.
Using CAD Overlay I get the value of 0.08467878514170 that is correct
but I need to know how to get this value by formula, not with util like
CAD Overlay
Sorra again
regards, dejan
> -----Original Message-----
> From: UMN MapServer Users List
> [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Ed McNierney
> Sent: Wednesday, November 16, 2005 4:51 PM
> To: MAPSERVER-USERS at LISTS.UMN.EDU
> Subject: Re: [UMN_MAPSERVER-USERS] Georeferencing tiff by creating tfw
> file
>
>
> 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