OSSIM - Open Source Software Image Map
Version 1.9.0 (20180803)
|
#include <ossimGrect.h>
Public Member Functions | |
ossimGrect () | |
Will default to 0,0,0,0. More... | |
ossimGrect (const ossimGrect &rect) | |
Copies the passed in rectangle to this object. More... | |
ossimGrect (const ossimGpt &p1, const ossimGpt &p2) | |
WIll take two ground points and fill the bounding rect appropriately. More... | |
ossimGrect (double ulLat, double ulLon, double lrLat, double lrLon, const ossimDatum *aDatum=ossimDatumFactory::instance() ->wgs84()) | |
Takes the upper left and lower right ground points. More... | |
ossimGrect (const ossimGpt &point, double latSpacingInDegrees, double lonSpacingInDegrees) | |
ossimGrect (std::vector< ossimGpt > &points) | |
ossimGrect (const ossimGpt &p1, const ossimGpt &p2, const ossimGpt &p3, const ossimGpt &p4) | |
const ossimGrect & | operator= (const ossimGrect &rect) |
ossimGpt | midPoint () const |
ossim_float64 | height () const |
Returns the height of a rectangle in deg. More... | |
ossim_float64 | width () const |
Returns the width of a rectangle in deg. More... | |
ossim_float64 | heightMeters () const |
Returns the height of a rectangle in meters. More... | |
ossim_float64 | widthMeters () const |
Returns the width of a rectangle in meters using the center lat for scaling EW direction. More... | |
const ossimGpt & | ul () const |
const ossimGpt & | lr () const |
ossimGpt | ur () const |
ossimGpt | ll () const |
ossimGpt & | ul () |
ossimGpt & | lr () |
void | makeNan () |
bool | isLonLatNan () const |
bool | hasNans () const |
bool | isNan () const |
bool | completely_within (const ossimGrect &rect) const |
bool | intersects (const ossimGrect &rect) const |
ossimGrect | clipToRect (const ossimGrect &rect) const |
ossimGrect | combine (const ossimGrect &rect) const |
void | expandToInclude (const ossimGpt &gpt) |
Expands existing rect to accommodate argument point. More... | |
void | expandToInclude (const ossimGrect &rect) |
bool | pointWithin (const ossimGpt &gpt, bool considerHgt=false) const |
METHOD: pointWithin(ossimGpt) More... | |
ossimGrect | stretchToEvenBoundary (double latSpacingInDegrees, double lonSpacingInDegrees) const |
void | computeEvenTiles (std::vector< ossimGrect > &result, double latSpacingInDegrees, double lonSpacingInDegrees, bool clipToGeographicBounds=true) const |
Private Attributes | |
ossimGpt | theUlCorner |
ossimGpt | theLrCorner |
Friends | |
OSSIM_DLL std::ostream & | operator<< (std::ostream &os, const ossimGrect &rect) |
Definition at line 23 of file ossimGrect.h.
|
inline |
Will default to 0,0,0,0.
Definition at line 31 of file ossimGrect.h.
Referenced by clipToRect(), combine(), computeEvenTiles(), and stretchToEvenBoundary().
|
inline |
WIll take two ground points and fill the bounding rect appropriately.
Definition at line 74 of file ossimGrect.cpp.
References ossimGpt::hgt, ossimGpt::lat, ossimGpt::lon, theLrCorner, and theUlCorner.
|
inline |
|
inline |
Definition at line 66 of file ossimGrect.h.
ossimGrect::ossimGrect | ( | std::vector< ossimGpt > & | points | ) |
ossimGrect::ossimGrect | ( | const ossimGpt & | p1, |
const ossimGpt & | p2, | ||
const ossimGpt & | p3, | ||
const ossimGpt & | p4 | ||
) |
Definition at line 110 of file ossimGrect.cpp.
References ossimGpt::hgt, ossimGpt::latd(), ossimGpt::lond(), theLrCorner, and theUlCorner.
|
inline |
Definition at line 190 of file ossimGrect.h.
References ossimGpt::datum(), ossimGpt::latd(), ossimGpt::lond(), lr(), ossim::max< ossim_float64 >(), ossim::min< ossim_float64 >(), ossimGrect(), and ul().
Referenced by ossimChipProcTool::setAoiToInputs(), and ossimGeographicAnnotationGrid::setViewProjectionInformation().
|
inline |
Definition at line 213 of file ossimGrect.h.
References isLonLatNan(), ossimGpt::lat, ossimGpt::lon, lr(), ossimGrect(), and ul().
Referenced by ossimImageElevationDatabase::getBoundingRect().
bool ossimGrect::completely_within | ( | const ossimGrect & | rect | ) | const |
Returns true if "this" rectangle is contained completely within the input rectangle "rect".
Definition at line 218 of file ossimGrect.cpp.
References isLonLatNan(), ossimGpt::lat, ossimGpt::lon, lr(), theLrCorner, theUlCorner, ul(), and ur().
void ossimGrect::computeEvenTiles | ( | std::vector< ossimGrect > & | result, |
double | latSpacingInDegrees, | ||
double | lonSpacingInDegrees, | ||
bool | clipToGeographicBounds = true |
||
) | const |
Definition at line 179 of file ossimGrect.cpp.
References ossimGpt::datum(), ossimGpt::latd(), ossimGpt::lond(), ossimGrect(), pointWithin(), stretchToEvenBoundary(), theUlCorner, and ul().
void ossimGrect::expandToInclude | ( | const ossimGpt & | gpt | ) |
Expands existing rect to accommodate argument point.
If this object contains NaNs (uninitialized), then the rect is set to 0-area with the arg point as both UL and LR – convenient for establishing bounds in a loop over collection of points. This method does not consider height.
gpt | Argument point. |
Definition at line 299 of file ossimGrect.cpp.
References isLonLatNan(), ossimGpt::lat, ossimGpt::lon, pointWithin(), theLrCorner, and theUlCorner.
Referenced by expandToInclude(), ossimRangeDomeTileSource::initialize(), and ossimChipProcTool::setAoiToInputs().
void ossimGrect::expandToInclude | ( | const ossimGrect & | rect | ) |
Definition at line 319 of file ossimGrect.cpp.
References expandToInclude(), lr(), and ul().
|
inline |
Definition at line 298 of file ossimGrect.h.
References ossimGpt::hasNans(), theLrCorner, and theUlCorner.
Referenced by ossimChipProcTool::computeAdjustedViewFromGrect(), ossimChipProcTool::getChip(), ossimViewshedTool::initializeAOI(), ossimShorelineTool::initProcessingChain(), ossimHlzTool::initProcessingChain(), and ossimChipProcTool::setAoiToInputs().
|
inline |
Returns the height of a rectangle in deg.
Definition at line 242 of file ossimGrect.h.
References ossimGpt::latd(), theLrCorner, and theUlCorner.
Referenced by ossimGeographicAnnotationGrid::draw(), heightMeters(), ossimRangeDomeTileSource::initialize(), and midPoint().
ossim_float64 ossimGrect::heightMeters | ( | ) | const |
Returns the height of a rectangle in meters.
Definition at line 286 of file ossimGrect.cpp.
References height(), midPoint(), and ossimDpt::y.
Referenced by ossimPointCloudImageHandler::getImageGeometry().
bool ossimGrect::intersects | ( | const ossimGrect & | rect | ) | const |
Returns true if any portion of an input rectangle "rect" intersects "this" rectangle.
Definition at line 266 of file ossimGrect.cpp.
References isLonLatNan(), ossimGpt::lat, ossimGpt::lon, lr(), ossim::max(), ossim::min(), and ul().
Referenced by ossimHlzTool::PatchProcessorJob::level2Test().
|
inline |
Definition at line 290 of file ossimGrect.h.
References ossim::isnan(), ossimGpt::lat, ossimGpt::lon, theLrCorner, and theUlCorner.
Referenced by combine(), completely_within(), expandToInclude(), ossimImageElevationDatabase::getBoundingRect(), intersects(), ossimTiledElevationDatabase::mapRegion(), and ossimTiledElevationDatabase::pointHasCoverage().
|
inline |
Definition at line 304 of file ossimGrect.h.
References ossimGpt::hasNans(), theLrCorner, and theUlCorner.
|
inline |
Definition at line 263 of file ossimGrect.h.
References ossimGpt::datum(), ossimGpt::hgt, ossimGpt::lat, ossimGpt::lon, theLrCorner, and theUlCorner.
Referenced by ossimGeographicAnnotationGrid::computeBoundingRect(), ossimViewshedTool::computeRadius(), ossimPointCloudImageHandler::getValidImageVertices(), midPoint(), ossimViewshedTool::optimizeFOV(), ossimGenericPointCloudHandler::ossimGenericPointCloudHandler(), ossimUsgsQuad::quadKwRect(), ossimUsgsQuad::quarterQuadKwRect(), and ossimImageGeometry::worldToLocal().
|
inline |
Definition at line 269 of file ossimGrect.h.
References theLrCorner.
Referenced by clipToRect(), combine(), completely_within(), ossimChipProcTool::computeAdjustedViewFromGrect(), ossimGeographicAnnotationGrid::computeBoundingRect(), ossimViewshedTool::computeRadius(), ossimGeographicAnnotationGrid::draw(), expandToInclude(), ossimRialtoReader::getBlock(), ossimImageGeometry::getBoundingGroundRect(), ossimElevManager::getCellsForBounds(), ossimSrtmHandler::getHeightAboveMSLMemoryTemplate(), ossimPointCloudImageHandler::getValidImageVertices(), intersects(), ossimTiledElevationDatabase::mapRegion(), midPoint(), operator=(), ossimViewshedTool::optimizeFOV(), ossimPointCloudImageHandler::setGSD(), ossimGeographicAnnotationGrid::setViewProjectionInformation(), stretchToEvenBoundary(), and ossimImageGeometry::worldToLocal().
|
inline |
|
inline |
Definition at line 284 of file ossimGrect.h.
References ossimGpt::makeNan(), theLrCorner, and theUlCorner.
Referenced by ossimTiledElevationDatabase::close(), ossimImageElevationDatabase::getBoundingRect(), ossimTiledElevationDatabase::getBoundingRect(), ossimPointCloudHandler::getBounds(), ossimRangeDomeTileSource::initialize(), ossimChipProcTool::initializeAOI(), ossimImageElevationHandler::open(), ossimImageElevationDatabase::ossimImageElevationFileEntry::ossimImageElevationFileEntry(), ossimTiledElevationDatabase::ossimTiledElevationDatabase(), and ossimChipProcTool::setAoiToInputs().
|
inline |
Definition at line 178 of file ossimGrect.h.
References height(), ll(), lr(), ul(), and ur().
Referenced by heightMeters(), ossimRangeDomeTileSource::initialize(), ossimViewshedTool::initializeAOI(), and widthMeters().
|
inline |
Definition at line 85 of file ossimGrect.h.
|
inline |
METHOD: pointWithin(ossimGpt)
gpt | Point to test for withinness. |
considerHgt | true if the height is to be compared to be between ul.hgt and lr.hgt |
Definition at line 232 of file ossimGrect.h.
References ossimGpt::hgt, ossimGpt::lat, ossimGpt::lon, theLrCorner, and theUlCorner.
Referenced by computeEvenTiles(), expandToInclude(), ossimPointCloudHandler::getBlock(), ossimUsgsQuad::getQuadList(), ossimPointCloudImageHandler::getTile(), ossimViewshedTool::optimizeFOV(), ossimElevCellHandler::pointHasCoverage(), and ossimTiledElevationDatabase::pointHasCoverage().
ossimGrect ossimGrect::stretchToEvenBoundary | ( | double | latSpacingInDegrees, |
double | lonSpacingInDegrees | ||
) | const |
Definition at line 161 of file ossimGrect.cpp.
References ossimGpt::datum(), ossimGpt::hgt, ossimGpt::latd(), ossimGpt::lond(), lr(), ossimGrect(), theLrCorner, theUlCorner, and ul().
Referenced by computeEvenTiles().
|
inline |
Definition at line 252 of file ossimGrect.h.
References theUlCorner.
Referenced by clipToRect(), combine(), completely_within(), ossimChipProcTool::computeAdjustedViewFromGrect(), ossimGeographicAnnotationGrid::computeBoundingRect(), computeEvenTiles(), ossimViewshedTool::computeRadius(), ossimGeographicAnnotationGrid::draw(), expandToInclude(), ossimRialtoReader::getBlock(), ossimImageGeometry::getBoundingGroundRect(), ossimElevManager::getCellsForBounds(), ossimPointCloudImageHandler::getImageGeometry(), ossimUsgsQuad::getQuadList(), ossimImageGeometry::getTiePoint(), ossimPointCloudImageHandler::getValidImageVertices(), ossimRangeDomeTileSource::initialize(), intersects(), ossimTiledElevationDatabase::mapRegion(), midPoint(), operator=(), ossimViewshedTool::optimizeFOV(), ossimUsgsQuad::quadKwRect(), ossimUsgsQuad::quarterQuadKwRect(), ossimPointCloudImageHandler::setGSD(), ossimGeographicAnnotationGrid::setViewProjectionInformation(), stretchToEvenBoundary(), and ossimImageGeometry::worldToLocal().
|
inline |
|
inline |
Definition at line 257 of file ossimGrect.h.
References ossimGpt::datum(), ossimGpt::hgt, ossimGpt::lat, ossimGpt::lon, theLrCorner, and theUlCorner.
Referenced by completely_within(), ossimGeographicAnnotationGrid::computeBoundingRect(), ossimViewshedTool::computeRadius(), ossimGeographicAnnotationGrid::draw(), ossimPointCloudImageHandler::getValidImageVertices(), midPoint(), ossimViewshedTool::optimizeFOV(), ossimGenericPointCloudHandler::ossimGenericPointCloudHandler(), ossimUsgsQuad::quadKwRect(), ossimUsgsQuad::quarterQuadKwRect(), and ossimImageGeometry::worldToLocal().
|
inline |
Returns the width of a rectangle in deg.
Definition at line 247 of file ossimGrect.h.
References ossimGpt::lond(), theLrCorner, and theUlCorner.
Referenced by ossimGeographicAnnotationGrid::draw(), ossimRangeDomeTileSource::initialize(), and widthMeters().
ossim_float64 ossimGrect::widthMeters | ( | ) | const |
Returns the width of a rectangle in meters using the center lat for scaling EW direction.
Definition at line 292 of file ossimGrect.cpp.
References midPoint(), width(), and ossimDpt::x.
Referenced by ossimPointCloudImageHandler::getImageGeometry().
|
friend |
|
private |
Definition at line 169 of file ossimGrect.h.
Referenced by completely_within(), expandToInclude(), hasNans(), height(), isLonLatNan(), isNan(), ll(), lr(), makeNan(), operator<<(), ossimGrect(), pointWithin(), stretchToEvenBoundary(), ur(), and width().
|
private |
Definition at line 168 of file ossimGrect.h.
Referenced by completely_within(), computeEvenTiles(), expandToInclude(), hasNans(), height(), isLonLatNan(), isNan(), ll(), makeNan(), operator<<(), ossimGrect(), pointWithin(), stretchToEvenBoundary(), ul(), ur(), and width().