Opened 13 years ago

Closed 11 years ago

Last modified 11 years ago

#3312 closed enhancement (fixed)

Add support for new metadata item "coordinate system string" to ENVI driver

Reported by: dszlucha Owned by: warmerdam
Priority: high Milestone: 1.8.1
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords: ENVI
Cc: Mateusz Łoskot

Description

ENVI 4.7 adds a new metadata item called "coordinate system string" which is an ESRI .prj compatible WKT string to the ENVI .hdr format in envidataset.cpp. I would like to have this new code integrated into the GDAL trunk as well as the ESRI branch. Attached is our working copy of the new code which adds parsing to ENVIDataset::ProcessMapinfo() and writes the new string in ENVIDataset::WriteProjectionInfo().

Attachments (3)

envidataset.cpp (84.9 KB ) - added by dszlucha 13 years ago.
coordinate system string additions applied to trunk version of envidataset.cpp
ticket3312.patch (8.8 KB ) - added by dszlucha 13 years ago.
svn diff with changes to envidataset.cpp
bldr_sp.zip (887.5 KB ) - added by dszlucha 13 years ago.
Sample data with "coordinate system string" metadata

Download all attachments as: .zip

Change History (11)

comment:1 by warmerdam, 13 years ago

Component: defaultGDAL_Raster
Priority: highesthigh
Status: newassigned

David,

It seems there have been several changes in trunk since the revision you worked with. Could you re-prepare your changes as a patch, or at least apply them to a current trunk version of the source?

Also, I would appreciate a very small dataset demonstrating this new feature.

by dszlucha, 13 years ago

Attachment: envidataset.cpp added

coordinate system string additions applied to trunk version of envidataset.cpp

comment:2 by Mateusz Łoskot, 13 years ago

Cc: Mateusz Łoskot added

@dszlucha

It would be better if you can prepare regular patch that consists only your changes. It is as simple as issuing this command in gdal source root directory of your SVN trunk copy:

svn diff > ticket3312.patch

then attach the ticket3312.patch file.

by dszlucha, 13 years ago

Attachment: ticket3312.patch added

svn diff with changes to envidataset.cpp

comment:3 by warmerdam, 13 years ago

Integrated in 1.6-esri branch by Gao (r18702).

comment:4 by warmerdam, 13 years ago

David,

I'd still appreciate some sort of sample data before I try integrating this.

by dszlucha, 13 years ago

Attachment: bldr_sp.zip added

Sample data with "coordinate system string" metadata

comment:5 by gaopeng, 11 years ago

Frank, Could you integrate this patch into GDAL 1.8 and GDAL 1.8-esri? ITT-VIS is asking for help. It looks like the sample data has been added.

Thanks, Gao

comment:6 by warmerdam, 11 years ago

Resolution: fixed
Status: assignedclosed

Slightly modified patch applied in trunk (r22303), 1.8 branch (r22304) and 1.8-esri branch (r22305).

comment:7 by warmerdam, 11 years ago

Milestone: 1.6.41.8.1

comment:8 by Even Rouault, 11 years ago

I think this is related with this change in the 1.8 branch (works fine in trunk). I now get this failure :

  TEST: envi_4 ... Got: 
PROJCS["Lambert_Conformal_Conic",
    GEOGCS["GCS_North_American_1983",
        DATUM["North_American_Datum_1983",
            SPHEROID["GRS_1980",6378137,298.257222101]],
        PRIMEM["Greenwich",0],
        UNIT["Degree",0.017453292519943295]],
    PROJECTION["Lambert_Conformal_Conic_2SP"],
    PARAMETER["standard_parallel_1",33.90363402775256],
    PARAMETER["standard_parallel_2",33.62529002776137],
    PARAMETER["latitude_of_origin",33.76446202775696],
    PARAMETER["central_meridian",-117.4745428888127],
    PARAMETER["false_easting",20000],
    PARAMETER["false_northing",30000],
    PARAMETER["scale_factor",1.0],
    UNIT["Meter",1]]
Expected:
PROJCS["unnamed",
    GEOGCS["NAD83",
        DATUM["North_American_Datum_1983",
            SPHEROID["GRS 1980",6378137,298.257222101],
            TOWGS84[0,0,0,0,0,0,0]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433]],
    PROJECTION["Lambert_Conformal_Conic_2SP"],
    PARAMETER["standard_parallel_1",33.90363402775256],
    PARAMETER["standard_parallel_2",33.62529002776137],
    PARAMETER["latitude_of_origin",33.76446202775696],
    PARAMETER["central_meridian",-117.4745428888127],
    PARAMETER["false_easting",20000],
    PARAMETER["false_northing",30000]]
fail
    Did not get expected projection reference.

Note: See TracTickets for help on using tickets.