Skip to content
Permalink
Browse files

Dox updates

  • Loading branch information
nyalldawson committed Mar 12, 2020
1 parent ca56f2f commit 0d49009a8152a637f83ab6622cf554df01b8569f
@@ -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

@@ -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

@@ -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 )
@@ -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;
}

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

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

@@ -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.
@@ -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;
@@ -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.
};

/**
@@ -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 );
@@ -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 );
@@ -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 );

0 comments on commit 0d49009

Please sign in to comment.
You can’t perform that action at this time.