Opened 11 years ago

Closed 9 years ago

#5220 closed defect (fixed)

Projection code seems incorrect in MITAB for SRS_PT_LAMBERT_AZIMUTHAL_EQUAL_AREA

Reported by: jefflacoste Owned by: warmerdam
Priority: normal Milestone: 2.0.2
Component: default Version: unspecified
Severity: normal Keywords: mitab
Cc: Daniel Morissette

Description

Looking at '..\ogr\ogrsf_frmts\mitab\mitab_coordsys.cpp' line 951:

    else if( EQUAL(pszProjection,SRS_PT_LAMBERT_AZIMUTHAL_EQUAL_AREA) )
    {
        nProjection = 4;
        parms[0] = poSR->GetProjParm(SRS_PP_LONGITUDE_OF_CENTER,0.0);
        parms[1] = poSR->GetProjParm(SRS_PP_LATITUDE_OF_CENTER,0.0);
        parms[2] = 90.0;
        nParmCount = 3;

        if( ABS((ABS(parms[1]) - 90)) > 0.001 )
            nProjection = ''28'''''''';
    }

'

It seems that last line needs to be "nProjection = 29" and not 28.

This based of the 'mapinfow.prj' file that comes with MapInfo Professional. See the following text about that projection:

"Lambert Azimuthal Equal-Area (100W, 45N, Range 180)\p2163", 29, 74, 7, -100, 45, 180 "Lambert Azimuthal Equal-Area (100W, 40N, Range 180)", 29, 74, 7, -100, 40, 180 "Lambert Azimuthal Equal-Area (100W, 40N, Range 90)", 29, 74, 7, -100, 40, 90 "Lambert Azimuthal Equal-Area (100W, 80S, Range 180)", 29, 74, 7, -100, -80, 180 "Lambert Azimuthal Equal-Area (100W, 80S, Range 90)", 29, 74, 7, -100, -80, 90 "Lambert Azimuthal Equal-Area (Greenwich, 80N, Range 180)", 29, 74, 7, 0, 80, 180 "Lambert Azimuthal Equal-Area (Greenwich, 80N, Range 90)", 29, 74, 7, 0, 80, 90 "Lambert Azimuthal Equal-Area (Greenwich, 60S, Range 180)", 29, 74, 7, 0, -60, 180 "Lambert Azimuthal Equal-Area (Greenwich, 60S, Range 90)", 29, 74, 7, 0, -60, 90 "Lambert Azimuthal Equal-Area Baltic (Range 90)", 29, 28, 7,20, 60, 90

All those projection variations has 29 as projection number/type.

Change History (2)

comment:1 by Even Rouault, 11 years ago

Cc: Daniel Morissette added
Keywords: mitab added

comment:2 by Even Rouault, 9 years ago

Milestone: 2.0.2
Resolution: fixed
Status: newclosed

Also confirmed when looking the code that did the translation from MITAB coord sys to OGRSpatialReference

trunk r30888, branches/2.0 r30889 "MITAB: use projection code 29 when exporting non-Polar Lambert Azimuthal Equal Area (#5220, patch by jefflacoste)"

Note: See TracTickets for help on using tickets.