[gdal-dev] Re: Units to Feet in ECW Metadata

Mullins, Steven Steven.Mullins at dmme.virginia.gov
Fri Jun 20 09:26:58 EDT 2008


Jukka,

Thanks for the tip!  I added "-co PROJ=LM2VIRSF" to my conversion, and the resulting gdal dump was:

Driver: ECW/ERMapper Compressed Wavelets
Files: duty_01.ecw
       duty_01.ecw.aux.xml
Size is 9073, 10904
Coordinate System is:
PROJCS["NAD27 / Virginia South",
    GEOGCS["NAD27",
        DATUM["North_American_Datum_1927",
            SPHEROID["Clarke 1866",6378206.4,294.9786982139006,
                AUTHORITY["EPSG","7008"]],
            AUTHORITY["EPSG","6267"]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4267"]],
    PROJECTION["Lambert_Conformal_Conic_2SP"],
    PARAMETER["standard_parallel_1",36.76666666666667],
    PARAMETER["standard_parallel_2",37.96666666666667],
    PARAMETER["latitude_of_origin",36.33333333333334],
    PARAMETER["central_meridian",-78.5],
    PARAMETER["false_easting",2000004.000008],
    PARAMETER["false_northing",0],
    UNIT["foot",0.3048,
        AUTHORITY["EPSG","9002"]],
    AUTHORITY["EPSG","32047"]]
Origin = (901010.167897604870000,312728.275525033300000)
Pixel Size = (5.105997194290739,-5.105997194290740)
Metadata:
  AREA_OR_POINT=Area
  TIFFTAG_SOFTWARE=AutoCAD Raster Design 2008
  TIFFTAG_XRESOLUTION=25
  TIFFTAG_YRESOLUTION=25
  TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
Corner Coordinates:
Upper Left  (  901010.168,  312728.276) ( 82d16'15.11"W, 37d 7'55.18"N)
Lower Left  (  901010.168,  257052.482) ( 82d15'47.70"W, 36d58'45.10"N)
Upper Right (  947336.880,  312728.276) ( 82d 6'43.43"W, 37d 8'13.08"N)
Lower Right (  947336.880,  257052.482) ( 82d 6'17.19"W, 36d59'2.97"N)
Center      (  924173.524,  284890.379) ( 82d11'15.85"W, 37d 3'29.18"N)
Band 1 Block=9073x1 Type=Byte, ColorInterp=Red
  Overviews: arbitrary
  Metadata:
    LAYER_TYPE=athematic
Band 2 Block=9073x1 Type=Byte, ColorInterp=Green
  Overviews: arbitrary
  Metadata:
    LAYER_TYPE=athematic
Band 3 Block=9073x1 Type=Byte, ColorInterp=Blue
  Overviews: arbitrary
  Metadata:
    LAYER_TYPE=athematic

This is the correct projection information, except that international feet is used instead of US Feet, but that is not critical.  A look at the projection info reveals that the ER projection LM2VIRSF is not shown in the output, though it was specified on the command line.  However, if I convert without using "-co PROJ=LM2VIRSF" on the command line, the resulting ECW file has the following coordinate system info, with "LM2VIRSF" in the header:

PROJCS["LM2VIRSF",
    GEOGCS["NAD27",
        DATUM["North_American_Datum_1927",
            SPHEROID["Clarke 1866",6378206.4,294.978698213898,
                AUTHORITY["EPSG","7008"]],
            TOWGS84[-3,142,183,0,0,0,0],
            AUTHORITY["EPSG","6267"]],
        PRIMEM["Greenwich",0,
            AUTHORITY["EPSG","8901"]],
        UNIT["degree",0.0174532925199433,
            AUTHORITY["EPSG","9108"]],
        AXIS["Lat",NORTH],
        AXIS["Long",EAST],
        AUTHORITY["EPSG","4267"]],
    PROJECTION["Lambert_Conformal_Conic_2SP"],
    PARAMETER["standard_parallel_1",36.7666667],
    PARAMETER["standard_parallel_2",37.9666667],
    PARAMETER["latitude_of_origin",37.3674801],
    PARAMETER["central_meridian",-78.49999999999994],
    PARAMETER["false_easting",2000000],
    PARAMETER["false_northing",376513.28],
    UNIT["Meter",1]]

This is the opposite of what I would expect.  When I delare "LM2VIRSF" it does not show up in the header, when I do not delare it, it shows up in the header.  And while the new ECW file gdalinfo dump shows a near-perfect wkt projection def, arcgis does not recognize the projection as valid.  Odd behavior.  If I could just change the UNITS tag by itself, I think I could make it work.

Thanks again!

Steve



-----Original Message-----
From: gdal-dev-bounces at lists.osgeo.org
[mailto:gdal-dev-bounces at lists.osgeo.org]On Behalf Of Jukka Rahkonen
Sent: Thu, June 19, 2008 5:06 PM
To: gdal-dev at lists.osgeo.org
Subject: [gdal-dev] Re: Units to Feet in ECW Metadata


Mullins, Steven <Steven.Mullins <at> dmme.virginia.gov> writes:

> 
> Hello all.  I've ran into a bit of trouble doing a geotiff to ECW conversion.  
...
...
> 
> Now the units are in Meters and the ESPG code for my projection EPSG:32047 has
been dropped.  Another twist is
> that ACAD correctly projects the resulting ECW, while ARCGIS does not.  Seems
that ACAD ignores the UNITS
> tag while ARCGIS does not.  
> 
> Does anyone know how to make ECW keep the correct projection unit?

Hi,

All I know is that you can correct your image afterwards by using free ECW Image
Header Editor that can be downloaded from http://ermapper.com/ProductView.aspx?t=189

Gdal document at http://www.gdal.org/frmt_ecw.html tells:
When writing coordinate system information to ECW files, many less common
coordinate systems are not mapped properly. If you know the ERMapper name for
the coordinate system you can force it to be set at creation time with the PROJ
and DATUM creation options.

So it may be difficult to get a proper ECW projection directly from gdal, but
knowing the exact names that ER Mapper is using for your projection and datum
might help in it. Unfortunately ECW Header Editor does not have a list of ECW
projections. Projection names can be found from ER Mapper Professional user
manual that can be downloaded from http://ermapper.com/Documents.aspx?t=213&dc=17

-Jukka Rahkonen-

_______________________________________________
gdal-dev mailing list
gdal-dev at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


More information about the gdal-dev mailing list