[UMN_MAPSERVER-USERS] [Gdal-dev] Adding Projection to ECW files ?

Bill Binko bill at binko.net
Wed Jun 22 04:08:46 EDT 2005


I've implemented Tom's suggestion and written a small (and fast), but very 
ugly utility to modify the header information in ECW files.   This is very 
handy when someone ships you ECWs without any projection information in 
them.

It doesn't rely on GDAL, in fact it just mmap's the first 90 bytes of the 
file(s) and lets you change the values.  Like I said, fast, but ugly.

Anyway, it's available at http://www.mapshine.com/ecwhead-0-1.tar.gz if
you'd like to use it.  Here's the usage:

Usage: ecwhead [options] ecwfile1.ecw [ecwfile2.ecw ...]
Options:
  -m    Set Unit to Meters
  -f    Set Unit to Feet
  -d    Set Unit to Degrees
  -u    Set Unit to Unknown
        (if more than one unit is given, the last will be used)
  -x <float>    Set x cell size
  -y <float>    Set y cell size
  -X <float>    Set x world origin
  -Y <float>    Set y world origin
  -D <string>   Set ECW Compliant Datum String ("WGS84")
  -P <string>   Set ECW Compliant Projection String ("NUTM17")

I hope this is helpful to someone.

Tom, if you'd like to take this and run with it, I'll be happy to work 
with you on that: I'm not looking for a job maintaining it.

Unfortunately, this did not solve my problem, so I'm going to be writing 
another note in a second :-(

Bill





More information about the Gdal-dev mailing list