![]() |
Isis 3 Programmer Reference
|
This class is used as the base class for all PolygonSeeder objects. More...
#include <PolygonSeeder.h>
Public Member Functions | |
PolygonSeeder (Pvl &pvl) | |
Create PolygonSeeder object. More... | |
PolygonSeeder (const PolygonSeeder &other) | |
Copy constructor. More... | |
virtual | ~PolygonSeeder () |
Destroys the PolygonSeeder object. More... | |
virtual std::vector< geos::geom::Point * > | Seed (const geos::geom::MultiPolygon *mp)=0 |
Pure virtual seed method. More... | |
double | MinimumThickness () |
Return the minimum allowed thickness of the polygon. More... | |
double | MinimumArea () |
Return the minimum allowed area of the polygon. More... | |
QString | Algorithm () const |
The name of the algorithm, read from the Name Keyword in the PolygonSeeder Pvl passed into the constructor. More... | |
virtual PvlGroup | PluginParameters (QString grpName) |
Plugin parameters. More... | |
Pvl | InvalidInput () |
This method returns a copy of the Pvl passed in by the constructor (from a def file probably) minus what was used. More... | |
const PolygonSeeder & | operator= (const PolygonSeeder &other) |
Assignment operator. More... | |
Protected Member Functions | |
virtual void | Parse (Pvl &pvl) |
Initialize parameters in the PolygonSeeder class using a PVL specification. More... | |
QString | StandardTests (const geos::geom::MultiPolygon *multiPoly, const geos::geom::Envelope *polyBoundBox) |
Check the polygon to see if it meets standard criteria. More... | |
Protected Attributes | |
Pvl * | invalidInput |
The Pvl passed in by the constructor minus what was used. More... | |
Private Attributes | |
QString | p_algorithmName |
The value for the 'Name' Keyword in the PolygonSeederAlgorithm group of the Pvl that is passed into the constructor. More... | |
double | p_minimumThickness |
The value for the 'MinimumThickness' Keyword in the PolygonSeederAlgorithm group of the Pvl that is passed into the constructor. More... | |
double | p_minimumArea |
The value for the 'MinimumArea' Keyword in the PolygonSeederAlgorithm group of the Pvl that is passed into the constructor. More... | |
This class is used as the base class for all PolygonSeeder objects.
The class is pure virtual.
2008-08-18 Christopher Austin - Upgraded to geos3.0.0, removed Chip.h include, fixed ifndef
2009-08-05 Travis Addair - Encapsulated group creation for seed definition group
2009-04-15 Eric Hyer - Now stores invalid input. Added Copy constructor, destructor, and assignment operator
2010-04-20 Christopher Austin - adapted for generic/unitless seeding
2012-04-17 Jeannie Backer - Added forward declaration for PvlObject and ordered includes in the implementation file. Added documentation. Moved Algorithm method from header file to implementation file.
Definition at line 63 of file PolygonSeeder.h.
Isis::PolygonSeeder::PolygonSeeder | ( | Pvl & | pvl | ) |
Create PolygonSeeder object.
Because this is a pure virtual class you can not create an PolygonSeeder class directly. Instead, see the PolygonSeederFactory class.
pvl | A pvl object containing a valid PolygonSeeder specification |
Definition at line 24 of file PolygonSeeder.cpp.
References invalidInput, p_algorithmName, and Parse().
Isis::PolygonSeeder::PolygonSeeder | ( | const PolygonSeeder & | other | ) |
Copy constructor.
Create PolygonSeeder object by copying the algorithm name, the minimum thickness, and the minimum area of an existing PolygonSeeder object.
other | The other PolygonSeeder object that will be copied. |
Definition at line 43 of file PolygonSeeder.cpp.
References p_algorithmName, p_minimumArea, and p_minimumThickness.
|
virtual |
Destroys the PolygonSeeder object.
Definition at line 53 of file PolygonSeeder.cpp.
References invalidInput.
QString Isis::PolygonSeeder::Algorithm | ( | ) | const |
The name of the algorithm, read from the Name Keyword in the PolygonSeeder Pvl passed into the constructor.
Definition at line 166 of file PolygonSeeder.cpp.
References p_algorithmName.
Referenced by Isis::LimitPolygonSeeder::PluginParameters(), Isis::StripPolygonSeeder::PluginParameters(), and Isis::GridPolygonSeeder::PluginParameters().
Pvl Isis::PolygonSeeder::InvalidInput | ( | ) |
This method returns a copy of the Pvl passed in by the constructor (from a def file probably) minus what was used.
Definition at line 225 of file PolygonSeeder.cpp.
References invalidInput.
double Isis::PolygonSeeder::MinimumArea | ( | ) |
Return the minimum allowed area of the polygon.
This value is set from the "MinimumArea" keyword in the PVL. The seeding algorithm will not seed polygons that have an area less than this.
Definition at line 189 of file PolygonSeeder.cpp.
References p_minimumArea.
Referenced by Isis::LimitPolygonSeeder::PluginParameters(), Isis::StripPolygonSeeder::PluginParameters(), Isis::GridPolygonSeeder::PluginParameters(), and StandardTests().
double Isis::PolygonSeeder::MinimumThickness | ( | ) |
Return the minimum allowed thickness of the polygon.
This value is set from the "MinimumThickness" keyword in the PVL. The seeding algorithm will not seed polygons that have a thickness ratio less than this
Definition at line 177 of file PolygonSeeder.cpp.
References p_minimumThickness.
Referenced by Isis::LimitPolygonSeeder::PluginParameters(), Isis::StripPolygonSeeder::PluginParameters(), Isis::GridPolygonSeeder::PluginParameters(), Isis::GridPolygonSeeder::SeedSubGrid(), and StandardTests().
const PolygonSeeder & Isis::PolygonSeeder::operator= | ( | const PolygonSeeder & | other | ) |
Assignment operator.
Sets this PolygonSeeder object equal to another by copying the algorithm name, the minimum thickness, and the minimum area of the other PolygonSeeder object.
other | The other PolygonSeeder object whose values will be copied. |
Definition at line 240 of file PolygonSeeder.cpp.
References p_algorithmName, p_minimumArea, and p_minimumThickness.
|
protectedvirtual |
Initialize parameters in the PolygonSeeder class using a PVL specification.
An example of the PVL required for this is:
There are many other options that can be set via the pvl and are described in other documentation (see below).
pvl | The pvl object containing the specification |
Reimplemented in Isis::GridPolygonSeeder, Isis::StripPolygonSeeder, and Isis::LimitPolygonSeeder.
Definition at line 79 of file PolygonSeeder.cpp.
References _FILEINFO_, Isis::PvlContainer::deleteKeyword(), Isis::PvlContainer::fileName(), Isis::PvlObject::findGroup(), Isis::PvlContainer::hasKeyword(), invalidInput, p_algorithmName, p_minimumArea, p_minimumThickness, Isis::PvlObject::Traverse, and Isis::IException::User.
Referenced by Isis::LimitPolygonSeeder::Parse(), Isis::StripPolygonSeeder::Parse(), Isis::GridPolygonSeeder::Parse(), and PolygonSeeder().
|
virtual |
Plugin parameters.
This method will add the PvlKeyword values for algorithm name, minimum thickness, and minimum area of this object to a PvlGroup with the name that is passed in.
grpName | A string containing the PvlGroup name. |
Reimplemented in Isis::GridPolygonSeeder, Isis::StripPolygonSeeder, and Isis::LimitPolygonSeeder.
Definition at line 204 of file PolygonSeeder.cpp.
References Isis::PvlContainer::addKeyword(), p_algorithmName, p_minimumArea, p_minimumThickness, and Isis::toString().
|
pure virtual |
Pure virtual seed method.
mp | The MultiPolygon object from the geos::geom library. |
Implemented in Isis::StripPolygonSeeder, Isis::GridPolygonSeeder, and Isis::LimitPolygonSeeder.
|
protected |
Check the polygon to see if it meets standard criteria.
xymp | The multipoly containing the coordinates in x/y units instead of lon/lat |
xyBoundBox | The bounding box of the multipoly |
Definition at line 140 of file PolygonSeeder.cpp.
References MinimumArea(), MinimumThickness(), and Isis::toString().
Referenced by Isis::LimitPolygonSeeder::Seed(), Isis::StripPolygonSeeder::Seed(), and Isis::GridPolygonSeeder::SeedSubGrid().
|
protected |
The Pvl passed in by the constructor minus what was used.
Definition at line 94 of file PolygonSeeder.h.
Referenced by InvalidInput(), Isis::LimitPolygonSeeder::Parse(), Isis::GridPolygonSeeder::Parse(), Isis::StripPolygonSeeder::Parse(), Parse(), PolygonSeeder(), and ~PolygonSeeder().
|
private |
The value for the 'Name' Keyword in the PolygonSeederAlgorithm group of the Pvl that is passed into the constructor.
Definition at line 98 of file PolygonSeeder.h.
Referenced by Algorithm(), operator=(), Parse(), PluginParameters(), and PolygonSeeder().
|
private |
The value for the 'MinimumArea' Keyword in the PolygonSeederAlgorithm group of the Pvl that is passed into the constructor.
Definition at line 105 of file PolygonSeeder.h.
Referenced by MinimumArea(), operator=(), Parse(), PluginParameters(), and PolygonSeeder().
|
private |
The value for the 'MinimumThickness' Keyword in the PolygonSeederAlgorithm group of the Pvl that is passed into the constructor.
Definition at line 101 of file PolygonSeeder.h.
Referenced by MinimumThickness(), operator=(), Parse(), PluginParameters(), and PolygonSeeder().
U.S. Department of the Interior | U.S. Geological Survey ISIS | Privacy & Disclaimers | Astrogeology Research Program To contact us, please post comments and questions on the USGS Astrogeology Discussion Board To report a bug, or suggest a feature go to: ISIS Github File Modified: 07/13/2023 00:09:06 |