33 static ossimTrace traceExec (
"ossimGeoidManager:exec");
34 static ossimTrace traceDebug (
"ossimGeoidManager:debug");
119 static const char MODULE[] =
"ossimGeoidManager::loadState()";
122 <<
"DEBUG: " << MODULE <<
", entering...\n";
129 std::string geoidMgrPrefix = prefix ? prefix :
"geoid.manager.";
132 "geoid_source[0-9]+.)";
139 std::string newPrefix = keys[idx];
144 std::string value = kwl.
findKey( newPrefix, key );
154 value = kwl.
findKey( newPrefix, key );
156 if ( (value ==
"geoid_image" ) || ( value ==
"ossimGeoidImage" ) )
159 if ( geoid->
loadState( kwl, newPrefix.c_str() ) )
164 <<
"DEBUG: " << MODULE
177 const char* lookup = kwl.
find(prefix,
"geoid_99_directory");
179 const char*
byteOrder = kwl.
find(prefix,
"geoid_99_directory.byte_order");
182 lookup = kwl.
find(prefix,
"geoid_ngs_directory");
183 byteOrder = kwl.
find(prefix,
"geoid_ngs_directory.byte_order");
208 <<
"DEBUG: " << MODULE
209 <<
"\nAdded geoid dir: " << f.
c_str() <<
"\n";
221 geoidGrid1996 = geoidGrid1996.
dirCat(
"geoids");
222 geoidGrid1996 = geoidGrid1996.
dirCat(
"geoid1996");
223 geoidGrid1996 = geoidGrid1996.
dirCat(
"egm96.grd");
225 if(!geoidGrid1996.
exists())
228 geoidGrid1996 = geoidGrid1996.
dirCat(
"geoids");
229 geoidGrid1996 = geoidGrid1996.
dirCat(
"geoid1996");
230 geoidGrid1996 = geoidGrid1996.
dirCat(
"egm96.grd");
233 if( geoidGrid1996.
exists() )
241 <<
"DEBUG: " << MODULE
242 <<
"\nAdded geoid egm 96: " << geoidGrid1996.
c_str()
255 lookup = kwl.
find(prefix,
"geoid_egm_96_grid");
268 <<
"DEBUG: " << MODULE
269 <<
"\nAdded geoid egm 96: " << f.
c_str()
285 <<
"DEBUG: " << MODULE <<
", returning...\n";
298 std::vector<ossimRefPtr<ossimGeoid> >::iterator g =
theGeoidList.begin();
316 std::vector<ossimRefPtr<ossimGeoid> >::iterator geoid =
332 if(shortName ==
"identity")
virtual ~ossimGeoidManager()
Represents serializable keyword/value map.
const std::string & findKey(const std::string &key) const
Find methods that take std::string(s).
static const ossimErrorCode OSSIM_OK
ossimFilename getInstalledOssimSupportDir() const
const char * find(const char *key) const
double nan()
Method to return ieee floating point double precision NAN.
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of the object to a keyword list.
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
OSSIM_DLL ossimByteOrder byteOrder()
ossimRefPtr< ossimGeoid > theIdentityGeoid
virtual ossimString getShortName() const
static const char * TYPE_KW
Generic geoid source which uses a image handler for reading the grid.
ossimGeoid * findGeoidByShortName(const ossimString &shortName, bool caseSensitive=true)
bool toBool() const
String to numeric methods.
unsigned int ossim_uint32
static ossimGeoidManager * instance()
Implements singelton pattern:
RTTI_DEF1(ossimGeoidManager, "ossimGeoidManager", ossimGeoid)
static ossimString downcase(const ossimString &aString)
virtual void addGeoid(ossimRefPtr< ossimGeoid > geoid, bool toFrontFlag=false)
Permits adding additional geoids to the list:
static const char * ENABLED_KW
std::vector< ossimString > getSubstringKeyList(const ossimString ®ularExpression) const
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Method to the load (recreate) the state of the object from a keyword list.
static ossimEnvironmentUtility * instance()
virtual ossimErrorCode getErrorStatus() const
virtual void clear()
Permits to clear the GeoidList.
ossimFilename dirCat(const ossimFilename &file) const
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string's contents...
virtual bool open(const ossimFilename &dir, ossimByteOrder byteOrder)
Permits initialization of geoids from directory name.
std::vector< ossimRefPtr< ossimGeoid > > theGeoidList
ossimFilename getUserOssimSupportDir() const
virtual double offsetFromEllipsoid(const ossimGpt &gpt)
ossimGeoidManager()
Private constructor.
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
bool isnan(const float &v)
isnan Test for floating point Not A Number (NAN) value.