[Gdal-dev] gdal_merge w/ ECW output? -plain text

Frank Warmerdam warmerdam at pobox.com
Sat Mar 27 12:15:15 EST 2004


admin at landsat.com wrote:
> Hi,
> 
> I am trying to use gdal_merge and output to ECW and JPEG2000. I am using Windows 2000 professional and OpenEV 1.6.3_FW. 
> Here is my error;
> 
> python.exe gdal_merge.py -o test6.ecw -f ECW -co BA1S.tif BA1SE.tif
> ERROR 6: GDALDriver::Create() ... no create method implemented for this format.
> Traceback (most recent call last):
>  File "gdal_merge.py", line 381, in ?
>  t_fh.SetGeoTransform( geotransform )
> AttributeError: 'NoneType' object has no attribute 'SetGeoTransform'
> 
> How can I add ECW & JPEG2000 formats to gdal_merge.py?

Dan,

The gdal_merge.py script can only merge into a file format that supports
the Create() method and random update.  ECW and JPEG2000 do not.  You
will need to do your merge into an uncompressed GeoTIFF file (or some
other random update format like Erdas Imagine, and some raw formats) and
then use gdal_translate to convert the result into ECW or JPEG2000 formats.

Also, what are you trying to do with the "-co" switch?  This is used to
pass creation options to the driver, and as far as I can tell BA1S.tif
will get passed as a (presumably) meaningless creation option to the output
driver.

Try instead:

python.exe gdal_merge.py -o test6.tif BA1S.tif BA1SE.tif
gdal_translate -of ECW test6.tif test6.ecw

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