[Gdal-dev] (no subject)
Frank Warmerdam
warmerdam at pobox.com
Tue Oct 19 16:18:51 EDT 2004
Maciek Sieczka wrote:
> on an old CVS GDAL (1.2.1.0, released 2004/08/27) I'm getting following
> troubles
Maciek,
1.2.1? That is ancient. I take no responsible for the code I produced when I
was a kid ... back in ... September.
> fixed in a newer version? (sorry for bugging you then!)
>
> a segfault on deflate compression in gdal_warp and gdal_merge.py:
>
> [ziutek at localhost ziutek]$ gdal_merge.py -o krnap_cmp.tif -of GTiff -co
> COMPRESS=DEFLATE ~/danecz/ZABAGED2/*.tif
> Segmentation fault
I wasn't able to reproduce this crash, but I wasn't able to gdal_merge.py
to a compressed TIFF file because gdal_merge.py uses random update to place
the chunks of imagery as they are read in. You will pretty much need to
write an uncompressed file with gdal_merge.py and then compress it with
gdal_translate.
Andrey is apparently working on update-in-place support for compressed
TIFF files, and once that is working smoothly through GDAL you might well
be able to do what you want.
> no support for PackBits (and same for LZW)
>
> [ziutek at localhost ziutek]$ gdal_merge.py -o krnap_cmp.tif -of GTiff -co
> COMPRESS=PACKBITS ~/danecz/ZABAGED2/*.tif
> ERROR 1: krnap_cmp.tif:PackBits compression support is not configured
> (...)
I believe it was GDAL 1.2.1 (or 1.2.2?) that had serious issues with
configuring in various compression types for TIFF. Upgrade to 1.2.3 please.
> a troble with JPEG compression
>
> [ziutek at localhost ziutek]$ gdal_merge.py -o krnap_cmp.tif -of GTiff -co
> COMPRESS=JPEG ~/danecz/ZABAGED2/*.tif
> python: tif_jpeg.c:651: JPEGPreDecode: Assertion
> `sp->cinfo.comm.is_decompressor' failed.
> Aborted
I believe this is the issue with writing compressed files randomly, though
I didn't see the same message with the current code. Instead I get alot
of "ERROR 1: TIFFWriteEncodedStrip:out.tif: File not open for writing"
messages.
> and with gcps2wld.py
>
> [ziutek at localhost ziutek]$ gcps2wld.py /home/ziutek/Desktop/krnap.tif
> Traceback (most recent call last):
> File "/usr/local/bin/gcps2wld.py", line 63, in ?
> print geotransform[1]
> TypeError: unsubscriptable object[ziutek at localhost ziutek]$
Looking through the code it seems that this happens if the function
completely fails ... for instance if there are no GCPs. I have made
some changes to the script to report such problems more appropriately.
If you think the script should be working on your file (no sign of GCPs in
the gdalinfo report) then let me know.
If you still get the same error messages after upgrading to GDAL 1.2.3 please
let me know (ideally via bugzilla). Of course if you get the "file not open
for writing" messages with gdal_merge to a compressed format then that is
just to be expected for now.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the Gdal-dev
mailing list