70 std::vector<geos::geom::Point *> points;
73 const geos::geom::Envelope *polyBoundBox = multiPoly->getEnvelopeInternal();
86 geos::geom::Point *centroid = multiPoly->getCentroid();
87 double centerX = centroid->getX();
88 double centerY = centroid->getY();
91 int xStepsToCentroid = (int)((centerX - polyBoundBox->getMinX()) /
p_Xspacing + 0.5);
92 int yStepsToCentroid = (int)((centerY - polyBoundBox->getMinY()) /
p_Yspacing + 0.5);
93 double dRealMinX = centerX - (xStepsToCentroid *
p_Xspacing);
94 double dRealMinY = centerY - (yStepsToCentroid *
p_Yspacing);
98 for(
double y = dRealMinY; y <= polyBoundBox->getMaxY(); y +=
p_Yspacing) {
100 for(
double x = dRealMinX; x <= polyBoundBox->getMaxX(); x +=
p_Xspacing) {
101 geos::geom::Coordinate c(x + dDeltaXToReal, y + dDeltaYToReal);
102 geos::geom::Point *p = Isis::globalFactory.createPoint(c);
103 if(p->within(multiPoly)) {
104 points.push_back(Isis::globalFactory.createPoint(c));
107 geos::geom::Coordinate c2(x - dDeltaXToReal, y - dDeltaYToReal);
108 p = Isis::globalFactory.createPoint(c2);
109 if(p->within(multiPoly)) {
110 points.push_back(Isis::globalFactory.createPoint(c2));
144 QString msg =
"PVL for StripSeeder must contain [XSpacing] in [";
157 QString msg =
"PVL for StripSeeder must contain [YSpacing] in [";
163 QString msg =
"Improper format for PolygonSeeder PVL [" + pvl.
fileName() +
"]";