Got it in one Luke.

Thanks mate.

From: Pinner, Luke [mailto:luke.pin...@environment.gov.au]
Sent: Monday, 2 July 2012 12:52 PM
To: Andrew Williams
Subject: RE: Problem with gdal_translate and specific ECW file 
[SEC=UNCLASSIFIED]

I've had trouble with the old ECW 3.3 (from 2006) library that is included in 
FWTOOLS before.  FWTOOLS itself is pretty old (last release 2010, can't 
remember what GDAL version). OSGEO4W is usually now recommended for a 
"batteries included" GDAL install on Windows.

http://trac.osgeo.org/osgeo4w

OSGEO4W includes the ECW plugin but because of the slightly more onerous 
licensing of the latest ERDAS ECW/JP2 SDK (v. 4.2), you need to download the 
SDK from ERDAS yourself and copy the dlls into your OSGEOW installation:

http://trac.osgeo.org/osgeo4w/wiki/pkg-gdal-ecw

Regards,
Luke Pinner

From: gdal-dev-boun...@lists.osgeo.org<mailto:gdal-dev-boun...@lists.osgeo.org> 
[mailto:gdal-dev-boun...@lists.osgeo.org]<mailto:[mailto:gdal-dev-boun...@lists.osgeo.org]>
 On Behalf Of Andrew Williams
Sent: Monday, 2 July 2012 12:17 PM
To: gdal-dev@lists.osgeo.org<mailto:gdal-dev@lists.osgeo.org>
Subject: [gdal-dev] Problem with gdal_translate and specific ECW file

Folks,
I have an ECW which was supplied as a set of 4 from the same supplier.

As part of a process to make the image usable with a legacy system I create a 
series of tiles from the ECW as GTIFF.

I have done this successfully many times.

3 of the 4 images processed without issue.

One however causes gdal_translate to crash completely.

Gdalinfo returns the following

Driver: ECW/ERMapper Compressed Wavelets
Files: C:\Current Projects\image.ecw
Size is 330000, 170000
Coordinate System is:
PROJCS["MGA55",
    GEOGCS["GEOCENTRIC DATUM of AUSTRALIA",
        DATUM["GDA94",
            SPHEROID["GRS80",6378137,298.257222101]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",147],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",10000000],
    UNIT["Meter",1]]
Origin = (285999.999998596960000,5812000.000001333700000)
Pixel Size = (0.100000000000000,-0.100000000000000)
Corner Coordinates:
Upper Left  (  286000.000, 5812000.000) (144d34'7.92"E, 37d48'51.61"S)
Lower Left  (  286000.000, 5795000.000) (144d33'49.77"E, 37d58'2.71"S)
Upper Right (  319000.000, 5812000.000) (144d56'36.67"E, 37d49'17.31"S)
Lower Right (  319000.000, 5795000.000) (144d56'21.31"E, 37d58'28.55"S)
Center      (  302500.000, 5803500.000) (144d45'13.88"E, 37d53'40.58"S)
Band 1 Block=330000x1 Type=Byte, ColorInterp=Red
  Overviews: arbitrary
Band 2 Block=330000x1 Type=Byte, ColorInterp=Green
  Overviews: arbitrary
Band 3 Block=330000x1 Type=Byte, ColorInterp=Blue
  Overviews: arbitrary

This is an example of the gdal_translate command line run from FWTOOLS Shell

gdal_translate -of GTIFF -projwin 286000 5796000 287000 5795000 "C:\Current 
Projects\image.ecw" "C:\Current Projects\image1.TIF"

Running this process begins and gets this far

Input file size is 330000, 170000
Computed -srcwin 0 160000 10000 10000 from projected window.
0

I have tried other -proj windows in the set, all crash.

Bear in mind the same command line pattern was used for three other images 
successfully.

I have tried two different PCs with the same result.

I suspect the image itself but not sure what it might be.

The image is quite large (4.7Gb) so sending it to someone for analysis will be 
difficult.

Any advice appreciated.

Andrew


If you have received this transmission in error please notify us immediately by 
return e-mail and delete all copies. If this e-mail or any attachments have 
been sent to you in error, that error does not constitute waiver of any 
confidentiality, privilege or copyright in respect of information in the e-mail 
or attachments. Please consider the environment before printing this email.
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to