QGIS API Documentation 4.3.0-Master (389d690bb77)
Loading...
Searching...
No Matches
qgsstacextent.cpp
Go to the documentation of this file.
1/***************************************************************************
2 qgsstacextent.cpp
3 ---------------------
4 begin : August 2024
5 copyright : (C) 2024 by Stefanos Natsis
6 email : uclaros at gmail dot com
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#include "qgsstacextent.h"
17
19{
20 mSpatialExtent = extent;
21}
22
24{
25 setSpatialExtent( extent.toBox3d( 0, 0 ) );
26}
27
29{
30 mDetailedSpatialExtents.append( extent );
31}
32
37
39{
40 return mSpatialExtent;
41}
42
44{
45 mTemporalExtent = extent;
46}
47
49{
50 mDetailedTemporalExtents.append( extent );
51}
52
54{
55 return mTemporalExtent;
56}
57
59{
60 return mDetailedSpatialExtents;
61}
62
63QVector<QgsDateTimeRange> QgsStacExtent::detailedTemporalExtents() const
64{
65 return mDetailedTemporalExtents;
66}
67
69{
70 return !mDetailedSpatialExtents.isEmpty();
71}
72
74{
75 return !mDetailedTemporalExtents.isEmpty();
76}
A 3-dimensional box composed of x, y, z coordinates.
Definition qgsbox3d.h:45
A rectangle specified with double values.
QgsBox3D toBox3d(double zMin, double zMax) const
Converts the rectangle to a 3D box, with the specified zMin and zMax z values.
QVector< QgsDateTimeRange > detailedTemporalExtents() const
Returns all detailed temporal sub extents defined.
bool hasDetailedSpatialExtents() const
Returns true if there are detailed spatial sub extents defined.
void addDetailedSpatialExtent(QgsBox3D extent)
Adds a more detailed spatial extent.
bool hasDetailedTemporalExtents() const
Returns true if there are detailed temporal sub extents defined.
void addDetailedTemporalExtent(QgsDateTimeRange extent)
Adds a more detailed temporal extent.
QgsDateTimeRange temporalExtent() const
Returns the overall temporal extent.
QgsBox3D spatialExtent() const
Returns the overall spatial extent.
void setSpatialExtent(QgsBox3D extent)
Sets the overall spatial extent to extent.
void setTemporalExtent(QgsDateTimeRange extent)
Sets the overall temporal extent to extent.
QVector< QgsBox3D > detailedSpatialExtents() const
Returns all detailed spatial sub extents defined.
bool isEmpty() const
Returns true if the range is empty, ie the beginning equals (or exceeds) the end and either of the bo...
Definition qgsrange.h:451
QgsTemporalRange< QDateTime > QgsDateTimeRange
QgsRange which stores a range of date times.
Definition qgsrange.h:705