Go to the documentation of this file.
12 data_ = std::shared_ptr<OGRMultiPoint>(
13 static_cast<OGRMultiPoint*
>(
14 OGRGeometryFactory::createGeometry(wkbMultiPoint)),
15 [](OGRMultiPoint* f) {OGRGeometryFactory::destroyGeometry(f);});
35 if (i >= this->
size()) {
36 throw std::out_of_range(
43 if (i >= this->
size()) {
44 throw std::out_of_range(
51 if (i >= this->
size()) {
52 throw std::out_of_range(
59 if (i >= this->
size()) {
60 throw std::out_of_range(
76 OGRPoint* point = downCast<OGRPoint*>(
data_->getGeometryRef(i));
77 point->setX(p.
getX());
78 point->setY(p.
getY());
79 point->setZ(p.
getZ());
99 this->
data_->addGeometry(&p);
104 for (
auto&& p : *
this) {
112 throw std::invalid_argument(
113 "MultiPoint::getInAngle not defined for first point");
120 if (i >=
size() - 1) {
121 throw std::invalid_argument(
122 "MultiPoint::getOutAngle not defined for last point");
129 throw std::invalid_argument(
130 "MultiPoint::getPointAngle not defined when size() < 2");
134 }
else if (i ==
size() - 1) {
double getPointAngle(size_t i) const
void addPoints(const MultiPoint &ps)
Types used by fields2cover library.
static double getAngleAvg(double a, double b)
Get the angle that is between a and b in the shortest direction.
const Point getLastPoint() const
double getOutAngle(size_t i) const
void addPoint(const Point &p)
void getGeometry(size_t i, Point &point)
void addGeometry(const Point &p)
double getInAngle(size_t i) const
void setGeometry(size_t i, const Point &p)
void operator*=(double b)
const Point getFirstPoint() const
std::shared_ptr< OGRMultiPoint > data_
std::string to_string(double d, const int precision=6)
fields2cover
Author(s):
autogenerated on Fri Apr 25 2025 02:18:31