[Geotiff] deskewing

Zoltan Szecsei zoltans at geograph.co.za
Wed Jan 17 10:13:52 EST 2007


Frank Warmerdam wrote:
> Zoltan Szecsei wrote:
>> 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?
>
> Zoltan,
>
> GDAL's GeoTIFF driver is currently incapable of producing 1bit files.
Ouch! - that's a pity.
Given the sample TFW file, is it possible to calculate an angle of rotation?
The software I used to vectorise the 1-bit raster is capable of rotating 
the raster image about its center, and then re-writing the world file.

Kind regards,
Zoltan

0.317469
0.001049
0.000994
-0.317666
-19902.462151
-3208549.358736

>
> You can include the "-co TFW=YES" option on the gdalwarp commandline to
> produce a worldfile with the output.
>
> If you use the default nearest neighbour resampling, there will be no
> strange mixing of values.  This is generally necessary if you have a
> colormapped image as presumably is the case for your 1bit image.
>
> Best regards,


-- 

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




More information about the Geotiff mailing list