No, your command does _not_ specify ecw output. It is generating geotiff
output with a '.ecw' file extension. You need to use the "-of <format>"
argument. gdal_translate does not use file extensions to determine
output file type, so if you do not use "-of", gdal_translate will
generate a file in the _default_ format, which is geotiff.

Geotiff output:
gdal_translate -a_srs EPSG:3078 in.ecw out.ecw
ECW Output:
gdal_translate -of ECW -a_srs EPSG:3078 in.ecw out.ecw

Luke

________________________________

From: [email protected]
[mailto:[email protected]] On Behalf Of Lee
Sent: Tuesday, 5 July 2011 5:32 AM
To: Johan Van de Wauw
Cc: [email protected]
Subject: Re: [Ubuntu] ECW CRS definition


Yes. The command which generates the error was one in which ecw was
specified as both the input and the output. My initial email contains
the commands utilized.

gdal_translate in.ecw out.ecw -a_srs EPSG:3078

Specifically, it seems that (a) gdal does not recognize there is a
spatial system associated with this file and (b) won't let me assign one
on my own.


On Mon, Jul 4, 2011 at 7:33 AM, Johan Van de Wauw
<[email protected]> wrote:


        Have you tried specifying the output format? gdal_translate will
        create geotiff by default. Perhaps that is causing the problem:
qgis
        thinks it is reading a ecw file, where in reality it's a geotiff

        So
        gdal_translate in.ecw out.tif -a_srs EPSG:3078
        or
        gdal_translate in.ecw out.ecw -a_srs EPSG:3078 -of ECW




        On Sat, Jul 2, 2011 at 7:52 PM, Lee <[email protected]> wrote:
        > I've tried the QGIS-user listserv to no avail. Figured I'd try
here, perhaps
        > at least I can get forwarded to the right one.
        >
        > I have an ECW that does not seem to want to accept a CRS
definition.
        > Initially I was attempting to warp the ECW file from Michigan
Georef to
        > NAD83 UTM zone 17. I got an error.
        >
        > ERROR 1: Unable to compute a transformation between pixel/line
        > and georeferenced coordinates for /home/lee/documents/gis/
        > detroit/aerial/WYANDOTTE_NE/WYANDOTTE_NE.ecw.
        > There is no affine transformation and no GCPs
        >
        > QGIS shows a generated CRS that seems right for Michigan
Georef, it just
        > does not seem to recognize that a CRS is there, so I cannot
warp to the new
        > projection. Next, I tried manually assigning the CRS in
question so I would
        > then be able to convert.
        >
        > gdal_translate in.ecw out.ecw -a_srs EPSG:3078
        >
        > This creates a file, but one which is un-readable in qgis.
        >
        > I am not exactly sure which is the problem that needs fixing
here.
        > Essentially, I just need to find a way to get this ECW file
(in Michigan
        > Georef) as any format (in NAD83 UTM zone 17). So whatever
suggestions you
        > have for accomplishing this, I am willing to try.
        >
        > Thanks for any help in advance.
        >
        > --
        > all the best,
        > Lee
        >

        > _______________________________________________
        > UbuntuGIS mailing list
        > [email protected]
        > http://lists.osgeo.org/mailman/listinfo/ubuntu
        > http://trac.osgeo.org/ubuntugis/wiki
        >
        >





--

all the best,
Lee


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.
_______________________________________________
UbuntuGIS mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/ubuntu
http://trac.osgeo.org/ubuntugis/wiki

Reply via email to