OSSIM - Open Source Software Image Map
Version 1.9.0 (20180803)
|
#include <ossimPolyArea2d.h>
Public Member Functions | |
ossimPolyArea2d () | |
ossimPolyArea2d (const vector< ossimGpt > &polygon) | |
ossimPolyArea2d (const vector< ossimDpt > &polygon) | |
ossimPolyArea2d (const ossimPolygon &shell, const vector< ossimPolygon > &holes) | |
ossimPolyArea2d (const ossimDpt &p1, const ossimDpt &p2, const ossimDpt &p3, const ossimDpt &p4) | |
ossimPolyArea2d (const ossimPolyArea2d &rhs) | |
ossimPolyArea2d (const ossimIrect &rect) | |
ossimPolyArea2d (const ossimDrect &rect) | |
ossimPolyArea2d (const ossimPolygon &polygon) | |
~ossimPolyArea2d () | |
void | clear () |
const ossimPolyArea2d & | operator= (const ossimPolyArea2d &rhs) |
const ossimPolyArea2d & | operator= (const ossimPolygon &rhs) |
const ossimPolyArea2d & | operator= (const ossimIrect &rect) |
const ossimPolyArea2d & | operator= (const ossimDrect &rect) |
const ossimPolyArea2d & | operator= (const vector< ossimGpt > &polygon) |
const ossimPolyArea2d & | operator= (const vector< ossimDpt > &polygon) |
const ossimPolyArea2d & | operator&= (const ossimPolyArea2d &rhs) |
ossimPolyArea2d | operator& (const ossimPolyArea2d &rhs) const |
ossimPolyArea2d | operator+ (const ossimPolyArea2d &rhs) const |
const ossimPolyArea2d & | operator+= (const ossimPolyArea2d &rhs) |
ossimPolyArea2d | operator- (const ossimPolyArea2d &rhs) const |
const ossimPolyArea2d & | operator-= (const ossimPolyArea2d &rhs) |
bool | intersects (const ossimPolyArea2d &rhs) const |
void | add (const ossimPolyArea2d &rhs) |
bool | getVisiblePolygons (vector< ossimPolygon > &polyList) const |
bool | getPolygonHoles (vector< ossimPolygon > &polyList) const |
bool | getCompletePolygons (vector< ossimPolyArea2d > &polyList) const |
Gets all of the polygons stored with their holes embedded. More... | |
bool | isEmpty () const |
bool | isValid (bool displayValidationError=false) const |
bool | isPointWithin (const ossimDpt &point) const |
bool | isPointWithin (double x, double y) const |
void | getBoundingRect (ossimDrect &rect) |
std::string | toString () const |
Returns the Well Known Text string. More... | |
ossimPolyArea2d | getBufferedShape (double distance=FLT_EPSILON) const |
Buffers the ossimPolyArea2d shape and returns a copy. More... | |
ossimPolyArea2d & | setToBufferedShape (double distance=FLT_EPSILON) |
ossimPolyArea2d & | toMultiPolygon () |
bool | saveState (ossimKeywordlist &kwl, const char *prefix=0) const |
bool | loadState (const ossimKeywordlist &kwl, const char *prefix=0) |
![]() | |
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 |
Protected Member Functions | |
void | clearPolygons () |
void | recurseVisibleGeometries (ossimPolygon::Vector &polyList, const geos::geom::Geometry *geom) const |
void | recurseHoles (ossimPolygon::Vector &polyList, const geos::geom::Geometry *geom) const |
void | recurseCompleteGeometries (std::vector< ossimPolyArea2d > &polyList, const geos::geom::Geometry *geom) const |
Recurses over the Geometry object to load all complete polygons (a shell and any internal holes) into the ossimPolyArea2d. More... | |
![]() | |
virtual | ~ossimReferenced () |
Protected Attributes | |
OssimPolyArea2dPrivate * | m_privateData |
Friends | |
class | OssimPolyArea2dPrivate |
OSSIM_DLL std::ostream & | operator<< (std::ostream &out, const ossimPolyArea2d &data) |
Definition at line 31 of file ossimPolyArea2d.h.
ossimPolyArea2d::ossimPolyArea2d | ( | ) |
Definition at line 303 of file ossimPolyArea2d.cpp.
Referenced by recurseCompleteGeometries().
ossimPolyArea2d::ossimPolyArea2d | ( | const vector< ossimGpt > & | polygon | ) |
Definition at line 308 of file ossimPolyArea2d.cpp.
ossimPolyArea2d::ossimPolyArea2d | ( | const vector< ossimDpt > & | polygon | ) |
Definition at line 314 of file ossimPolyArea2d.cpp.
ossimPolyArea2d::ossimPolyArea2d | ( | const ossimPolygon & | shell, |
const vector< ossimPolygon > & | holes | ||
) |
Definition at line 338 of file ossimPolyArea2d.cpp.
References m_privateData, and OssimPolyArea2dPrivate::setGeometry().
ossimPolyArea2d::ossimPolyArea2d | ( | const ossimDpt & | p1, |
const ossimDpt & | p2, | ||
const ossimDpt & | p3, | ||
const ossimDpt & | p4 | ||
) |
Definition at line 350 of file ossimPolyArea2d.cpp.
ossimPolyArea2d::ossimPolyArea2d | ( | const ossimPolyArea2d & | rhs | ) |
Definition at line 344 of file ossimPolyArea2d.cpp.
ossimPolyArea2d::ossimPolyArea2d | ( | const ossimIrect & | rect | ) |
Definition at line 320 of file ossimPolyArea2d.cpp.
ossimPolyArea2d::ossimPolyArea2d | ( | const ossimDrect & | rect | ) |
Definition at line 326 of file ossimPolyArea2d.cpp.
ossimPolyArea2d::ossimPolyArea2d | ( | const ossimPolygon & | polygon | ) |
Definition at line 332 of file ossimPolyArea2d.cpp.
ossimPolyArea2d::~ossimPolyArea2d | ( | ) |
Definition at line 361 of file ossimPolyArea2d.cpp.
References m_privateData.
void ossimPolyArea2d::add | ( | const ossimPolyArea2d & | rhs | ) |
Definition at line 584 of file ossimPolyArea2d.cpp.
References isEmpty(), OssimPolyArea2dPrivate::m_geometry, m_privateData, and OssimPolyArea2dPrivate::setGeometry().
Referenced by ossimImageGeometry::calculatePolyBounds(), ossimImageViewProjectionTransform::getViewSegments(), and ossimImageRenderer::initializeBoundingRects().
|
inline |
Definition at line 53 of file ossimPolyArea2d.h.
Referenced by ossimImageGeometry::calculatePolyBounds(), and ossimImageViewProjectionTransform::getViewSegments().
|
protected |
Definition at line 597 of file ossimPolyArea2d.cpp.
References OssimPolyArea2dPrivate::deleteGeometry(), and m_privateData.
Referenced by getBufferedShape(), loadState(), operator+(), operator+=(), operator-(), and operator-=().
void ossimPolyArea2d::getBoundingRect | ( | ossimDrect & | rect | ) |
Definition at line 706 of file ossimPolyArea2d.cpp.
References isEmpty(), OssimPolyArea2dPrivate::m_geometry, m_privateData, and ossimDrect::makeNan().
Referenced by ATP::AtpGenerator::initialize().
ossimPolyArea2d ossimPolyArea2d::getBufferedShape | ( | double | distance = FLT_EPSILON | ) | const |
Buffers the ossimPolyArea2d shape and returns a copy.
This method does not alter polygon.
distance | is the distance to buffer the shape by. Positive values will expand the shape, and negative values will shrink the shape. |
Definition at line 730 of file ossimPolyArea2d.cpp.
References clearPolygons(), distance(), OssimPolyArea2dPrivate::m_geometry, m_privateData, ossimNotify(), ossimNotifyLevel_DEBUG, and OssimPolyArea2dPrivate::setGeometry().
bool ossimPolyArea2d::getCompletePolygons | ( | vector< ossimPolyArea2d > & | polyList | ) | const |
Gets all of the polygons stored with their holes embedded.
This may be useful if an operation was performed on the original ossimPolyArea2d that caused multiple polygons to be created internally.
For example, if a rectangle is intersected with a U shape, the two top portions of the U would be their own separate polygon. It's also possible for these polygons to contain their own holes. This function will return the two top polygons as separate ossimPolyArea2d objects (with any of their holes embedded inside them).
........ ......... |
. . . . |
-.---—.--------—.----—.— . . . . . ............. . . . ............................
polylist | an empty vector of ossimPolyArea2d that will be filled |
Definition at line 631 of file ossimPolyArea2d.cpp.
References OssimPolyArea2dPrivate::m_geometry, m_privateData, and recurseCompleteGeometries().
bool ossimPolyArea2d::getPolygonHoles | ( | vector< ossimPolygon > & | polyList | ) | const |
Definition at line 618 of file ossimPolyArea2d.cpp.
References OssimPolyArea2dPrivate::m_geometry, m_privateData, and recurseHoles().
bool ossimPolyArea2d::getVisiblePolygons | ( | vector< ossimPolygon > & | polyList | ) | const |
Definition at line 605 of file ossimPolyArea2d.cpp.
References OssimPolyArea2dPrivate::m_geometry, m_privateData, and recurseVisibleGeometries().
Referenced by ossimPolygon::clipToRect(), ossimImageDataHelper::copyInputToThis(), ossimImageDataHelper::fill(), and ATP::AtpGenerator::initialize().
bool ossimPolyArea2d::intersects | ( | const ossimPolyArea2d & | rhs | ) | const |
Definition at line 417 of file ossimPolyArea2d.cpp.
References OssimPolyArea2dPrivate::m_geometry, and m_privateData.
Referenced by ossimImageRenderer::recursiveResample().
bool ossimPolyArea2d::isEmpty | ( | ) | const |
Definition at line 642 of file ossimPolyArea2d.cpp.
References OssimPolyArea2dPrivate::m_geometry, and m_privateData.
Referenced by add(), getBoundingRect(), isPointWithin(), and saveState().
bool ossimPolyArea2d::isPointWithin | ( | const ossimDpt & | point | ) | const |
Definition at line 684 of file ossimPolyArea2d.cpp.
References ossimDpt::x, and ossimDpt::y.
bool ossimPolyArea2d::isPointWithin | ( | double | x, |
double | y | ||
) | const |
Definition at line 689 of file ossimPolyArea2d.cpp.
References OssimPolyArea2dPrivate::geomFactory(), isEmpty(), OssimPolyArea2dPrivate::m_geometry, m_privateData, x, and y.
bool ossimPolyArea2d::isValid | ( | bool | displayValidationError = false | ) | const |
Definition at line 653 of file ossimPolyArea2d.cpp.
References OssimPolyArea2dPrivate::m_geometry, m_privateData, ossimNotify(), and ossimNotifyLevel_INFO.
Referenced by ossimImageGeometry::calculatePolyBounds().
bool ossimPolyArea2d::loadState | ( | const ossimKeywordlist & | kwl, |
const char * | prefix = 0 |
||
) |
Definition at line 833 of file ossimPolyArea2d.cpp.
References ossimString::c_str(), clearPolygons(), ossimString::empty(), ossimKeywordlist::find(), OssimPolyArea2dPrivate::geomFactory(), m_privateData, ossimNotify(), ossimNotifyLevel_DEBUG, and OssimPolyArea2dPrivate::setGeometry().
ossimPolyArea2d ossimPolyArea2d::operator & | ( | const ossimPolyArea2d & | rhs | ) | const |
const ossimPolyArea2d& ossimPolyArea2d::operator &= | ( | const ossimPolyArea2d & | rhs | ) |
ossimPolyArea2d ossimPolyArea2d::operator+ | ( | const ossimPolyArea2d & | rhs | ) | const |
Definition at line 456 of file ossimPolyArea2d.cpp.
References clearPolygons(), OssimPolyArea2dPrivate::m_geometry, m_privateData, ossimNotify(), ossimNotifyLevel_DEBUG, and OssimPolyArea2dPrivate::setGeometry().
const ossimPolyArea2d & ossimPolyArea2d::operator+= | ( | const ossimPolyArea2d & | rhs | ) |
Definition at line 534 of file ossimPolyArea2d.cpp.
References clearPolygons(), OssimPolyArea2dPrivate::m_geometry, m_privateData, ossimNotify(), ossimNotifyLevel_DEBUG, and OssimPolyArea2dPrivate::setGeometry().
ossimPolyArea2d ossimPolyArea2d::operator- | ( | const ossimPolyArea2d & | rhs | ) | const |
Definition at line 482 of file ossimPolyArea2d.cpp.
References clearPolygons(), OssimPolyArea2dPrivate::m_geometry, m_privateData, ossimNotify(), ossimNotifyLevel_DEBUG, and OssimPolyArea2dPrivate::setGeometry().
const ossimPolyArea2d & ossimPolyArea2d::operator-= | ( | const ossimPolyArea2d & | rhs | ) |
Definition at line 559 of file ossimPolyArea2d.cpp.
References clearPolygons(), OssimPolyArea2dPrivate::m_geometry, m_privateData, ossimNotify(), ossimNotifyLevel_DEBUG, and OssimPolyArea2dPrivate::setGeometry().
const ossimPolyArea2d & ossimPolyArea2d::operator= | ( | const ossimPolyArea2d & | rhs | ) |
Definition at line 370 of file ossimPolyArea2d.cpp.
References OssimPolyArea2dPrivate::m_geometry, m_privateData, and OssimPolyArea2dPrivate::setGeometry().
const ossimPolyArea2d & ossimPolyArea2d::operator= | ( | const ossimPolygon & | rhs | ) |
Definition at line 382 of file ossimPolyArea2d.cpp.
References m_privateData, and OssimPolyArea2dPrivate::setGeometry().
const ossimPolyArea2d & ossimPolyArea2d::operator= | ( | const ossimIrect & | rect | ) |
Definition at line 389 of file ossimPolyArea2d.cpp.
const ossimPolyArea2d & ossimPolyArea2d::operator= | ( | const ossimDrect & | rect | ) |
Definition at line 394 of file ossimPolyArea2d.cpp.
const ossimPolyArea2d & ossimPolyArea2d::operator= | ( | const vector< ossimGpt > & | polygon | ) |
const ossimPolyArea2d & ossimPolyArea2d::operator= | ( | const vector< ossimDpt > & | polygon | ) |
Definition at line 412 of file ossimPolyArea2d.cpp.
|
protected |
Recurses over the Geometry object to load all complete polygons (a shell and any internal holes) into the ossimPolyArea2d.
Definition at line 240 of file ossimPolyArea2d.cpp.
References ossimPolygon::addPoint(), and ossimPolyArea2d().
Referenced by getCompletePolygons().
|
protected |
Definition at line 195 of file ossimPolyArea2d.cpp.
Referenced by getPolygonHoles().
|
protected |
Definition at line 158 of file ossimPolyArea2d.cpp.
Referenced by getVisiblePolygons().
bool ossimPolyArea2d::saveState | ( | ossimKeywordlist & | kwl, |
const char * | prefix = 0 |
||
) | const |
Definition at line 808 of file ossimPolyArea2d.cpp.
References ossimKeywordlist::add(), isEmpty(), OssimPolyArea2dPrivate::m_geometry, m_privateData, and ossimKeywordNames::TYPE_KW.
ossimPolyArea2d & ossimPolyArea2d::setToBufferedShape | ( | double | distance = FLT_EPSILON | ) |
Definition at line 746 of file ossimPolyArea2d.cpp.
References distance(), OssimPolyArea2dPrivate::m_geometry, m_privateData, ossimNotify(), ossimNotifyLevel_DEBUG, and OssimPolyArea2dPrivate::setGeometry().
Referenced by ossimImageGeometry::calculatePolyBounds().
ossimPolyArea2d & ossimPolyArea2d::toMultiPolygon | ( | ) |
Definition at line 761 of file ossimPolyArea2d.cpp.
References OssimPolyArea2dPrivate::m_geometry, m_privateData, ossimNotify(), ossimNotifyLevel_WARN, and OssimPolyArea2dPrivate::setGeometry().
std::string ossimPolyArea2d::toString | ( | ) | const |
Returns the Well Known Text string.
Definition at line 718 of file ossimPolyArea2d.cpp.
References OssimPolyArea2dPrivate::m_geometry, and m_privateData.
|
friend |
Definition at line 294 of file ossimPolyArea2d.cpp.
|
friend |
Definition at line 34 of file ossimPolyArea2d.h.
|
protected |
Definition at line 149 of file ossimPolyArea2d.h.
Referenced by add(), clearPolygons(), getBoundingRect(), getBufferedShape(), getCompletePolygons(), getPolygonHoles(), getVisiblePolygons(), intersects(), isEmpty(), isPointWithin(), isValid(), loadState(), operator+(), operator+=(), operator-(), operator-=(), operator<<(), operator=(), ossimPolyArea2d(), saveState(), setToBufferedShape(), toMultiPolygon(), toString(), and ~ossimPolyArea2d().