Isis 3 Programmer Reference
Isis::StripPolygonSeeder Class Reference

Seed points using a grid with a staggered pattern. More...

#include <StripPolygonSeeder.h>

Inheritance diagram for Isis::StripPolygonSeeder:
Inheritance graph
Collaboration diagram for Isis::StripPolygonSeeder:
Collaboration graph

Public Member Functions

 StripPolygonSeeder (Pvl &pvl)
 Construct a StripPolygonSeeder algorithm. More...
 
virtual ~StripPolygonSeeder ()
 Destructor. More...
 
std::vector< geos::geom::Point * > Seed (const geos::geom::MultiPolygon *mp)
 Seed a polygon with points. More...
 
virtual PvlGroup PluginParameters (QString grpName)
 Plugin parameters. 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...
 
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...
 

Protected Member Functions

virtual void Parse (Pvl &pvl)
 Parse the StripSeeder spicific parameters from the PVL. 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

double p_Xspacing
 The spacing in the x direction between points. More...
 
double p_Yspacing
 The spacing in the y direction between points. More...
 

Detailed Description

Seed points using a grid with a staggered pattern.

This class seeds the polygon with Control Points by creating a grid, centered on the overlap polygon. In each grid square two points are checked to see if they are inside the overlap polygon. One of these points lies 1/6 of a grid square up and left from the grid's center point, while the other point lies 1/6 down and right. Each point found that is within the overlap polygon is returned as a point.

Author
2006-01-20 Stuart Sides
History:

2007-05-09 Tracie Sucharski, Changed a single spacing value to a separate value for x and y.

2008-02-29 Steven Lambright - Created SubGrid capabilities, cleaned up Seed methods

2008-04-17 Steven Lambright - Fixed naming conventions for seeders

2008-08-18 Christopher Austin - Upgraded to geos3.0.0

2008-11-12 Steven Lambright - Fixed documentation

2008-11-25 Steven Lambright - Added error checking

2009-02-01 Steven Lambright - Fixed problem with calculating starting position in the top left corner of the polygon

2009-08-05 Travis Addair - Encapsulated group creation for seed definition group

2010-04-15 Eric Hyer - Now updates parent's invalidInput variable (see PolygonSeeder)

2010-04-20 Christopher Austin - adapted for generic/unitless seeding

2010-05-05 Christopher Austin - Fixed major bug where the strip was not a strip.

Definition at line 67 of file StripPolygonSeeder.h.

Constructor & Destructor Documentation

◆ StripPolygonSeeder()

Isis::StripPolygonSeeder::StripPolygonSeeder ( Pvl pvl)

Construct a StripPolygonSeeder algorithm.

Parameters
pvlA Pvl object that contains a valid polygon point seeding definition

Definition at line 43 of file StripPolygonSeeder.cpp.

References Parse().

◆ ~StripPolygonSeeder()

virtual Isis::StripPolygonSeeder::~StripPolygonSeeder ( )
inlinevirtual

Destructor.

Definition at line 72 of file StripPolygonSeeder.h.

Member Function Documentation

◆ Algorithm()

QString Isis::PolygonSeeder::Algorithm ( ) const
inherited

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

References Isis::PolygonSeeder::p_algorithmName.

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

◆ InvalidInput()

Pvl Isis::PolygonSeeder::InvalidInput ( )
inherited

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

References Isis::PolygonSeeder::invalidInput.

◆ MinimumArea()

double Isis::PolygonSeeder::MinimumArea ( )
inherited

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

References Isis::PolygonSeeder::p_minimumArea.

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

◆ MinimumThickness()

double Isis::PolygonSeeder::MinimumThickness ( )
inherited

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

References Isis::PolygonSeeder::p_minimumThickness.

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

◆ Parse()

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

Parse the StripSeeder spicific parameters from the PVL.

Parameters
pvlThe PVL object containing the control parameters for this polygon seeder.

Reimplemented from Isis::PolygonSeeder.

Definition at line 124 of file StripPolygonSeeder.cpp.

References _FILEINFO_, Isis::PvlContainer::deleteKeyword(), Isis::PvlContainer::fileName(), Isis::PvlObject::findGroup(), Isis::PvlContainer::hasKeyword(), Isis::PolygonSeeder::invalidInput, p_Xspacing, p_Yspacing, Isis::PolygonSeeder::Parse(), Isis::PvlObject::Traverse, and Isis::IException::User.

Referenced by StripPolygonSeeder().

◆ PluginParameters()

PvlGroup Isis::StripPolygonSeeder::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 from Isis::PolygonSeeder.

Definition at line 177 of file StripPolygonSeeder.cpp.

References Isis::PvlContainer::addKeyword(), Isis::PolygonSeeder::Algorithm(), Isis::PolygonSeeder::MinimumArea(), Isis::PolygonSeeder::MinimumThickness(), p_Xspacing, p_Yspacing, and Isis::toString().

◆ Seed()

std::vector< geos::geom::Point * > Isis::StripPolygonSeeder::Seed ( const geos::geom::MultiPolygon *  multiPoly)
virtual

Seed a polygon with points.

Seed the supplied polygon with points in a staggered pattern. The spacing is determined by the PVL group "PolygonSeederAlgorithm"

Parameters
lonLatPolyThe polygon to be seeded with points.
Returns
A vector of points which have been seeded into the polygon. The caller assumes responsibility for deleteing these.
History:

2007-05-09 Tracie Sucharski Changed a single spacing value to a separate value for x and y.

2008-06-18 Steven Lambright Fixed documentation

Implements Isis::PolygonSeeder.

Definition at line 67 of file StripPolygonSeeder.cpp.

References p_Xspacing, p_Yspacing, and Isis::PolygonSeeder::StandardTests().

◆ StandardTests()

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

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

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

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

Member Data Documentation

◆ invalidInput

Pvl* Isis::PolygonSeeder::invalidInput
protectedinherited

◆ p_Xspacing

double Isis::StripPolygonSeeder::p_Xspacing
private

The spacing in the x direction between points.

Definition at line 82 of file StripPolygonSeeder.h.

Referenced by Parse(), PluginParameters(), and Seed().

◆ p_Yspacing

double Isis::StripPolygonSeeder::p_Yspacing
private

The spacing in the y direction between points.

Definition at line 83 of file StripPolygonSeeder.h.

Referenced by Parse(), PluginParameters(), and Seed().


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