Ticket #1967 (closed defect: fixed)

Opened 6 years ago

Last modified 6 years ago

.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

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

Change History

Changed 6 years ago by warmerdam

  • status changed from new to assigned

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.

Changed 6 years ago by warmerdam

The last change was r12619.

Changed 6 years ago by warmerdam

.aux file demonstrating the problem.

Changed 6 years ago by warmerdam

  • status changed from assigned to closed
  • resolution set to fixed
  • milestone set to 1.5.0

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.