Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WMS-T layers temporal constrains support #34497

Merged
merged 16 commits into from
Mar 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions python/core/auto_generated/qgsdataprovider.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,13 @@ Set the data source specification.
Gets the data source specification.

.. versionadded:: 3.0
%End

virtual QgsDataProviderTemporalCapabilities *temporalCapabilities();
%Docstring
Returns data provider temporal capabilities. This may be ``None``, depending on the data provider.

.. versionadded:: 3.14
%End

virtual QgsRectangle extent() const = 0;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsdataprovidertemporalcapabilities.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/







class QgsDataProviderTemporalCapabilities : QgsTemporalProperty
{
%Docstring
Class for handling data providers temporal capabilities.

.. versionadded:: 3.14
%End

%TypeHeaderCode
#include "qgsdataprovidertemporalcapabilities.h"
%End
public:

QgsDataProviderTemporalCapabilities( bool enabled = false );
%Docstring
Constructor for QgsDataProviderTemporalCapabilities.
%End

virtual ~QgsDataProviderTemporalCapabilities();
};

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsdataprovidertemporalcapabilities.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsdataprovidertemporalcapabilities.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/







class QgsDataProviderTemporalCapabilities : QgsTemporalProperty
{
%Docstring
Class for handling data providers temporal capabilities.

.. versionadded:: 3.14
%End

%TypeHeaderCode
#include "qgsdataprovidertemporalcapabilities.h"
%End
public:

QgsDataProviderTemporalCapabilities( bool enabled = false );
%Docstring
Constructor for QgsDataProviderTemporalCapabilities.
%End

virtual ~QgsDataProviderTemporalCapabilities();
};

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsdataprovidertemporalcapabilities.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
class QgsMapLayerTemporalProperties : QgsTemporalProperty
{
%Docstring
An abstract base class for handling map layer temporal properties.
Base class for storage of map layer temporal properties.

QgsMapLayerTemporalProperties expose user-configurable settings for controlling
how an individual QgsMapLayer behaves in a temporal context, e.g. while animating a map object.

.. versionadded:: 3.14
%End
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,11 @@ Returns a list of user no data value ranges.
%Docstring
Returns the sublayers of this layer - useful for providers that manage
their own layers, such as WMS
%End

virtual QgsRasterDataProviderTemporalCapabilities *temporalCapabilities();
%Docstring
Returns temporal capabilities associated with the data provider.
%End

virtual bool supportsLegendGraphic() const;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/raster/qgsrasterdataprovidertemporalcapabilities.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/





class QgsRasterDataProviderTemporalCapabilities : QgsDataProviderTemporalCapabilities
{
%Docstring
Implementation of data provider temporal properties for QgsRasterDataProviders.

Data provider temporal capabilities reflect the temporal capabilities of a QgsDataProvider.
Unlike QgsMapLayerTemporalProperties, these settings are not user-configurable,
and should only be set by the QgsDataProvider itself.

.. versionadded:: 3.14
%End

%TypeHeaderCode
#include "qgsrasterdataprovidertemporalcapabilities.h"
%End
public:

QgsRasterDataProviderTemporalCapabilities( bool enabled = false );
%Docstring
Constructor for :py:class:`QgsRasterDataProviderTemporalProperties`.
%End

virtual ~QgsRasterDataProviderTemporalCapabilities();

void setFixedTemporalRange( const QgsDateTimeRange &dateTimeRange );
%Docstring
Sets the fixed datetime range for the temporal properties.

.. seealso:: :py:func:`fixedTemporalRange`
%End

const QgsDateTimeRange &fixedTemporalRange() const;
%Docstring
Returns the fixed datetime range for these temporal properties.

.. seealso:: :py:func:`setFixedTemporalRange`
%End

void setFixedReferenceTemporalRange( const QgsDateTimeRange &dateTimeRange );
%Docstring
Sets the fixed reference datetime range. This is to be used for
bi-temporal based data. Where data can have both nominal and reference times.

.. seealso:: :py:func:`fixedReferenceTemporalRange`
%End

const QgsDateTimeRange &fixedReferenceTemporalRange() const;
%Docstring
Returns the fixed reference datetime range.

.. seealso:: :py:func:`setFixedReferenceTemporalRange`
%End

void setRequestedTemporalRange( const QgsDateTimeRange &dateTimeRange );
%Docstring
Sets the requested temporal range to retrieve when
returning data from the associated data provider.

.. note::

this is not normally manually set, and is intended for use by
QgsRasterLayerRenderer to automatically set the requested temporal range
on a clone of the data provider during a render job.

.. seealso:: :py:func:`requestedTemporalRange`
%End

const QgsDateTimeRange &requestedTemporalRange() const;
%Docstring
Returns the requested temporal range.
Intended to be used by the provider in fetching data.

.. seealso:: :py:func:`setRequestedTemporalRange`
%End

void setRequestedReferenceTemporalRange( const QgsDateTimeRange &dateTimeRange );
%Docstring
Sets the requested reference temporal range to retrieve when
returning data from the associated data provider.

.. note::

this is not normally manually set, and is intended for use by
QgsRasterLayerRenderer to automatically set the requested temporal range
on a clone of the data provider during a render job.

.. seealso:: :py:func:`requestedReferenceTemporalRange`
%End

const QgsDateTimeRange &requestedReferenceTemporalRange() const;
%Docstring
Returns the requested reference temporal range.
Intended to be used by the provider in fetching data.

.. seealso:: :py:func:`setRequestedReferenceTemporalRange`
%End

void setEnableTime( bool enabled );
%Docstring
Sets the time enabled status.

.. seealso:: :py:func:`isTimeEnabled`
%End

bool isTimeEnabled() const;
%Docstring
Returns the temporal property status.

.. seealso:: :py:func:`setEnableTime`
%End

void setReferenceEnable( bool enabled );
%Docstring
Sets the usage status of the reference range.

.. seealso:: :py:func:`isReferenceEnable`
%End

bool isReferenceEnable() const;
%Docstring
Returns the enabled status of the reference range.

.. seealso:: :py:func:`setReferenceEnable`
%End

};

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/raster/qgsrasterdataprovidertemporalcapabilities.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ The ``enabled`` argument specifies whether the temporal properties are initially
{
ModeFixedTemporalRange,
ModeTemporalRangeFromDataProvider,
ModeTemporalRangesList
};

TemporalMode mode() const;
Expand Down Expand Up @@ -67,6 +66,11 @@ with which the range of the render context intersects the specified ``range``.
This setting is only effective when mode() is
QgsRasterLayerTemporalProperties.ModeFixedTemporalRange

.. note::

This setting is not set by user. Provider can set this, if it is coming from there.


.. seealso:: :py:func:`fixedTemporalRange`
%End

Expand All @@ -82,17 +86,76 @@ Returns the fixed temporal range for the layer.
.. seealso:: :py:func:`setFixedTemporalRange`
%End

void setWmstRelatedSettings( const QString &dimension );
void setFixedReferenceTemporalRange( const QgsDateTimeRange &range );
%Docstring
Sets the raster layer properties with WMS-T temporal settings.
Sets a fixed reference temporal ``range`` to apply to the whole layer. All bands from
the raster layer will be rendered whenever the current datetime range of
a render context intersects the specified ``range``.

For the case of WMS-T layers, this set up will cause new WMS layer to be fetched
with which the range of the render context intersects the specified ``range``.

.. warning::

This setting is only effective when mode() is
QgsRasterLayerTemporalProperties.ModeFixedTemporalRange

.. note::

:param dimension: contains text content indicating WMS layer available time value(s).
This setting is not set by user. Provider can set this, if it is coming from there.


.. seealso:: :py:func:`fixedReferenceTemporalRange`
%End

const QgsDateTimeRange &fixedReferenceTemporalRange() const;
%Docstring
Returns the fixed reference temporal range for the layer.

.. warning::

This is to be used to support WMS-T layers only. Applicable when
TemporalMode is QgsRasterLayerTemporalProperties.ModeFixedTemporalRange or
QgsRasterLayerTemporalProperties.ModeTemporalRangesList
To be used only when mode() is
QgsRasterLayerTemporalProperties.ModeFixedTemporalRange

.. seealso:: :py:func:`setFixedReferenceTemporalRange`
%End

void setTemporalRange( const QgsDateTimeRange &dateTimeRange );
%Docstring
Sets the current active datetime range for the temporal properties.

.. note::

This can be set by user, through raster layer properties widget.

.. seealso:: :py:func:`temporalRange`
%End

const QgsDateTimeRange &temporalRange() const;
%Docstring
Returns the current active datetime range for these temporal properties.

.. seealso:: :py:func:`setTemporalRange`
%End

void setReferenceTemporalRange( const QgsDateTimeRange &dateTimeRange );
%Docstring
Sets the current active reference datetime range for the temporal properties.

This will be used by bi-temporal data.

.. note::

This can be set by user, through raster layer properties widget.

.. seealso:: :py:func:`referenceTemporalRange`
%End

const QgsDateTimeRange &referenceTemporalRange() const;
%Docstring
Returns the current active reference datetime range for these temporal properties.

.. seealso:: :py:func:`setReferenceTemporalRange`
%End

virtual QDomElement writeXml( QDomElement &element, QDomDocument &doc, const QgsReadWriteContext &context );
Expand Down
2 changes: 2 additions & 0 deletions python/core/core_auto.sip
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
%Include auto_generated/qgsdataitemprovider.sip
%Include auto_generated/qgsdataitemproviderregistry.sip
%Include auto_generated/qgsdataprovider.sip
%Include auto_generated/qgsdataprovidertemporalcapabilities.sip
%Include auto_generated/qgsdatasourceuri.sip
%Include auto_generated/qgsdatetimestatisticalsummary.sip
%Include auto_generated/qgsdatumtransform.sip
Expand Down Expand Up @@ -447,6 +448,7 @@
%Include auto_generated/raster/qgsrasterblock.sip
%Include auto_generated/raster/qgsrasterchecker.sip
%Include auto_generated/raster/qgsrasterdataprovider.sip
%Include auto_generated/raster/qgsrasterdataprovidertemporalcapabilities.sip
%Include auto_generated/raster/qgsrasterdrawer.sip
%Include auto_generated/raster/qgsrasterfilewriter.sip
%Include auto_generated/raster/qgsrasterfilewritertask.sip
Expand Down
Loading