[gdal-dev] ECW writing (was GTiff optimisation)

Even Rouault even.rouault at mines-paris.org
Thu Sep 22 16:21:02 EDT 2011

Le jeudi 22 septembre 2011 22:14:40, Jean-Claude Repetto a écrit :
> On 09/22/11 19:03, Even Rouault wrote:
> >> - gdal_edit reports no error when the parameters are wrong :
> >> $ gdal_edit.py -mo KJHJKHJKHJ=GKFLLLMM France.ecw
> > 
> > I see nothing wrong here. It is perfectly valid to assign GKFLLLMM to
> > KJHJKHJKHJ metadata item. gdal_edit.py is meant as being generic, so if
> > the driver doesn't understand natively the metadata item, this will
> > generally fallback to storage in .aux.xml file if the driver supports
> > the PAM mechanism.
> At least, gdal_translate displays a warning :
> $ gdal_translate -of ECW -co "KJHJ=KJKJ" -a_srs epsg:27572 test.jpg
> test.ecw Input file size is 480, 272
> Warning 6: Driver ECW does not support KJHJ creation option
> 0...10...20...30...40...50...60...70...80...90...100 - done.

Ah ok, I see your point, but we're talking about 2 different notions : creation 
options and metadata. Creation options are generally listed under a XML form 
within the driver code, which can used to validate user entry. Metadata items 
can be freely set by the user and there's no way (currently, and that I can 
think of for now), of distinguishing which ones are recognized specifically by 
the driver from the ones that are just user free metadata.

> >> - It would be nice if gdal_edit could display the current parameters
> >> when called without options.
> > 
> > Well, gdalinfo does already do that, so I don't think this is really
> > necessary.
> I don't agree, gdalinfo gives some informations, but not the name of the
> datum and the name of the projection. And a lot of ECW projections or
> datums are not supported in GDAL.

Try gdalinfo your.ecw -mdd ECW and you should see the DATUM, PROJ and UNITS 
displayed as they are recorded in the ECW header. This is the way of 
requesting the display of the ECW metadata domain mentionned in 
http://gdal.org/frmt_ecw.html (new in 1.9.0dev)

More information about the gdal-dev mailing list