Isis 3 Programmer Reference
|
Seed points using a grid. More...
#include <LimitPolygonSeeder.h>
Public Member Functions | |
LimitPolygonSeeder (Pvl &pvl) | |
Construct a LimitPolygonSeeder algorithm. More... | |
virtual | ~LimitPolygonSeeder () |
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 LimitPolygonSeeder 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 | |
Pvl * | invalidInput |
The Pvl passed in by the constructor minus what was used. More... | |
Private Member Functions | |
geos::geom::Geometry * | GetMultiPolygon (double dMinX, double dMinY, double dMaxX, double dMaxY, const geos::geom::MultiPolygon &orig) |
This method returns the overlap between the x/y range specified and the "orig" polygon. More... | |
Private Attributes | |
int | p_majorAxisPts |
Number of points to place on major axis. More... | |
int | p_minorAxisPts |
Number of points to place on minor axis. More... | |
Seed points using a grid.
This class seeds the polygons with Control Points by creating a grid centered on the polygon. For each grid square, if it contains any overlap, a box is then created within the grid square, surrounding the valid data. The point checked is the center of this box, and if this point is within the overlap polygon then this point is returned, otherwise the grid square does not have a point.
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
2008-12-23 Steven Lambright - Fixed problem with finding points in polygons that caused this algorithm to miss some.
2009-08-05 Travis Addair - Encapsulated group creation for seed definition group
2010-04-15 Eric Hyer - Now updates parent's invalidInput variable
2010-04-20 Christopher Austin - adapted for generic/unitless seeding
Definition at line 63 of file LimitPolygonSeeder.h.
Isis::LimitPolygonSeeder::LimitPolygonSeeder | ( | Pvl & | pvl | ) |
Construct a LimitPolygonSeeder algorithm.
pvl | A Pvl object that contains a valid polygon point seeding definition |
Definition at line 46 of file LimitPolygonSeeder.cpp.
References Parse().
|
inlinevirtual |
Destructor.
Definition at line 68 of file LimitPolygonSeeder.h.
|
inherited |
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 Isis::PolygonSeeder::p_algorithmName.
Referenced by PluginParameters(), Isis::GridPolygonSeeder::PluginParameters(), and Isis::StripPolygonSeeder::PluginParameters().
|
private |
This method returns the overlap between the x/y range specified and the "orig" polygon.
This is used to get polygons that represent the overlap polygons in individual grid squares.
dMinX | Left side of rectangle |
dMinY | Bottom side of rectangle |
dMaxX | Right side of rectangle |
dMaxY | Top side of the rectangle |
orig | Multiplygon to intersect the square with |
Definition at line 137 of file LimitPolygonSeeder.cpp.
Referenced by Seed().
|
inherited |
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 Isis::PolygonSeeder::invalidInput.
|
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.
Definition at line 189 of file PolygonSeeder.cpp.
References Isis::PolygonSeeder::p_minimumArea.
Referenced by PluginParameters(), Isis::StripPolygonSeeder::PluginParameters(), Isis::GridPolygonSeeder::PluginParameters(), and Isis::PolygonSeeder::StandardTests().
|
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
Definition at line 177 of file PolygonSeeder.cpp.
References Isis::PolygonSeeder::p_minimumThickness.
Referenced by PluginParameters(), Isis::StripPolygonSeeder::PluginParameters(), Isis::GridPolygonSeeder::PluginParameters(), Isis::GridPolygonSeeder::SeedSubGrid(), and Isis::PolygonSeeder::StandardTests().
|
protectedvirtual |
Parse the LimitPolygonSeeder spicific parameters from the PVL.
pvl | The PVL object containing the control parameters for this polygon seeder. |
Reimplemented from Isis::PolygonSeeder.
Definition at line 160 of file LimitPolygonSeeder.cpp.
References _FILEINFO_, Isis::PvlContainer::deleteKeyword(), Isis::PvlContainer::fileName(), Isis::PvlObject::findGroup(), Isis::PvlContainer::hasKeyword(), Isis::PolygonSeeder::invalidInput, p_majorAxisPts, p_minorAxisPts, Isis::PolygonSeeder::Parse(), Isis::PvlObject::Traverse, and Isis::IException::User.
Referenced by LimitPolygonSeeder().
|
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 from Isis::PolygonSeeder.
Definition at line 214 of file LimitPolygonSeeder.cpp.
References Isis::PvlContainer::addKeyword(), Isis::PolygonSeeder::Algorithm(), Isis::PolygonSeeder::MinimumArea(), Isis::PolygonSeeder::MinimumThickness(), p_majorAxisPts, p_minorAxisPts, and Isis::toString().
|
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"
lonLatPoly | geos::MultiPolygon The polygon to be seeded with points. |
Implements Isis::PolygonSeeder.
Definition at line 63 of file LimitPolygonSeeder.cpp.
References GetMultiPolygon(), p_majorAxisPts, p_minorAxisPts, and Isis::PolygonSeeder::StandardTests().
|
protectedinherited |
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 Isis::PolygonSeeder::MinimumArea(), Isis::PolygonSeeder::MinimumThickness(), and Isis::toString().
Referenced by Seed(), Isis::StripPolygonSeeder::Seed(), and Isis::GridPolygonSeeder::SeedSubGrid().
|
protectedinherited |
The Pvl passed in by the constructor minus what was used.
Definition at line 94 of file PolygonSeeder.h.
Referenced by Isis::PolygonSeeder::InvalidInput(), Parse(), Isis::StripPolygonSeeder::Parse(), Isis::GridPolygonSeeder::Parse(), Isis::PolygonSeeder::Parse(), Isis::PolygonSeeder::PolygonSeeder(), and Isis::PolygonSeeder::~PolygonSeeder().
|
private |
Number of points to place on major axis.
Definition at line 81 of file LimitPolygonSeeder.h.
Referenced by Parse(), PluginParameters(), and Seed().
|
private |
Number of points to place on minor axis.
Definition at line 82 of file LimitPolygonSeeder.h.
Referenced by Parse(), PluginParameters(), and Seed().