[gdal-dev] gdal_edit with ECW, parameter woes, documentation is probematic
mj10777 at googlemail.com
Tue Jul 26 06:10:24 PDT 2016
While writing this, I figured put most of the problems, so this note will
be more about suggestion in making the documentation more usable.
I am going to receive an amount of ecw files that, for whatever reason, do
not contain the georeferenced information.
For the first image received, gdalinfo shows the following:
Driver: ECW/ERDAS Compressed Wavelets (SDK 3.x)
Size is 8001, 6001
Coordinate System is `'
Upper Left ( 0.0, 0.0)
Lower Left ( 0.0, 6001.0)
Upper Right ( 8001.0, 0.0)
Lower Right ( 8001.0, 6001.0)
Center ( 4000.5, 3000.5)
Band 1 Block=256x256 Type=Byte, ColorInterp=Gray
Description = Grayscale
Overviews: 4000x3000, 2000x1500, 1000x750, 500x375, 250x187
Since I know the position, I did the following:
1) gdal_translate -of GTiff -a_nodata 135 -a_srs EPSG:3068 -a_ullr 20800
22000 24000 19600 1989.423C_42348.5000.ecw 1989.423C_42348.5000.3068.tif
2) gdal_translate -of ECW -co TARGET=0 -a_srs EPSG:3068
gdalinfo now shows the projection information.
- but with 'COMPRESSION_RATE_TARGET=1' instead of 5
-- no doubt due to the '-co TARGET=0' (which I have no idea what it means)
gdal_translate has a note with the '-co'
'See format specific documentation for legal creation options for each
a: <a href="http://www.gdal.org/formats_list.html">See format specific
documentation for legal creation options for each format</a>
which then leads to http://www.gdal.org/frmt_ecw.html
- where TARGET is then explained (percentage)
-- but no explanation on what 'COMPRESSION_RATE_TARGET' is
---> '-co TARGET=50' (percent) = 'COMPRESSION_RATE_TARGET=2'
---> '-co TARGET=75' (percent) = 'COMPRESSION_RATE_TARGET=4'
---> '-co TARGET=99.99' (percent) = 'COMPRESSION_RATE_TARGET=9997'
A comparison chart would be useful here
- comparing what gdalinfo shows to what gdal_translate needs
(I still do not know what TARGET setting is needed to get
What I would like to know is: can gdal_edit.py be used to achieve the same
- base on another found sample, I worked this out, since I have never used
the combination -a_srs/-a_ullr before
-- wasted a lot of time in the past creating a world-file for this task
gdal_edit -a_srs EPSG:3068 -a_ullr 20800 22000 24000 19600
So for both 'gdal_translate' and 'gdal_edit' a practical sample to set the
missing georeferenced information would be useful
- while searching I saw a lot of reports of people receiving ecw file 'raw'
and wondering how to get it in
Once one knows it, it is easy
But it has be hours since I found this sample:
gdal_edit -mo DATUM=WGS84 -mo PROJ=GEODETIC -a_ullr 7 47 8 46 test.ecw
and trying to adapt it to work with a non-wsg84 system.
Mark Johnson, Berlin Germany
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gdal-dev