[ gpsdrive ] Errors with gdal_warp
R. G. Newbury
newbury at mandamus.org
Thu Nov 20 07:57:29 AKST 2008
Hamish wrote:
> Geoff wrote:
>> I'm trying to transform NOAA RNC charts to tif's
>> (and then use Hamish' gdalslice to make tiles). BUT, I
>> get errors with gdalwarp:
>>
>> [root at tor4 11466]# gdalwarp -t_srs "EPSG:4326" -order 2 -rn \
>> -co 'COMPRESS=DEFLATE' 11466_1.KAP 11466_1.tif
>> Copying color table from 11466_1.KAP to new file.
>> Creating output file that is 9318P x 11913L.
>> Processing input file 11466_1.KAP.
>> :0...10...20...30...40...ERROR 1: ZIPDecode:11466_1.
>> tif: Decoding error at scanline 0, incorrect header
>> check
>> ERROR 1: TIFFReadEncodedStrip() failed.
>>
>> ERROR 1: IReadBlock failed at X offset 0, Y offset 0
>> ERROR 1: GetBlockRef failed at X block offset 0, Y b
>> lock offset 0
>>
>> Can anyone suggest a fix? This appears to be an original
>> problem with the KAP file, as re-downloading results in the
>> same error.
>
>
> gdalwarp should not use any COMPRESSion, apply that later with
> gdal_translate if needed.
>
>
> .... try again without -co 'COMPRESS=DEFLATE'
>
>
> did you get that command from an old post or a script or wiki page?
> If either of the latter we should update it.
My laptop is in use elsewhere at the moment, so I do not have the URL,
but I am sure I got that from a gmane listing, which is pointed to by a
line on (I think) your wiki page...it was a URL with something like
"thread=3943". There are 2 different but similar postings. In this one
particular one you gave a quick description of how to handle ENC charts,
and then later in the thread, you dealt with RNC's.
If this was (is) wrong, then the whole thread needs to be checked and
put into a HOWTO on your wiki. Using gdalwarp is a lot easier than using
bsb2tif. Not only are the resulting tif files smaller, but the
georeferencing is taken care of too.
I will try without 'COMPRESS' but I think the error is something in the
original KAP file. bsb2tif handles the file without problem, but
gdalwarp chokes.
More later.
Geoff
--
Please let me know if anything I say offends you.
I may wish to offend you again in the future.
Tux says: "Be regular. Eat cron flakes."
More information about the GPSdrive
mailing list