Opened 16 years ago

Closed 16 years ago

#1967 closed defect (fixed)

.aux files with MapInformation instead of Map_Info lack units handling

Reported by: warmerdam Owned by: warmerdam
Priority: normal Milestone: 1.5.0
Component: GDAL_Raster Version: 1.4.3
Severity: normal Keywords: hfa units state plane
Cc: gaopeng

Description

A .aux file with the following MapInformation entry was incorrectly reported as being in meters instead of feet:

The entry looks like:

    MapInformation(Eimg_MapInformation) @ 2212 + 81 @ 2340
    + projection = 
    +     string = `NAD_1983_StatePlane_Virginia_North_FIPS_4501_Feet'
    + units = 
    +     string = `us_survey_feet'

The gdalinfo report looks like:

PROJCS["NAD83 / Virginia North",
    GEOGCS["NAD83",
        DATUM["North_American_Datum_1983",
            SPHEROID["GRS 1980",6378137,298.257222101,
                AUTHORITY["EPSG","7019"]],
            AUTHORITY["EPSG","6269"]],
        PRIMEM["Greenwich",0,
            AUTHORITY["EPSG","8901"]],
        UNIT["degree",0.01745329251994328,
            AUTHORITY["EPSG","9122"]],
        AUTHORITY["EPSG","4269"]],
    PROJECTION["Lambert_Conformal_Conic_2SP"],
    PARAMETER["standard_parallel_1",39.2],
    PARAMETER["standard_parallel_2",38.03333333333333],
    PARAMETER["latitude_of_origin",37.66666666666666],
    PARAMETER["central_meridian",-78.5],
    PARAMETER["false_easting",3500000],
    PARAMETER["false_northing",2000000],
    UNIT["metre",1,

Attachments (1)

fg118-91.aux (8.0 KB ) - added by warmerdam 16 years ago.
.aux file demonstrating the problem.

Download all attachments as: .zip

Change History (4)

comment:1 by warmerdam, 16 years ago

Status: newassigned

On review it seems the problem is that GDAL was looking for the "Map_Info" entry for units information. But when the XForm stuff is used the Map_Info node does not appear, and the MapInformation node is used instead.

I have modified the code to look for MapInformation in trunk (rxxx).

Need to consider writing a test case (need redistributable data) and possibly back porting the change.

comment:2 by warmerdam, 16 years ago

The last change was r12619.

by warmerdam, 16 years ago

Attachment: fg118-91.aux added

.aux file demonstrating the problem.

comment:3 by warmerdam, 16 years ago

Milestone: 1.5.0
Resolution: fixed
Status: assignedclosed

Added a test to trunk autotest (autotest/gdrivers/hfa.py - hfa_mapinformation_units) (r12620).

Ported test to 1.4-esri branch as r12621.

Note: See TracTickets for help on using tickets.