19 #ifndef GEOS_GEOM_ENVELOPE_H 20 #define GEOS_GEOM_ENVELOPE_H 64 typedef std::unique_ptr<Envelope>
Ptr;
79 Envelope(
double x1,
double x2,
double y1,
double y2);
157 void init(
double x1,
double x2,
double y1,
double y2);
181 void setToNull(
void);
189 bool isNull(
void)
const;
196 double getWidth(
void)
const;
203 double getHeight(
void)
const;
214 return getWidth() * getHeight();
221 double getMaxY()
const;
227 double getMaxX()
const;
233 double getMinY()
const;
239 double getMinX()
const;
267 void translate(
double transX,
double transY);
276 void expandBy(
double deltaX,
double deltaY);
288 expandBy(p_distance, p_distance);
310 void expandToInclude(
double x,
double y);
319 void expandToInclude(
const Envelope* other);
320 void expandToInclude(
const Envelope& other);
337 return covers(other);
343 return contains(*other);
356 return covers(p.
x, p.
y);
390 bool intersects(
double x,
double y)
const;
398 bool intersects(
const Envelope* other)
const;
400 bool intersects(
const Envelope& other)
const;
409 bool disjoint(
const Envelope* other)
const;
411 bool disjoint(
const Envelope& other)
const;
420 bool covers(
double x,
double y)
const;
436 bool covers(
const Envelope& other)
const;
441 return covers(*other);
451 bool equals(
const Envelope* other)
const;
458 std::string toString(
void)
const;
466 double distance(
const Envelope& env)
const;
474 double distanceSquared(
const Envelope& env)
const;
498 size_t hashCode()
const;
508 std::vector<std::string> split(
const std::string& str,
509 const std::string& delimiters =
" ");
511 static double distance(
double x0,
double y0,
double x1,
double y1);
533 # include "geos/geom/Envelope.inl" 536 #endif // ndef GEOS_GEOM_ENVELOPE_H bool contains(const Envelope &other) const
Tests if the Envelope other lies wholly inside this Envelope (inclusive of the boundary).
An Envelope defines a rectangulare region of the 2D coordinate plane.
Coordinate is the lightweight class used to store coordinates.
bool contains(const Envelope *other) const
double maxy
the maximum y-coordinate
bool contains(const Coordinate &p) const
Returns true if the given point lies in or on the envelope.
double getArea() const
Gets the area of this envelope.
bool contains(double x, double y) const
Returns true if the given point lies in or on the envelope.
bool covers(const Envelope *other) const
std::ostream & operator<<(std::ostream &os, const Coordinate &c)
Output function.
Basic namespace for all GEOS functionalities.
double minx
the minimum x-coordinate
std::unique_ptr< Envelope > Ptr
double miny
the minimum y-coordinate
bool operator==(const Coordinate &a, const Coordinate &b)
Equality operator for Coordinate. 2D only.
double maxx
the maximum x-coordinate
void expandBy(double p_distance)
Expands this envelope by a given distance in all directions.