Skip to content

Commit

Permalink
Dox updates
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Mar 12, 2020
1 parent ca56f2f commit 0d49009
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 40 deletions.
Expand Up @@ -72,19 +72,11 @@ Sets a 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::

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


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

Expand All @@ -106,19 +98,11 @@ Sets a fixed reference temporal ``range`` to apply to the whole layer. All bands
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::

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


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

Expand Down
12 changes: 6 additions & 6 deletions src/core/raster/qgsrasterdataprovidertemporalcapabilities.cpp
Expand Up @@ -27,12 +27,12 @@ void QgsRasterDataProviderTemporalCapabilities::setAvailableTemporalRange( const
if ( !hasTemporalCapabilities() )
setHasTemporalCapabilities( true );

mFixedRange = dateTimeRange;
mAvailableTemporalRange = dateTimeRange;
}

const QgsDateTimeRange &QgsRasterDataProviderTemporalCapabilities::availableTemporalRange() const
{
return mFixedRange;
return mAvailableTemporalRange;
}

void QgsRasterDataProviderTemporalCapabilities::setEnableTime( bool enabled )
Expand All @@ -50,17 +50,17 @@ void QgsRasterDataProviderTemporalCapabilities::setAvailableReferenceTemporalRan
if ( !hasTemporalCapabilities() )
setHasTemporalCapabilities( true );

mFixedReferenceRange = dateTimeRange;
mAvailableReferenceRange = dateTimeRange;
}

const QgsDateTimeRange &QgsRasterDataProviderTemporalCapabilities::availableReferenceTemporalRange() const
{
return mFixedReferenceRange;
return mAvailableReferenceRange;
}

void QgsRasterDataProviderTemporalCapabilities::setRequestedTemporalRange( const QgsDateTimeRange &dateTimeRange )
{
if ( mFixedRange.contains( dateTimeRange ) )
if ( mAvailableTemporalRange.contains( dateTimeRange ) )
mRequestedRange = dateTimeRange;
}

Expand All @@ -71,7 +71,7 @@ const QgsDateTimeRange &QgsRasterDataProviderTemporalCapabilities::requestedTemp

void QgsRasterDataProviderTemporalCapabilities::setRequestedReferenceTemporalRange( const QgsDateTimeRange &dateTimeRange )
{
if ( mFixedReferenceRange.contains( dateTimeRange ) )
if ( mAvailableReferenceRange.contains( dateTimeRange ) )
mRequestedReferenceRange = dateTimeRange;
}

Expand Down
8 changes: 4 additions & 4 deletions src/core/raster/qgsrasterdataprovidertemporalcapabilities.h
Expand Up @@ -177,14 +177,14 @@ class CORE_EXPORT QgsRasterDataProviderTemporalCapabilities : public QgsDataProv
private:

/**
* Represents fixed data provider datetime range.
* Represents available data provider datetime range.
*
* This is for determining the providers lower and upper datetime bounds,
* any updates on the mRange should get out the range bound defined
* by this member.
*
*/
QgsDateTimeRange mFixedRange;
QgsDateTimeRange mAvailableTemporalRange;

/**
* If the stored time part in temporal ranges should be taked into account.
Expand All @@ -204,9 +204,9 @@ class CORE_EXPORT QgsRasterDataProviderTemporalCapabilities : public QgsDataProv
QgsDateTimeRange mRequestedReferenceRange;

/**
* Stores the fixed reference temporal range
* Stores the available reference temporal range
*/
QgsDateTimeRange mFixedReferenceRange;
QgsDateTimeRange mAvailableReferenceRange;

//! If reference range has been enabled to be used in these properties
bool mReferenceEnable = false;
Expand Down
12 changes: 1 addition & 11 deletions src/core/raster/qgsrasterlayertemporalproperties.h
Expand Up @@ -51,7 +51,7 @@ class CORE_EXPORT QgsRasterLayerTemporalProperties : public QgsMapLayerTemporalP
enum TemporalMode
{
ModeFixedTemporalRange = 0, //!< Mode when temporal properties have fixed start and end datetimes.
ModeTemporalRangeFromDataProvider = 1, //!< Mode when raster layer depends on temporal range from its dataprovider.
ModeTemporalRangeFromDataProvider = 1, //!< Mode when raster layer delegates temporal range handling to the dataprovider.
};

/**
Expand Down Expand Up @@ -89,14 +89,9 @@ class CORE_EXPORT QgsRasterLayerTemporalProperties : public QgsMapLayerTemporalP
* the raster layer will be rendered whenever the current datetime range of
* a render context intersects the specified \a 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 \a range.
*
* \warning 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.
*
* \see fixedTemporalRange()
*/
void setFixedTemporalRange( const QgsDateTimeRange &range );
Expand All @@ -116,14 +111,9 @@ class CORE_EXPORT QgsRasterLayerTemporalProperties : public QgsMapLayerTemporalP
* the raster layer will be rendered whenever the current datetime range of
* a render context intersects the specified \a 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 \a range.
*
* \warning 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.
*
* \see fixedReferenceTemporalRange()
*/
void setFixedReferenceTemporalRange( const QgsDateTimeRange &range );
Expand Down
3 changes: 0 additions & 3 deletions src/providers/wms/qgswmsprovider.cpp
Expand Up @@ -157,9 +157,6 @@ QgsWmsProvider::QgsWmsProvider( QString const &uri, const ProviderOptions &optio
Q_ASSERT_X( temporalCapabilities(), "QgsWmsProvider::QgsWmsProvider()", "Data provider temporal capabilities object does not exist" );
temporalCapabilities()->setHasTemporalCapabilities( true );
temporalCapabilities()->setAvailableTemporalRange( mSettings.mFixedRange );

temporalCapabilities()->setMode(
QgsRasterDataProviderTemporalCapabilities::ModeTemporalRangeFromDataProvider );
temporalCapabilities()->setIntervalHandlingMethod(
QgsRasterDataProviderTemporalCapabilities::MatchExactUsingStartOfRange );

Expand Down

0 comments on commit 0d49009

Please sign in to comment.