<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Frank Warmerdam wrote:
<blockquote cite="mid45ACFF67.2000201@pobox.com" type="cite">Zoltan
Szecsei wrote:
  <br>
  <blockquote type="cite">Hi,
    <br>
Is there an easy utility (linux commandline preferable, but windows OK)
to de-skew a geo-referenced scanned map?
    <br>
Typically the TFW files look like this:
    <br>
    <br>
0.317469
    <br>
0.001049
    <br>
0.000994
    <br>
-0.317666
    <br>
-19902.462151
    <br>
-3208549.358736
    <br>
    <br>
    <br>
Why is the row-rotation different from the column rotation?
    <br>
  </blockquote>
  <br>
Zoltan,
  <br>
  <br>
The gdalwarp utility will produce a nice "north up" image from a
rotated
  <br>
or skewed tiff+world (or geotiff).
  <br>
  <br>
eg.
  <br>
  <br>
gdalwarp skewed_input.tif northup_output.tif
  <br>
  <br>
The FWTools suite includes the gdalwarp command.
  <br>
  <br>
&nbsp; <a class="moz-txt-link-freetext" href="http://fwtools.maptools.org/">http://fwtools.maptools.org/</a>
  <br>
  <br>
Best regards,
  <br>
</blockquote>
Hi Frank (and All),<br>
I have version GDAL 1.2.6.0, released 2005/03/13 of gdalwarp so I
haven't downloaded from the pointer above. (I loaded gdal some time
back but have not had the time to investigate it yet, which is why I
didn't realise I had the tools already)<br>
<br>
My problem is that my images are 1-bit and the output image is 8-bit.
How can I keep it as 1-bit and which of the interpolation methods
should I use in order to have minimum"damage" to the resampled pixels?
(which represent 1:10000 scanned contours)<br>
<br>
I also need a TFW file - but I could probably create my own using
tiffinfo and a bit of parsing, so it is not a train-smash.<br>
<br>
I've been trying to find help-docs on writing 1-bit tiffs, but no luck
yet. Maybe you could provide some pointers, please?<br>
<br>
Thanks,<br>
Zoltan.<br>
Tiffinfo before &amp; after gdalwarp is:<br>
<br>
zls@gl0:/home/gisphoto/wgs84/cdsm/con5m/r2v_2006/vectorised$
/usr/bin/tiffinfo <b>2916ba05.tif_r2v</b><br>
TIFFReadDirectory: Warning, 2916ba05.tif_r2v: unknown field with tag
33922 (0x8482) encountered.<br>
TIFFReadDirectory: Warning, 2916ba05.tif_r2v: unknown field with tag
34735 (0x87af) encountered.<br>
TIFFReadDirectory: Warning, 2916ba05.tif_r2v: unknown field with tag
34737 (0x87b1) encountered.<br>
TIFF Directory at offset 0x37684<br>
&nbsp; Subfile Type: (0 = 0x0)<br>
&nbsp; Image Width: 19843 Image Length: 25037<br>
&nbsp; Resolution: 800, 800 pixels/inch<br>
&nbsp; Bits/Sample: 1<br>
&nbsp; Compression Scheme: CCITT Group 4<br>
&nbsp; Photometric Interpretation: min-is-white<br>
&nbsp; Samples/Pixel: 1<br>
&nbsp; Rows/Strip: 6<br>
&nbsp; Planar Configuration: single image plane<br>
&nbsp; Make: Able Software Corp.<br>
&nbsp; Artist: R2V for Windows<br>
&nbsp; HostComputer: PC/MS WINDOWS<br>
&nbsp; Tag 33922:
1337.712036,4258.659180,0.000000,-29143.206259,-3209262.684856,0.000000,16680.531250,4275.675781,0.000000,-24271.341171,-3209250.944041,0.000000,16671.224609,21724.287109,0.000000,-24259.748502,-3214792.945296,0.000000,1317.020996,21703.632813,0.000000,-29128.942523,-3214804.706201,0.000000<br>
&nbsp; Tag 34735: 1,1,0,3,1024,0,1,1,1025,0,1,1,1026,34737,22,0<br>
&nbsp; Tag 34737: Able Software GeoTIFF|<br>
zls@gl0:/home/gisphoto/wgs84/cdsm/con5m/r2v_2006/vectorised$ <br>
<br>
<br>
zls@gl0:/home/gisphoto/wgs84/cdsm/con5m/r2v_2006/vectorised$
/usr/bin/tiffinfo <b>2916ba05.tif_north_up</b><br>
TIFFReadDirectory: Warning, 2916ba05.tif_nup: unknown field with tag
33550 (0x830e) encountered.<br>
TIFFReadDirectory: Warning, 2916ba05.tif_nup: unknown field with tag
33922 (0x8482) encountered.<br>
TIFFReadDirectory: Warning, 2916ba05.tif_nup: unknown field with tag
34735 (0x87af) encountered.<br>
TIFFReadDirectory: Warning, 2916ba05.tif_nup: unknown field with tag
34736 (0x87b0) encountered.<br>
TIFFReadDirectory: Warning, 2916ba05.tif_nup: unknown field with tag
34737 (0x87b1) encountered.<br>
TIFF Directory at offset 0x1dd82ca2<br>
&nbsp; Image Width: 19915 Image Length: 25124<br>
&nbsp; Bits/Sample: 8<br>
&nbsp; Sample Format: unsigned integer<br>
&nbsp; Compression Scheme: None<br>
&nbsp; Photometric Interpretation: palette color (RGB from colormap)<br>
&nbsp; Samples/Pixel: 1<br>
&nbsp; Rows/Strip: 1<br>
&nbsp; Planar Configuration: single image plane<br>
&nbsp; Color Map: (present)<br>
&nbsp; Tag 33550: 0.317459,0.317459,0.000000<br>
&nbsp; Tag 33922:
0.000000,0.000000,0.000000,-29570.603456,-3207888.676293,0.000000<br>
&nbsp; Tag 34735:
1,1,0,11,1024,0,1,2,1025,0,1,1,1026,34737,22,0,2048,0,1,32767,2049,34737,8,22,2050,0,1,32767,2054,0,1,9102,2056,0,1,32767,2057,34736,1,0,2059,34736,1,1,3076,0,1,9001<br>
&nbsp; Tag 34736: 6378137.000000,298.257224<br>
&nbsp; Tag 34737: Able Software GeoTIFF|unnamed|<br>
zls@gl0:/home/gisphoto/wgs84/cdsm/con5m/r2v_2006/vectorised$ <br>
<br>
<pre class="moz-signature" cols="72">-- 

===========================================
Geograph (Pty) Ltd.
P.O. Box 31255, Tokai 7966, South Africa.

B3-106 Tokai Village, cnr Vans/Tokai Rds,
Tokai 7945, Western Cape, South Africa.

Tel: +27-21-7154329  Mobile: +27-83-6004028
Fax: +27-86-6115323
===========================================</pre>
</body>
</html>