Isis Developer Reference
GridPolygonSeeder.h
Go to the documentation of this file.
1 #ifndef GridPolygonSeeder_h
2 #define GridPolygonSeeder_h
3 
8 /* SPDX-License-Identifier: CC0-1.0 */
9 
10 #include "geos/geom/Point.h"
11 #include "geos/geom/MultiPolygon.h"
12 
13 #include "PolygonSeeder.h"
14 
15 namespace Isis {
16  class Pvl;
17 
49  public:
50  GridPolygonSeeder(Pvl &pvl);
51 
53  virtual ~GridPolygonSeeder() {};
54 
55  std::vector<geos::geom::Point *> Seed(const geos::geom::MultiPolygon *mp);
56 
57  bool SubGrid() {
58  return p_subGrid;
59  }
60  virtual PvlGroup PluginParameters(QString grpName);
61 
62  protected:
63  virtual void Parse(Pvl &pvl);
64 
65  private:
66  std::vector<geos::geom::Point *> SeedGrid(const geos::geom::MultiPolygon *mp);
67 
68  std::vector<geos::geom::Point *> SeedSubGrid(const geos::geom::MultiPolygon *mp);
69 
70 
71  geos::geom::Point *CheckSubGrid(const geos::geom::MultiPolygon &, const double &,
72  const double &, const int &);
73 
74  double p_Xspacing;
75  double p_Yspacing;
76  bool p_subGrid;
77  };
78 };
79 
80 #endif
Isis::GridPolygonSeeder::Seed
std::vector< geos::geom::Point * > Seed(const geos::geom::MultiPolygon *mp)
Seed a polygon with points.
Definition: GridPolygonSeeder.cpp:52
Isis::GridPolygonSeeder::PluginParameters
virtual PvlGroup PluginParameters(QString grpName)
Plugin parameters.
Definition: GridPolygonSeeder.cpp:442
Isis::PvlObject::findGroup
PvlGroupIterator findGroup(const QString &name, PvlGroupIterator beg, PvlGroupIterator end)
Find a group with the specified name, within these indexes.
Definition: PvlObject.h:129
Isis::PvlKeyword
A single keyword-value pair.
Definition: PvlKeyword.h:82
PolygonSeeder.h
Isis::PvlContainer::addKeyword
void addKeyword(const PvlKeyword &keyword, const InsertMode mode=Append)
Add a keyword to the container.
Definition: PvlContainer.cpp:202
PvlGroup.h
GridPolygonSeederPlugin
Isis::PolygonSeeder * GridPolygonSeederPlugin(Isis::Pvl &pvl)
Create a GridPolygonSeeder object.
Definition: GridPolygonSeeder.cpp:476
Isis::PvlContainer::hasKeyword
bool hasKeyword(const QString &name) const
Check to see if a keyword exists.
Definition: PvlContainer.cpp:159
Isis::Pvl
Container for cube-like labels.
Definition: Pvl.h:119
Isis::globalFactory
static geos::geom::GeometryFactory::Ptr globalFactory
Definition: PolygonTools.h:51
Isis::PolygonSeeder::MinimumArea
double MinimumArea()
Return the minimum allowed area of the polygon.
Definition: PolygonSeeder.cpp:195
Isis::toString
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Definition: IString.cpp:211
IString.h
Isis::GridPolygonSeeder
Seed points using a grid.
Definition: GridPolygonSeeder.h:48
Isis::PvlObject::Traverse
@ Traverse
Search child objects.
Definition: PvlObject.h:158
Isis::PolygonSeeder::MinimumThickness
double MinimumThickness()
Return the minimum allowed thickness of the polygon.
Definition: PolygonSeeder.cpp:183
Isis::GridPolygonSeeder::~GridPolygonSeeder
virtual ~GridPolygonSeeder()
Destructor.
Definition: GridPolygonSeeder.h:53
Isis::IString::UpCase
IString UpCase()
Converst any lower case characters in the object IString with uppercase characters.
Definition: IString.cpp:617
Isis::PvlGroup
Contains multiple PvlContainers.
Definition: PvlGroup.h:41
Pvl.h
_FILEINFO_
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:24
Isis::GridPolygonSeeder::GridPolygonSeeder
GridPolygonSeeder(Pvl &pvl)
Construct a GridPolygonSeeder algorithm.
Definition: GridPolygonSeeder.cpp:29
Isis::PolygonSeeder::invalidInput
Pvl * invalidInput
The Pvl passed in by the constructor minus what was used.
Definition: PolygonSeeder.h:78
Isis::GridPolygonSeeder::SubGrid
bool SubGrid()
Definition: GridPolygonSeeder.h:57
Isis::PvlContainer::fileName
QString fileName() const
Returns the filename used to initialise the Pvl object.
Definition: PvlContainer.h:232
Isis::IException
Isis exception class.
Definition: IException.h:91
GridPolygonSeeder.h
Isis::PolygonSeeder::Parse
virtual void Parse(Pvl &pvl)
Initialize parameters in the PolygonSeeder class using a PVL specification.
Definition: PolygonSeeder.cpp:85
Isis::PvlContainer::deleteKeyword
void deleteKeyword(const QString &name)
Remove a specified keyword.
Definition: PvlContainer.cpp:97
IException.h
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
Isis::PolygonSeeder::StandardTests
QString StandardTests(const geos::geom::MultiPolygon *multiPoly, const geos::geom::Envelope *polyBoundBox)
Check the polygon to see if it meets standard criteria.
Definition: PolygonSeeder.cpp:146
Isis::IString
Adds specific functionality to C++ strings.
Definition: IString.h:165
PolygonTools.h
Isis::PolygonSeeder
This class is used as the base class for all PolygonSeeder objects.
Definition: PolygonSeeder.h:47
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::IException::User
@ User
A type of error that could only have occurred due to a mistake on the user's part (e....
Definition: IException.h:126
Isis::GridPolygonSeeder::Parse
virtual void Parse(Pvl &pvl)
Parse the GridPolygonSeeder spicific parameters from the PVL.
Definition: GridPolygonSeeder.cpp:381