Changeset 14257

Show
Ignore:
Timestamp:
04/11/08 10:47:00 (3 months ago)
Author:
rouault
Message:

Fix #2135 by narrowing workaround test made for #1750

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.5/gdal/frmts/nitf/nitfimage.c

    r13899 r14257  
    905905    /* Bug #1750 */ 
    906906    /* Fix for cjnc/cjncz01/000k1023.jn1 (and similar) from NIMA GNCJNCN CDROM: */ 
    907     /* this product is crossing meridian 180deg and the upper and lower right longitudes are negative */ 
    908     /* which causes problems in OpenEV, etc... So we are adjusting their value by setting them above +180 */ 
     907    /* this product is crossing meridian 180deg and the upper and lower right longitudes are negative (<-170) */ 
     908    /* while the upper and lower left longitudes are positive (> 170) which causes problems in OpenEV, etc... */ 
     909    /* So we are adjusting the upper and lower right longitudes by setting them above +180 */ 
    909910    if( (psImage->chICORDS == 'G' || psImage->chICORDS == 'D') && 
    910         (psImage->dfURX < psImage->dfULX && psImage->dfLRX < psImage->dfLLX)) 
     911        (psImage->dfULX > 170 && psImage->dfLLX > 170 && psImage->dfURX < -170 && psImage->dfLRX < -170 && 
     912         psImage->dfULY > psImage->dfLLY && psImage->dfURY > psImage->dfLRY) ) 
    911913    { 
    912914        psImage->dfURX += 360;