20 #ifndef GEOS_GEOM_ENVELOPE_H
21 #define GEOS_GEOM_ENVELOPE_H
24 #include <geos/export.h>
25 #include <geos/inline.h>
26 #include <geos/geom/Coordinate.h>
58 typedef std::auto_ptr<Envelope> AutoPtr;
74 Envelope(
double x1,
double x2,
double y1,
double y2);
146 void init(
double x1,
double x2,
double y1,
double y2);
172 void setToNull(
void);
182 bool isNull(
void)
const;
189 double getWidth(
void)
const;
196 double getHeight(
void)
const;
204 double getArea()
const
206 return getWidth() * getHeight();
213 double getMaxY()
const;
219 double getMaxX()
const;
225 double getMinY()
const;
231 double getMinX()
const;
260 void translate(
double transX,
double transY);
271 void expandBy(
double deltaX,
double deltaY);
300 void expandToInclude(
double x,
double y);
309 void expandToInclude(
const Envelope* other);
325 return covers(other);
328 bool contains(
const Envelope* other)
const {
329 return contains(*other);
342 return covers(p.
x, p.
y);
381 bool intersects(
double x,
double y)
const;
392 bool intersects(
const Envelope* other)
const;
394 bool intersects(
const Envelope& other)
const;
406 bool covers(
double x,
double y)
const;
426 bool covers(
const Envelope& other)
const;
428 bool covers(
const Envelope* other)
const {
429 return covers(*other);
443 bool equals(
const Envelope* other)
const;
452 std::string toString(
void)
const;
461 double distance(
const Envelope* env)
const;
463 int hashCode()
const;
473 std::vector<std::string> split(
const std::string &str,
474 const std::string &delimiters =
" ");
476 static double distance(
double x0,
double y0,
double x1,
double y1);
492 GEOS_DLL
bool operator==(
const Envelope& a,
const Envelope& b);
498 # include "geos/geom/Envelope.inl"
501 #endif // ndef GEOS_GEOM_ENVELOPE_H