OSSIM - Open Source Software Image Map
Version 1.9.0 (20180803)
|
#include <ossimSrtmSupportData.h>
Public Member Functions | |
ossimSrtmSupportData () | |
default constructor More... | |
virtual | ~ossimSrtmSupportData () |
destructor More... | |
bool | setFilename (const ossimFilename &srtmFile, bool scanForMinMax=false) |
Initializes object from file. More... | |
ossimFilename | getFilename () const |
ossim_uint32 | getNumberOfLines () const |
ossim_uint32 | getNumberOfSamples () const |
virtual bool | getImageGeometry (ossimKeywordlist &kwl, const char *prefix=0) |
Populates the keyword list with image geometry information. More... | |
ossimRefPtr< ossimProjection > | getProjection () const |
Gets the projection for srtm cell. More... | |
virtual bool | saveState (ossimKeywordlist &kwl, const char *prefix=0) const |
Method to save the state of the object to a keyword list. More... | |
virtual bool | loadState (const ossimKeywordlist &kwl, const char *prefix=0) |
Method to the load (recreate) the state of the object from a keyword list. More... | |
ossim_float64 | getSouthwestLatitude () const |
ossim_float64 | getSouthwestLongitude () const |
ossim_float64 | getLatitudeSpacing () const |
ossim_float64 | getLongitudeSpacing () const |
ossim_float64 | getMinPixelValue () const |
ossim_float64 | getMaxPixelValue () const |
ossimScalarType | getScalarType () const |
virtual std::ostream & | print (std::ostream &out) const |
Prints data members for debug. More... | |
![]() | |
ossimObject () | |
virtual | ~ossimObject () |
virtual ossimObject * | dup () const |
virtual ossimString | getShortName () const |
virtual ossimString | getLongName () const |
virtual ossimString | getDescription () const |
virtual ossimString | getClassName () const |
virtual RTTItypeid | getType () const |
virtual bool | canCastTo (ossimObject *obj) const |
virtual bool | canCastTo (const RTTItypeid &id) const |
virtual bool | canCastTo (const ossimString &parentClassName) const |
virtual bool | isEqualTo (const ossimObject &obj, ossimCompareType compareType=OSSIM_COMPARE_FULL) const |
virtual void | accept (ossimVisitor &visitor) |
![]() | |
ossimReferenced () | |
ossimReferenced (const ossimReferenced &) | |
ossimReferenced & | operator= (const ossimReferenced &) |
void | ref () const |
increment the reference count by one, indicating that this object has another pointer which is referencing it. More... | |
void | unref () const |
decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
void | unref_nodelete () const |
decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
int | referenceCount () const |
Private Member Functions | |
bool | loadOmd (const ossimKeywordlist &kwl, const char *prefix=0) |
This is a loadState called by setFilename that does not reset "theFile". More... | |
void | clear () |
Sets all data members to an unitialized state. More... | |
bool | setCornerPoints () |
Sets corner points from "theFile". More... | |
bool | setSize () |
Sets lines and samples from "theFile" size. More... | |
bool | computeMinMax () |
Scans file for min and max pixels. More... | |
template<class T > | |
bool | computeMinMaxTemplate (T dummy, double defaultNull) |
Additional Inherited Members | |
![]() | |
virtual | ~ossimReferenced () |
Definition at line 35 of file ossimSrtmSupportData.h.
ossimSrtmSupportData::ossimSrtmSupportData | ( | ) |
default constructor
Definition at line 45 of file ossimSrtmSupportData.cpp.
|
virtual |
|
private |
Sets all data members to an unitialized state.
Definition at line 537 of file ossimSrtmSupportData.cpp.
References m_file, m_latSpacing, m_lonSpacing, m_minPixelValue, m_numberOfLines, m_numberOfSamples, m_southwestLatitude, m_southwestLongitude, ossim::nan(), and ossimFilename::NIL.
|
private |
Scans file for min and max pixels.
true on success, false on error.
Definition at line 820 of file ossimSrtmSupportData.cpp.
References computeMinMaxTemplate(), m_scalarType, and OSSIM_FLOAT32.
|
private |
Definition at line 832 of file ossimSrtmSupportData.cpp.
References ossim::byteOrder(), ossim::StreamFactoryRegistry::createIstream(), ossim::defaultNull(), FLT_EPSILON, ossim::StreamFactoryRegistry::instance(), m_file, m_maxPixelValue, m_minPixelValue, m_numberOfLines, m_numberOfSamples, m_str, OSSIM_LITTLE_ENDIAN, and ossimEndian::swap().
Referenced by computeMinMax().
ossimFilename ossimSrtmSupportData::getFilename | ( | ) | const |
Definition at line 182 of file ossimSrtmSupportData.cpp.
References m_file.
|
virtual |
Populates the keyword list with image geometry information.
This method is used to relay projection information to users.
kwl | Keyword list that will be initialized with geometry info. Returns true if geometry info is present, false if not. |
prefix | The prefix is added to the resulting keyword list keywords. So is you if you pass in a prefix of "image01.", the keyword ul_lat will be like: "image01.ul_lat: -40.00000" |
Definition at line 197 of file ossimSrtmSupportData.cpp.
References ossimKeywordlist::add(), ossimKeywordNames::CENTRAL_MERIDIAN_KW, ossimKeywordNames::DATUM_KW, ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LAT, ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LON, ossimDatumFactory::instance(), m_file, m_latSpacing, m_lonSpacing, m_numberOfLines, m_numberOfSamples, m_southwestLatitude, m_southwestLongitude, ossimFilename::NIL, ossimKeywordNames::NUMBER_LINES_KW, ossimKeywordNames::NUMBER_SAMPLES_KW, ossimKeywordNames::ORIGIN_LATITUDE_KW, ossimKeywordNames::TIE_POINT_LAT_KW, ossimKeywordNames::TIE_POINT_LON_KW, and ossimKeywordNames::TYPE_KW.
ossim_float64 ossimSrtmSupportData::getLatitudeSpacing | ( | ) | const |
Definition at line 527 of file ossimSrtmSupportData.cpp.
References m_latSpacing.
Referenced by ossimSrtmHandler::open().
ossim_float64 ossimSrtmSupportData::getLongitudeSpacing | ( | ) | const |
Definition at line 532 of file ossimSrtmSupportData.cpp.
References m_lonSpacing.
Referenced by ossimSrtmHandler::open().
ossim_float64 ossimSrtmSupportData::getMaxPixelValue | ( | ) | const |
Definition at line 890 of file ossimSrtmSupportData.cpp.
References m_maxPixelValue.
ossim_float64 ossimSrtmSupportData::getMinPixelValue | ( | ) | const |
Definition at line 885 of file ossimSrtmSupportData.cpp.
References m_minPixelValue.
ossim_uint32 ossimSrtmSupportData::getNumberOfLines | ( | ) | const |
Definition at line 187 of file ossimSrtmSupportData.cpp.
References m_numberOfLines.
Referenced by ossimSrtmHandler::open().
ossim_uint32 ossimSrtmSupportData::getNumberOfSamples | ( | ) | const |
Definition at line 192 of file ossimSrtmSupportData.cpp.
References m_numberOfSamples.
Referenced by ossimSrtmHandler::open().
ossimRefPtr< ossimProjection > ossimSrtmSupportData::getProjection | ( | ) | const |
Gets the projection for srtm cell.
Definition at line 261 of file ossimSrtmSupportData.cpp.
References ossimDatum::ellipsoid(), ossimRefPtr< T >::get(), ossimDatumFactory::instance(), m_latSpacing, m_lonSpacing, m_southwestLatitude, m_southwestLongitude, ossimMapProjection::setDecimalDegreesPerPixel(), ossimMapProjection::setUlTiePoints(), and ossimDatumFactory::wgs84().
ossimScalarType ossimSrtmSupportData::getScalarType | ( | ) | const |
Definition at line 895 of file ossimSrtmSupportData.cpp.
References m_scalarType.
Referenced by ossimSrtmHandler::open().
ossim_float64 ossimSrtmSupportData::getSouthwestLatitude | ( | ) | const |
Definition at line 518 of file ossimSrtmSupportData.cpp.
References m_southwestLatitude.
Referenced by ossimSrtmHandler::open().
ossim_float64 ossimSrtmSupportData::getSouthwestLongitude | ( | ) | const |
Definition at line 523 of file ossimSrtmSupportData.cpp.
References m_southwestLongitude.
Referenced by ossimSrtmHandler::open().
|
private |
This is a loadState called by setFilename that does not reset "theFile".
Definition at line 418 of file ossimSrtmSupportData.cpp.
References ossimKeywordlist::findKey(), ossimLookUpTable::getEntryNumber(), ossimScalarTypeLut::instance(), m_latSpacing, m_lonSpacing, m_maxPixelValue, m_minPixelValue, m_numberOfLines, m_numberOfSamples, m_scalarType, m_southwestLatitude, m_southwestLongitude, ossimKeywordNames::MAX_VALUE_KW, ossimKeywordNames::MIN_VALUE_KW, ossimLookUpTable::NOT_FOUND, ossimKeywordNames::NUMBER_LINES_KW, ossimKeywordNames::NUMBER_SAMPLES_KW, OSSIM_FLOAT32, OSSIM_SINT16, ossimString::size(), ossimString::string(), ossimKeywordNames::TIE_POINT_LAT_KW, ossimKeywordNames::TIE_POINT_LON_KW, ossimString::toFloat64(), and ossimString::toUInt32().
Referenced by loadState().
|
virtual |
Method to the load (recreate) the state of the object from a keyword list.
Return true if ok or false on error.
Reimplemented from ossimObject.
Definition at line 381 of file ossimSrtmSupportData.cpp.
References ossimKeywordNames::FILENAME_KW, ossimKeywordlist::find(), ossimKeywordNames::IMAGE_FILE_KW, loadOmd(), and m_file.
|
virtual |
Prints data members for debug.
Reimplemented from ossimObject.
Definition at line 900 of file ossimSrtmSupportData.cpp.
References m_file, m_latSpacing, m_lonSpacing, m_maxPixelValue, m_minPixelValue, m_numberOfLines, m_numberOfSamples, m_southwestLatitude, and m_southwestLongitude.
|
virtual |
Method to save the state of the object to a keyword list.
Return true if ok or false on error.
Reimplemented from ossimObject.
Definition at line 284 of file ossimSrtmSupportData.cpp.
References ossimKeywordlist::add(), ossimString::c_str(), ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LAT, ossimKeywordNames::DECIMAL_DEGREES_PER_PIXEL_LON, ossimKeywordNames::FILENAME_KW, m_file, m_latSpacing, m_lonSpacing, m_minPixelValue, m_numberOfLines, m_numberOfSamples, m_southwestLatitude, m_southwestLongitude, ossimFilename::NIL, ossimKeywordNames::NUMBER_BANDS_KW, ossimKeywordNames::NUMBER_LINES_KW, ossimKeywordNames::NUMBER_SAMPLES_KW, ossimKeywordNames::TIE_POINT_LAT_KW, and ossimKeywordNames::TIE_POINT_LON_KW.
|
private |
Sets corner points from "theFile".
Definition at line 550 of file ossimSrtmSupportData.cpp.
bool ossimSrtmSupportData::setFilename | ( | const ossimFilename & | srtmFile, |
bool | scanForMinMax = false |
||
) |
Initializes object from file.
File is expected to be in a format like N27W081.hgt or n27w081.hgt where "N27" is the South West latitude of the cell and "W081" is the South West longitude of the cell.
srtmFile | File to set. |
scanForMinMax | If true and there is no ossim meta data file with the min and max keywords in it, this will call computeMinMax which will scan the file for min and max. |
Definition at line 65 of file ossimSrtmSupportData.cpp.
References m_file.
Referenced by ossimSrtmHandler::open().
|
private |
Sets lines and samples from "theFile" size.
Definition at line 666 of file ossimSrtmSupportData.cpp.
|
private |
Definition at line 187 of file ossimSrtmSupportData.h.
Referenced by clear(), computeMinMaxTemplate(), getFilename(), getImageGeometry(), loadState(), print(), saveState(), and setFilename().
|
private |
Definition at line 192 of file ossimSrtmSupportData.h.
Referenced by clear(), getImageGeometry(), getLatitudeSpacing(), getProjection(), loadOmd(), print(), and saveState().
|
private |
Definition at line 193 of file ossimSrtmSupportData.h.
Referenced by clear(), getImageGeometry(), getLongitudeSpacing(), getProjection(), loadOmd(), print(), and saveState().
|
private |
Definition at line 195 of file ossimSrtmSupportData.h.
Referenced by computeMinMaxTemplate(), getMaxPixelValue(), loadOmd(), and print().
|
private |
Definition at line 194 of file ossimSrtmSupportData.h.
Referenced by clear(), computeMinMaxTemplate(), getMinPixelValue(), loadOmd(), print(), and saveState().
|
private |
Definition at line 188 of file ossimSrtmSupportData.h.
Referenced by clear(), computeMinMaxTemplate(), getImageGeometry(), getNumberOfLines(), loadOmd(), print(), and saveState().
|
private |
Definition at line 189 of file ossimSrtmSupportData.h.
Referenced by clear(), computeMinMaxTemplate(), getImageGeometry(), getNumberOfSamples(), loadOmd(), print(), and saveState().
|
private |
Definition at line 197 of file ossimSrtmSupportData.h.
Referenced by computeMinMax(), getScalarType(), and loadOmd().
|
private |
Definition at line 190 of file ossimSrtmSupportData.h.
Referenced by clear(), getImageGeometry(), getProjection(), getSouthwestLatitude(), loadOmd(), print(), and saveState().
|
private |
Definition at line 191 of file ossimSrtmSupportData.h.
Referenced by clear(), getImageGeometry(), getProjection(), getSouthwestLongitude(), loadOmd(), print(), and saveState().
|
mutableprivate |
Definition at line 200 of file ossimSrtmSupportData.h.
Referenced by computeMinMaxTemplate().