Changeset 12389
- Timestamp:
- 10/12/07 21:47:54 (10 months ago)
- Files:
-
- branches/1.4/gdal/gcore/gdaljp2metadata.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.4/gdal/gcore/gdaljp2metadata.cpp
r10646 r12389 629 629 630 630 /* -------------------------------------------------------------------- */ 631 /* If we still don't have an srsName, check for it on the */ 632 /* boundedBy Envelope. Some products */ 633 /* (ie. EuropeRasterTile23.jpx) use this as the only srsName */ 634 /* delivery vehicle. */ 635 /* -------------------------------------------------------------------- */ 636 if( pszSRSName == NULL ) 637 { 638 pszSRSName = 639 CPLGetXMLValue( psXML, 640 "=FeatureCollection.boundedBy.Envelope.srsName", 641 NULL ); 642 } 643 644 /* -------------------------------------------------------------------- */ 631 645 /* If we have gotten a geotransform, then try to interprete the */ 632 646 /* srsName. */ … … 635 649 && (pszProjection == NULL || strlen(pszProjection) == 0) ) 636 650 { 651 OGRSpatialReference oSRS; 652 637 653 if( EQUALN(pszSRSName,"epsg:",5) ) 638 654 { 639 OGRSpatialReference oSRS;640 655 if( oSRS.SetFromUserInput( pszSRSName ) == OGRERR_NONE ) 641 656 oSRS.exportToWkt( &pszProjection ); 642 657 } 643 else if( EQUALN(pszSRSName,"urn:ogc:def:crs:EPSG::",22) ) 644 { 645 OGRSpatialReference oSRS; 646 if( oSRS.importFromEPSG( atoi(pszSRSName + 22) ) == OGRERR_NONE ) 647 oSRS.exportToWkt( &pszProjection ); 648 } 649 else if( EQUALN(pszSRSName,"urn:ogc:def:crs:EPSG:",21) ) 650 { 651 const char *pszCode = pszSRSName+21; 652 while( *pszCode != ':' && *pszCode != '\0' ) 653 pszCode++; 654 655 OGRSpatialReference oSRS; 656 if( oSRS.importFromEPSG( atoi(pszCode+1) ) == OGRERR_NONE ) 657 oSRS.exportToWkt( &pszProjection ); 658 else if( EQUALN(pszSRSName,"urn:",4) 659 && strstr(pszSRSName,":def:") != NULL 660 && oSRS.importFromURN(pszSRSName) == OGRERR_NONE ) 661 { 662 oSRS.exportToWkt( &pszProjection ); 658 663 } 659 664 else if( !GMLSRSLookup( pszSRSName ) )
