bool ossimH5GridModel::saveState(ossimKeywordlist& kwl, const char* prefix) const { // Base save state. This will save the "type" key to "ossimH5GridModel". bool status = ossimCoarseGridModel::saveState( kwl, prefix ); if ( status ) { std::string myPrefix = ( prefix ? prefix: "" ); std::string value; // m_crossesDateline: value = ossimString::toString(m_crossesDateline).string(); kwl.addPair( myPrefix,CROSSES_DATELINE_KW, value, true ); // Computed wkt footprint: if ( getWktFootprint( value ) ) { kwl.addPair( myPrefix, WKT_FOOTPRINT_KW, value, true ); } // m_boundGndPolygon: if ( m_boundGndPolygon.getNumberOfVertices() ) { std::string polyPrefix = myPrefix; polyPrefix += GROUND_POLYGON_KW; polyPrefix += "."; m_boundGndPolygon.saveState( kwl, polyPrefix.c_str() ); } //--- // theSeedFunction: This is in the base class ossimSensorModel but is not // in the ossimSensorModel::saveState so do it here. //--- if ( theSeedFunction.valid() ) { ossimString seedPrefix = myPrefix; seedPrefix += "seed_projection."; status = theSeedFunction->saveState(kwl, seedPrefix.c_str()); } } return status; }
bool ossimHdfGridModel::saveState(ossimKeywordlist& kwl, const char* prefix) const { bool status = ossimCoarseGridModel::saveState( kwl, prefix ); if ( status ) { std::string myPrefix = ( prefix ? prefix: "" ); // Add the is hdf4 flag: std::string key = "is_hdf4"; std::string value = ossimString::toString( m_isHdf4 ).string(); kwl.addPair( myPrefix, key, value, true ); if ( getWktFootprint( value ) ) { std::string key = "wkt_footprint"; kwl.addPair( myPrefix, key, value, true ); } } return status; }