33 m_memoryMapFlag(false),
48 static const char MODULE[] =
"ossimGeoidImage::open";
96 << MODULE <<
" ERROR: Caught Exception!" 98 <<
"\nMemory mapping entire grid into memory has been disabled..." 108 << MODULE <<
" ERROR:" 109 <<
"\nGeometry object has null projection!" 118 << MODULE <<
" ERROR:" 119 <<
"\nCould not get geometry info!" 148 const char* prefix )
const 150 std::string myPrefix = ( prefix ? prefix :
"" );
153 std::string key =
"connection_string";
163 kwl.
addPair( myPrefix, key, value,
true );
168 kwl.
addPair( myPrefix, key, value,
true );
172 value =
"geoid_image";
173 kwl.
addPair( myPrefix, key, value,
true );
183 std::string myPrefix = prefix ? prefix :
"";
187 std::string value = kwl.
findKey( myPrefix, key );
189 if ( (value ==
"geoid_image" ) || ( value ==
"ossimGeoidImage" ) )
197 value = kwl.
findKey( myPrefix, key );
202 value = kwl.
findKey( myPrefix, key );
206 std::string key =
"connection_string";
250 <<
"ossimGeoidImage::offsetFromEllipsoid ERROR:\n" 251 <<
"Unhandled scalar type: " 261 <<
"ossimGeoidImage::offsetFromEllipsoid ERROR: Object not initialized!\n" 327 double p00 = buf[offset];
328 double p01 = buf[offset+1];
329 double p10 = buf[offset2];
330 double p11 = buf[offset2+1];
332 double xt0 = imgDpt.
x - x0;
333 double yt0 = imgDpt.
y - y0;
337 double w00 = xt1*yt1;
338 double w01 = xt0*yt1;
339 double w10 = xt1*yt0;
340 double w11 = xt0*yt0;
345 if (p00 == NP) w00 = 0.0;
346 if (p01 == NP) w01 = 0.0;
347 if (p10 == NP) w10 = 0.0;
348 if (p11 == NP) w11 = 0.0;
350 double sum_weights = w00 + w01 + w10 + w11;
353 geoidOffset = (p00*w00 + p01*w01 + p10*w10 + p11*w11) / sum_weights;
ossimString m_geoidTypeName
virtual ossim_uint32 getWidth() const
virtual double offsetFromEllipsoid(const ossimGpt &gpt)
ossimScalarType m_scalarType
ossimRefPtr< ossimImageData > m_cacheTile
bool getMemoryMapFlag() const
Gets the memory map flag.
void setMemoryMapFlag(bool flag)
Set the memory map flag.
virtual ossimImageHandler * open(const ossimFilename &fileName, bool trySuffixFirst=true, bool openOverview=true) const
open that takes a filename.
Represents serializable keyword/value map.
const std::string & findKey(const std::string &key) const
Find methods that take std::string(s).
virtual ossimString getEntryString(ossim_int32 entry_number) const
double nan()
Method to return ieee floating point double precision NAN.
std::string m_connectionString
ossim_uint32 height() const
ossimGeoidImage()
default constructor
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of the object to a keyword list.
void addPair(const std::string &key, const std::string &value, bool overwrite=true)
void setShortName(const std::string &geoidTypeName)
Sets the geoid type name string.
virtual bool open(const ossimFilename &file, ossimByteOrder byteOrder=OSSIM_BIG_ENDIAN)
open method
void wrap()
Wrap method to maintain longitude between -180 and +180 and latitude between -90 and +90...
ossimRefPtr< ossimImageGeometry > m_geom
static const char * TYPE_KW
void changeDatum(const ossimDatum *datum)
This will actually perform a shift.
static ossimScalarTypeLut * instance()
Returns the static instance of an ossimScalarTypeLut object.
virtual ossimRefPtr< ossimImageGeometry > getImageGeometry()
Returns the image geometry object associated with this tile source or NULL if non defined...
signed short ossim_sint16
virtual const char * what() const
Returns the error message.
ossimRefPtr< ossimImageHandler > m_handler
bool toBool() const
String to numeric methods.
virtual const ossim_float64 * getNullPix() const
static ossimDatumFactory * instance()
virtual void close()
Deletes the overview and clears the valid image vertices.
virtual ossimIrect getImageRectangle(ossim_uint32 resLevel=0) const
Returns zero-based bounding rectangle of the image.
ossim_uint32 width() const
static const char * ENABLED_KW
virtual ~ossimGeoidImage()
destructor
virtual ossimString getShortName() const
const ossimProjection * getProjection() const
Access methods for projection (may be NULL pointer).
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Method to the load (recreate) the state of the object from a keyword list.
virtual ossimScalarType getOutputScalarType() const
This will be used to query the output pixel type of the tile source.
virtual const void * getBuf() const
bool worldToLocal(const ossimGpt &world_pt, ossimDpt &local_pt) const
Exposes the 3D world-to-local image coordinate reverse projection.
static ossimImageHandlerRegistry * instance()
virtual const ossimIpt & getOrigin() const
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
double offsetFromEllipsoidTemplate(T dummy, const ossimGpt &gpt)
const std::string & string() const
virtual ossimRefPtr< ossimImageData > getTile(const ossimIpt &origin, ossim_uint32 resLevel=0)
bool pointWithin(const ossimIpt &pt) const