50 [[nodiscard]]
double xMin()
const {
return m_xMin; }
51 [[nodiscard]]
double yMin()
const {
return m_yMin; }
52 [[nodiscard]]
double xMax()
const {
return m_xMax; }
53 [[nodiscard]]
double yMax()
const {
return m_yMax; }
55 [[nodiscard]]
double width()
const {
return m_xMax - m_xMin; }
56 [[nodiscard]]
double height()
const {
return m_yMax - m_yMin; }
57 [[nodiscard]]
double centerX()
const {
return (m_xMin + m_xMax) * 0.5; }
58 [[nodiscard]]
double centerY()
const {
return (m_yMin + m_yMax) * 0.5; }
63 [[nodiscard]]
bool isValid()
const;
68 [[nodiscard]]
bool isNull()
const;
75 [[nodiscard]] QRectF
toRectF()
const;
80 [[nodiscard]] QString
toString()
const;
129 [[nodiscard]]
bool contains(
double x,
double y)
const;
An axis-aligned bounding box in the coordinate space of a given CRS.
Definition mapextent.h:26
MapExtent intersected(const MapExtent &other) const
Returns the intersection of this extent and other. Returns a null extent if they do not overlap.
Definition mapextent.cpp:97
double xMin() const
Definition mapextent.h:50
double centerX() const
Definition mapextent.h:57
bool intersects(const MapExtent &other) const
Returns true when this extent intersects (overlaps) other.
Definition mapextent.cpp:127
double yMax() const
Definition mapextent.h:53
void setXMin(double v)
Definition mapextent.h:84
bool contains(double x, double y) const
Returns true when this extent contains the given point.
Definition mapextent.cpp:116
void setYMin(double v)
Definition mapextent.h:85
double width() const
Definition mapextent.h:55
double xMax() const
Definition mapextent.h:52
void growByFactor(double factor)
Grows the extent by factor on all sides (relative to centre).
Definition mapextent.cpp:75
bool isNull() const
Returns true when this extent is equal to a default-constructed one.
Definition mapextent.cpp:38
void setYMax(double v)
Definition mapextent.h:87
double centerY() const
Definition mapextent.h:58
MapExtent panned(double dx, double dy) const
Returns a new extent panned by the given delta values.
Definition mapextent.cpp:92
MapExtent united(const MapExtent &other) const
Returns an extent that exactly contains both this and other.
Definition mapextent.cpp:107
MapExtent scaled(double factor) const
Returns a new extent scaled by factor around the centre point.
Definition mapextent.cpp:85
double height() const
Definition mapextent.h:56
bool operator==(const MapExtent &other) const
Definition mapextent.cpp:133
void setXMax(double v)
Definition mapextent.h:86
bool operator!=(const MapExtent &other) const
Definition mapextent.cpp:139
bool isValid() const
Returns true when all coordinates are finite and xMin < xMax and yMin < yMax.
Definition mapextent.cpp:31
QRectF toRectF() const
Returns a QRectF(xMin, yMin, width, height) representation.
Definition mapextent.cpp:43
MapExtent()=default
Constructs a default (null) extent.
QString toString() const
Returns a human-readable "[xMin, yMin] — [xMax, yMax]" string.
Definition mapextent.cpp:48
void expandToInclude(double x, double y)
Expands this extent to include the point (x, y).
Definition mapextent.cpp:54
double yMin() const
Definition mapextent.h:51
Represents a coordinate reference system backed by a GDAL OGRSpatialReference.
Definition spatialreferencesystem.h:28
std::vector< float > dx
Definition mesh2dresultsexport.cpp:611
std::vector< float > dy
Green–Gauss only, parallel to cell
Definition mesh2dresultsexport.cpp:611
QVector< int > v
pool vertex indices
Definition pslgminsize.cpp:159