[Geotiff] deskewing

Zoltan Szecsei zoltans at geograph.co.za
Wed Jan 17 03:46:08 EST 2007


Frank Warmerdam wrote:
> Zoltan Szecsei wrote:
>> Hi,
>> Is there an easy utility (linux commandline preferable, but windows 
>> OK) to de-skew a geo-referenced scanned map?
>> Typically the TFW files look like this:
>>
>> 0.317469
>> 0.001049
>> 0.000994
>> -0.317666
>> -19902.462151
>> -3208549.358736
>>
>>
>> Why is the row-rotation different from the column rotation?
>
> Zoltan,
>
> The gdalwarp utility will produce a nice "north up" image from a rotated
> or skewed tiff+world (or geotiff).
>
> eg.
>
> gdalwarp skewed_input.tif northup_output.tif
>
> The FWTools suite includes the gdalwarp command.
>
>   http://fwtools.maptools.org/
>
> Best regards,
Hi Frank (and All),
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)

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)

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.

I've been trying to find help-docs on writing 1-bit tiffs, but no luck 
yet. Maybe you could provide some pointers, please?

Thanks,
Zoltan.
Tiffinfo before & after gdalwarp is:

zls at gl0:/home/gisphoto/wgs84/cdsm/con5m/r2v_2006/vectorised$ 
/usr/bin/tiffinfo *2916ba05.tif_r2v*
TIFFReadDirectory: Warning, 2916ba05.tif_r2v: unknown field with tag 
33922 (0x8482) encountered.
TIFFReadDirectory: Warning, 2916ba05.tif_r2v: unknown field with tag 
34735 (0x87af) encountered.
TIFFReadDirectory: Warning, 2916ba05.tif_r2v: unknown field with tag 
34737 (0x87b1) encountered.
TIFF Directory at offset 0x37684
  Subfile Type: (0 = 0x0)
  Image Width: 19843 Image Length: 25037
  Resolution: 800, 800 pixels/inch
  Bits/Sample: 1
  Compression Scheme: CCITT Group 4
  Photometric Interpretation: min-is-white
  Samples/Pixel: 1
  Rows/Strip: 6
  Planar Configuration: single image plane
  Make: Able Software Corp.
  Artist: R2V for Windows
  HostComputer: PC/MS WINDOWS
  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
  Tag 34735: 1,1,0,3,1024,0,1,1,1025,0,1,1,1026,34737,22,0
  Tag 34737: Able Software GeoTIFF|
zls at gl0:/home/gisphoto/wgs84/cdsm/con5m/r2v_2006/vectorised$


zls at gl0:/home/gisphoto/wgs84/cdsm/con5m/r2v_2006/vectorised$ 
/usr/bin/tiffinfo *2916ba05.tif_north_up*
TIFFReadDirectory: Warning, 2916ba05.tif_nup: unknown field with tag 
33550 (0x830e) encountered.
TIFFReadDirectory: Warning, 2916ba05.tif_nup: unknown field with tag 
33922 (0x8482) encountered.
TIFFReadDirectory: Warning, 2916ba05.tif_nup: unknown field with tag 
34735 (0x87af) encountered.
TIFFReadDirectory: Warning, 2916ba05.tif_nup: unknown field with tag 
34736 (0x87b0) encountered.
TIFFReadDirectory: Warning, 2916ba05.tif_nup: unknown field with tag 
34737 (0x87b1) encountered.
TIFF Directory at offset 0x1dd82ca2
  Image Width: 19915 Image Length: 25124
  Bits/Sample: 8
  Sample Format: unsigned integer
  Compression Scheme: None
  Photometric Interpretation: palette color (RGB from colormap)
  Samples/Pixel: 1
  Rows/Strip: 1
  Planar Configuration: single image plane
  Color Map: (present)
  Tag 33550: 0.317459,0.317459,0.000000
  Tag 33922: 
0.000000,0.000000,0.000000,-29570.603456,-3207888.676293,0.000000
  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
  Tag 34736: 6378137.000000,298.257224
  Tag 34737: Able Software GeoTIFF|unnamed|
zls at gl0:/home/gisphoto/wgs84/cdsm/con5m/r2v_2006/vectorised$

-- 

===========================================
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
===========================================

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/geotiff/attachments/20070117/3519d054/attachment.html


More information about the Geotiff mailing list