7#include "PolygonSeeder.h"
10#include "LeastSquares.h"
12#include "PolygonTools.h"
13#include "PolynomialBivariate.h"
14#include "LeastSquares.h"
16#include "ProjectionFactory.h"
91 errorSpot =
"Algorithm";
102 if(invalgo.hasKeyword(
"Name"))
103 invalgo.deleteKeyword(
"Name");
106 errorSpot =
"MinimumThickness";
108 if(algo.hasKeyword(
"MinimumThickness")) {
112 if(invalgo.hasKeyword(
"MinimumThickness"))
113 invalgo.deleteKeyword(
"MinimumThickness");
116 errorSpot =
"MinimumArea";
118 if(algo.hasKeyword(
"MinimumArea")) {
122 if(invalgo.hasKeyword(
"MinimumArea"))
123 invalgo.deleteKeyword(
"MinimumArea");
126 QString msg =
"Improper format for PolygonSeeder PVL [";
127 msg += pvl.fileName() +
"]. Location [" + errorSpot +
"]";
147 const geos::geom::Envelope *xyBoundBox) {
149 QString msg =
"Polygon did not meet the minimum area of [";
156 pow(std::max(xyBoundBox->getWidth(), xyBoundBox->getHeight()), 2.0);
158 QString msg =
"Polygon did not meet the minimum thickness ratio of [";
217 pluginInfo.addKeyword(name);
218 pluginInfo.addKeyword(minThickness);
219 pluginInfo.addKeyword(minArea);
@ User
A type of error that could only have occurred due to a mistake on the user's part (e....
This class is used as the base class for all PolygonSeeder objects.
Pvl InvalidInput()
This method returns a copy of the Pvl passed in by the constructor (from a def file probably) minus w...
virtual void Parse(Pvl &pvl)
Initialize parameters in the PolygonSeeder class using a PVL specification.
Pvl * invalidInput
The Pvl passed in by the constructor minus what was used.
QString StandardTests(const geos::geom::MultiPolygon *multiPoly, const geos::geom::Envelope *polyBoundBox)
Check the polygon to see if it meets standard criteria.
virtual PvlGroup PluginParameters(QString grpName)
Plugin parameters.
virtual ~PolygonSeeder()
Destroys the PolygonSeeder object.
double p_minimumThickness
The value for the 'MinimumThickness' Keyword in the PolygonSeederAlgorithm group of the Pvl that is p...
QString p_algorithmName
The value for the 'Name' Keyword in the PolygonSeederAlgorithm group of the Pvl that is passed into t...
PolygonSeeder(Pvl &pvl)
Create PolygonSeeder object.
double MinimumArea()
Return the minimum allowed area of the polygon.
double MinimumThickness()
Return the minimum allowed thickness of the polygon.
QString Algorithm() const
The name of the algorithm, read from the Name Keyword in the PolygonSeeder Pvl passed into the constr...
double p_minimumArea
The value for the 'MinimumArea' Keyword in the PolygonSeederAlgorithm group of the Pvl that is passed...
const PolygonSeeder & operator=(const PolygonSeeder &other)
Assignment operator.
Contains multiple PvlContainers.
Container for cube-like labels.
A single keyword-value pair.
@ Traverse
Search child objects.
PvlGroupIterator findGroup(const QString &name, PvlGroupIterator beg, PvlGroupIterator end)
Find a group with the specified name, within these indexes.
This is free and unencumbered software released into the public domain.
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.