Changeset 13795
- Timestamp:
- 02/16/08 00:04:07 (5 months ago)
- Files:
-
- trunk/gdal/frmts/raw/envidataset.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/gdal/frmts/raw/envidataset.cpp
r13740 r13795 183 183 184 184 /************************************************************************/ 185 /* ESRIToUSGSZone()*/185 /* ITTVISToUSGSZone() */ 186 186 /* */ 187 /* Convert ESRI style state plane zones to USGS style state */ 188 /* plane zones. */ 189 /************************************************************************/ 190 191 static int ESRIToUSGSZone( int nESRIZone ) 187 /* Convert ITTVIS style state plane zones to NOS style state */ 188 /* plane zones. The ENVI default is to use the new NOS zones, */ 189 /* but the old state plane zones can be used. Handle this. */ 190 /************************************************************************/ 191 192 static int ITTVISToUSGSZone( int nITTVISZone ) 192 193 193 194 { … … 195 196 int i; 196 197 198 // Default is to use the zone as-is, as long as it is in the 199 // available list 197 200 for( i = 0; i < nPairs; i++ ) 198 201 { 199 if( anUsgsEsriZones[i*2 +1] == nESRIZone )202 if( anUsgsEsriZones[i*2] == nITTVISZone ) 200 203 return anUsgsEsriZones[i*2]; 201 204 } 202 205 203 return nESRIZone; // perhaps it *is* the USGS zone? 206 // If not found in the new style, see if it is present in the 207 // old style list and convert it. We don't expect to see this 208 // often, but older files allowed it and may still exist. 209 for( i = 0; i < nPairs; i++ ) 210 { 211 if( anUsgsEsriZones[i*2+1] == nITTVISZone ) 212 return anUsgsEsriZones[i*2]; 213 } 214 215 return nITTVISZone; // perhaps it *is* the USGS zone? 204 216 } 205 217 … … 1071 1083 && nCount >= 7 ) 1072 1084 { 1073 oSRS.SetStatePlane( ESRIToUSGSZone(atoi(papszFields[7])), FALSE );1085 oSRS.SetStatePlane( ITTVISToUSGSZone(atoi(papszFields[7])), FALSE ); 1074 1086 } 1075 1087 else if( EQUALN(papszFields[0],"State Plane (NAD 83)",19) 1076 1088 && nCount >= 7 ) 1077 1089 { 1078 oSRS.SetStatePlane( ESRIToUSGSZone(atoi(papszFields[7])), TRUE );1090 oSRS.SetStatePlane( ITTVISToUSGSZone(atoi(papszFields[7])), TRUE ); 1079 1091 } 1080 1092 else if( EQUALN(papszFields[0],"Geographic Lat",14)
