USGS

Isis 3.0 Object Programmers' Reference

Home

Isis::PolygonSeeder Class Reference
[Pattern Matching]

#include <PolygonSeeder.h>

Inheritance diagram for Isis::PolygonSeeder:

Inheritance graph
[legend]
Collaboration diagram for Isis::PolygonSeeder:

Collaboration graph
[legend]
List of all members.

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

Definition at line 51 of file PolygonSeeder.h.

Public Member Functions

 PolygonSeeder (Pvl &pvl)
 Create PolygonSeeder object.
virtual ~PolygonSeeder ()
 Destroy PolygonSeeder object.
virtual std::vector< geos::geom::Point * > Seed (const geos::geom::MultiPolygon *mp, Projection *proj)=0
std::string Name ()
double MinimumThickness ()
 Return the minimum allowed thickness of the polygon.
double MinimumArea ()
 Return the minimum allowed area of the polygon.
std::string Algorithm () const
virtual PvlGroup PluginParameters (std::string grpName)

Protected Member Functions

virtual void Parse (Pvl &pvl)
 Initialize parameters in the PolygonSeeder class using a PVL specification.
std::string StandardTests (const geos::geom::MultiPolygon *xymp, const geos::geom::Envelope *xyBoundBox)
 Check the polygon to see if it meets standard criteria.

Private Attributes

std::string p_algorithmName
double p_minimumThickness
double p_minimumArea


Constructor & Destructor Documentation

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:
pvl A pvl object containing a valid PolygonSeeder specification
Todo:

Definition at line 23 of file PolygonSeeder.cpp.

References p_algorithmName, Parse(), and pvl().

Isis::PolygonSeeder::~PolygonSeeder (  )  [virtual]

Destroy PolygonSeeder object.

Definition at line 30 of file PolygonSeeder.cpp.


Member Function Documentation

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 134 of file PolygonSeeder.cpp.

References p_minimumArea.

Referenced by Isis::StripPolygonSeeder::PluginParameters(), Isis::LimitPolygonSeeder::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 124 of file PolygonSeeder.cpp.

References p_minimumThickness.

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

void Isis::PolygonSeeder::Parse ( Pvl pvl  )  [protected, virtual]

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:
pvl The pvl object containing the specification

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

Definition at line 51 of file PolygonSeeder.cpp.

References _FILEINFO_, e, Isis::PvlContainer::Filename(), Isis::PvlContainer::HasKeyword(), Isis::iException::Message(), p_algorithmName, p_minimumArea, p_minimumThickness, pvl(), and Isis::PvlObject::Traverse.

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

std::string 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:
xymp The multipoly containing the coordinates in x/y units instead of lon/lat
xyBoundBox The bounding box of the multipoly
Returns:
std::string A string with an appropriate message to throw if a test was unsuccessful or an empty string if all tests passed.

Definition at line 98 of file PolygonSeeder.cpp.

References MinimumArea(), and MinimumThickness().

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


The documentation for this class was generated from the following files: