Beispiel #1
0
ossimProjection* ossimNitfProjectionFactory::createProjectionFromHeaders(ossimNitfFileHeader* fileHeader,
                                                                         ossimNitfImageHeader* imageHeader)const
{
   ossimProjection* result = 0;
   ossimString version = fileHeader->getVersion();
   ossimString coordinateSystem   = imageHeader->getCoordinateSystem();
   if (coordinateSystem == "G" || coordinateSystem == "D")
   {
      result = makeGeographic(imageHeader, coordinateSystem);
   }
   else if(coordinateSystem == "N" || coordinateSystem == "S")
   {
      result = makeUtm(imageHeader, coordinateSystem);
   }
   return result;
}
ossimProjection* ossimNitfProjectionFactory::createProjectionFromHeaders(
   ossimNitfFileHeader* fileHeader, ossimNitfImageHeader* imageHeader)const
{
   ossimProjection* result = 0;
   ossimString version = fileHeader->getVersion();
   ossimString coordinateSystem = imageHeader->getCoordinateSystem();

   // Note in version 2.0 ICORDS with 'N' == NONE.  In 2.1 it is UTM North:
   if (coordinateSystem == "G" || coordinateSystem == "D")
   {
      result = makeGeographic(imageHeader, coordinateSystem);
   }
   else if( (coordinateSystem == "S") || (coordinateSystem == "U") || 
            ( version != "02.00" && (coordinateSystem == "N") ) )
   {
      result = makeUtm(imageHeader, coordinateSystem);
   }
   return result;
}