Isis 3 Programmer Reference
Isis::PolygonSeeder Class Referenceabstract

This class is used as the base class for all PolygonSeeder objects. More...

#include <PolygonSeeder.h>

Inheritance diagram for Isis::PolygonSeeder:
Inheritance graph
Collaboration diagram for Isis::PolygonSeeder:
Collaboration graph

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 PolygonSeederoperator= (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

PvlinvalidInput
 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...
 

Detailed Description

This class is used as the base class for all PolygonSeeder objects.

The class is pure virtual.

Author
2006-01-20 Stuart Sides
History:
2008-08-18 Christopher Austin - Upgraded to geos3.0.0, removed Chip.h include, fixed ifndef
History:
2009-08-05 Travis Addair - Encapsulated group creation for seed definition group
History:
2009-04-15 Eric Hyer - Now stores invalid input. Added Copy constructor, destructor, and assignment operator
History:
2010-04-20 Christopher Austin - adapted for generic/unitless seeding
History:
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 47 of file PolygonSeeder.h.

Constructor & Destructor Documentation

◆ PolygonSeeder() [1/2]

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.

Parameters
pvlA pvl object containing a valid PolygonSeeder specification

Definition at line 30 of file PolygonSeeder.cpp.

References invalidInput, p_algorithmName, and Parse().

◆ PolygonSeeder() [2/2]

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.

Parameters
otherThe other PolygonSeeder object that will be copied.

Definition at line 49 of file PolygonSeeder.cpp.

References p_algorithmName, p_minimumArea, and p_minimumThickness.

◆ ~PolygonSeeder()

Isis::PolygonSeeder::~PolygonSeeder ( )
virtual

Destroys the PolygonSeeder object.

Definition at line 59 of file PolygonSeeder.cpp.

References invalidInput.

Member Function Documentation

◆ Algorithm()

QString Isis::PolygonSeeder::Algorithm ( ) const

The name of the algorithm, read from the Name Keyword in the PolygonSeeder Pvl passed into the constructor.

Returns
QString The value of the Name Keyword in the Pvl.

Definition at line 172 of file PolygonSeeder.cpp.

References p_algorithmName.

Referenced by Isis::GridPolygonSeeder::PluginParameters(), Isis::LimitPolygonSeeder::PluginParameters(), and Isis::StripPolygonSeeder::PluginParameters().

◆ InvalidInput()

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.

Returns
Pvl A copy of this pvl minus what was used.

Definition at line 231 of file PolygonSeeder.cpp.

References invalidInput.

◆ MinimumArea()

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.

Returns
double The value for the minimum area allowed.

Definition at line 195 of file PolygonSeeder.cpp.

References p_minimumArea.

Referenced by Isis::GridPolygonSeeder::PluginParameters(), Isis::LimitPolygonSeeder::PluginParameters(), Isis::StripPolygonSeeder::PluginParameters(), and StandardTests().

◆ MinimumThickness()

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

Returns
double The value for the minimum thickness allowed.

Definition at line 183 of file PolygonSeeder.cpp.

References p_minimumThickness.

Referenced by Isis::GridPolygonSeeder::PluginParameters(), Isis::LimitPolygonSeeder::PluginParameters(), Isis::StripPolygonSeeder::PluginParameters(), Isis::GridPolygonSeeder::SeedSubGrid(), and StandardTests().

◆ operator=()

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.

Parameters
otherThe other PolygonSeeder object whose values will be copied.
Returns
PolygonSeeder This PolygonSeeder object, once the other object's values have been copied.

Definition at line 246 of file PolygonSeeder.cpp.

References p_algorithmName, p_minimumArea, and p_minimumThickness.

◆ Parse()

void Isis::PolygonSeeder::Parse ( Pvl pvl)
protectedvirtual

Initialize parameters in the PolygonSeeder class using a PVL specification.

An example of the PVL required for this is:

Object = AutoSeed
Group = Algorithm
Name = Grid
Tolerance = 0.7
EndGroup
EndObject

There are many other options that can be set via the pvl and are described in other documentation (see below).

Parameters
pvlThe pvl object containing the specification

Reimplemented in Isis::StripPolygonSeeder, Isis::LimitPolygonSeeder, and Isis::GridPolygonSeeder.

Definition at line 85 of file PolygonSeeder.cpp.

References 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::GridPolygonSeeder::Parse(), Isis::LimitPolygonSeeder::Parse(), Isis::StripPolygonSeeder::Parse(), and PolygonSeeder().

◆ PluginParameters()

PvlGroup Isis::PolygonSeeder::PluginParameters ( QString  grpName)
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.

Parameters
grpNameA string containing the PvlGroup name.
Returns
PvlGroup The PvlGroup with the appropriate parameters added.

Reimplemented in Isis::StripPolygonSeeder, Isis::LimitPolygonSeeder, and Isis::GridPolygonSeeder.

Definition at line 210 of file PolygonSeeder.cpp.

References Isis::PvlContainer::addKeyword(), p_algorithmName, p_minimumArea, p_minimumThickness, and Isis::toString().

◆ Seed()

virtual std::vector<geos::geom::Point *> Isis::PolygonSeeder::Seed ( const geos::geom::MultiPolygon *  mp)
pure virtual

Pure virtual seed method.

Parameters
mpThe MultiPolygon object from the geos::geom library.
Returns
std::vector<geos::geom::Point*> A vector of Point objects from the geos::geom library.

Implemented in Isis::StripPolygonSeeder, Isis::LimitPolygonSeeder, and Isis::GridPolygonSeeder.

◆ StandardTests()

QString Isis::PolygonSeeder::StandardTests ( const geos::geom::MultiPolygon *  xymp,
const geos::geom::Envelope *  xyBoundBox 
)
protected

Check the polygon to see if it meets standard criteria.

Parameters
xympThe multipoly containing the coordinates in x/y units instead of lon/lat
xyBoundBoxThe bounding box of the multipoly
Returns
QString A string with an appropriate message to throw if a test was unsuccessful or an empty string if all tests passed.

Definition at line 146 of file PolygonSeeder.cpp.

References MinimumArea(), MinimumThickness(), and Isis::toString().

Referenced by Isis::LimitPolygonSeeder::Seed(), Isis::StripPolygonSeeder::Seed(), and Isis::GridPolygonSeeder::SeedSubGrid().

Member Data Documentation

◆ invalidInput

Pvl* Isis::PolygonSeeder::invalidInput
protected

The Pvl passed in by the constructor minus what was used.

Definition at line 78 of file PolygonSeeder.h.

Referenced by InvalidInput(), Isis::GridPolygonSeeder::Parse(), Isis::LimitPolygonSeeder::Parse(), Parse(), Isis::StripPolygonSeeder::Parse(), PolygonSeeder(), and ~PolygonSeeder().

◆ p_algorithmName

QString Isis::PolygonSeeder::p_algorithmName
private

The value for the 'Name' Keyword in the PolygonSeederAlgorithm group of the Pvl that is passed into the constructor.

Definition at line 82 of file PolygonSeeder.h.

Referenced by Algorithm(), operator=(), Parse(), PluginParameters(), and PolygonSeeder().

◆ p_minimumArea

double Isis::PolygonSeeder::p_minimumArea
private

The value for the 'MinimumArea' Keyword in the PolygonSeederAlgorithm group of the Pvl that is passed into the constructor.

Definition at line 89 of file PolygonSeeder.h.

Referenced by MinimumArea(), operator=(), Parse(), PluginParameters(), and PolygonSeeder().

◆ p_minimumThickness

double Isis::PolygonSeeder::p_minimumThickness
private

The value for the 'MinimumThickness' Keyword in the PolygonSeederAlgorithm group of the Pvl that is passed into the constructor.

Definition at line 85 of file PolygonSeeder.h.

Referenced by MinimumThickness(), operator=(), Parse(), PluginParameters(), and PolygonSeeder().


The documentation for this class was generated from the following files:
Isis::PolygonSeeder::Algorithm
QString Algorithm() const
The name of the algorithm, read from the Name Keyword in the PolygonSeeder Pvl passed into the constr...
Definition: PolygonSeeder.cpp:172