Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Setup framework for data provider's to provide information about
elevation related properties to their layers And use this to ensure that wms tiles with maptiler terrain or terrarium terrain interpretation are always included by default in elevation profile plots. Most specifically, this ensures that projects containing the out-of-the-box "Mapzen Global Terrain" layer will be automatically included in elevation plots.
- Loading branch information
1 parent
c5f9dc5
commit e036570
Showing
18 changed files
with
398 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
python/core/auto_generated/qgsdataproviderelevationproperties.sip.in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/qgsdataproviderelevationproperties.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
|
||
|
||
|
||
class QgsDataProviderElevationProperties | ||
{ | ||
%Docstring(signature="appended") | ||
Base class for handling elevation related properties for a data provider. | ||
|
||
.. versionadded:: 3.32 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgsdataproviderelevationproperties.h" | ||
%End | ||
%ConvertToSubClassCode | ||
if ( dynamic_cast<QgsRasterDataProviderElevationProperties *>( sipCpp ) ) | ||
{ | ||
sipType = sipType_QgsRasterDataProviderElevationProperties; | ||
} | ||
else | ||
{ | ||
sipType = 0; | ||
} | ||
%End | ||
public: | ||
|
||
QgsDataProviderElevationProperties(); | ||
%Docstring | ||
Constructor for QgsDataProviderElevationProperties. | ||
%End | ||
|
||
virtual ~QgsDataProviderElevationProperties(); | ||
}; | ||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/qgsdataproviderelevationproperties.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
python/core/auto_generated/raster/qgsrasterdataproviderelevationproperties.sip.in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/raster/qgsrasterdataproviderelevationproperties.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
|
||
|
||
|
||
class QgsRasterDataProviderElevationProperties : QgsDataProviderElevationProperties | ||
{ | ||
%Docstring(signature="appended") | ||
Handles elevation related properties for a raster data provider. | ||
|
||
.. versionadded:: 3.32 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgsrasterdataproviderelevationproperties.h" | ||
%End | ||
public: | ||
|
||
QgsRasterDataProviderElevationProperties(); | ||
%Docstring | ||
Constructor for QgsRasterDataProviderElevationProperties. | ||
%End | ||
|
||
bool containsElevationData() const; | ||
%Docstring | ||
Returns ``True`` if the raster data provider definitely contains elevation related data. | ||
|
||
.. note:: | ||
|
||
Even if this method returns ``False``, the raster data may still relate to elevation values. ``True`` will only | ||
be returned in situations where elevation data is definitively present. | ||
|
||
.. seealso:: :py:func:`setContainsElevationData` | ||
%End | ||
|
||
void setContainsElevationData( bool contains ); | ||
%Docstring | ||
Sets whether the raster data provider definitely contains elevation related data. | ||
|
||
.. seealso:: :py:func:`containsElevationData` | ||
%End | ||
|
||
}; | ||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/raster/qgsrasterdataproviderelevationproperties.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/*************************************************************************** | ||
qgsdataproviderelevationproperties.h | ||
--------------- | ||
begin : May 2023 | ||
copyright : (C) 2023 by Nyall Dawson | ||
email : nyall dot dawson at gmail dot com | ||
***************************************************************************/ | ||
/*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
|
||
#include "qgsdataproviderelevationproperties.h" | ||
|
||
QgsDataProviderElevationProperties::QgsDataProviderElevationProperties() = default; | ||
|
||
QgsDataProviderElevationProperties::~QgsDataProviderElevationProperties() = default; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/*************************************************************************** | ||
qgsdataproviderelevationproperties.h | ||
--------------- | ||
begin : May 2023 | ||
copyright : (C) 2023 by Nyall Dawson | ||
email : nyall dot dawson at gmail dot com | ||
***************************************************************************/ | ||
|
||
/*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
|
||
|
||
#ifndef QGSDATAPROVIDERELEVATIONPROPERTIES_H | ||
#define QGSDATAPROVIDERELEVATIONPROPERTIES_H | ||
|
||
#include "qgis_core.h" | ||
#include "qgis_sip.h" | ||
|
||
/** | ||
* \class QgsDataProviderElevationProperties | ||
* \ingroup core | ||
* \brief Base class for handling elevation related properties for a data provider. | ||
* | ||
* \since QGIS 3.32 | ||
*/ | ||
class CORE_EXPORT QgsDataProviderElevationProperties | ||
{ | ||
|
||
#ifdef SIP_RUN | ||
SIP_CONVERT_TO_SUBCLASS_CODE | ||
if ( dynamic_cast<QgsRasterDataProviderElevationProperties *>( sipCpp ) ) | ||
{ | ||
sipType = sipType_QgsRasterDataProviderElevationProperties; | ||
} | ||
else | ||
{ | ||
sipType = 0; | ||
} | ||
SIP_END | ||
#endif | ||
|
||
public: | ||
|
||
/** | ||
* Constructor for QgsDataProviderElevationProperties. | ||
*/ | ||
QgsDataProviderElevationProperties(); | ||
|
||
virtual ~QgsDataProviderElevationProperties(); | ||
}; | ||
|
||
#endif // QGSDATAPROVIDERELEVATIONPROPERTIES_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.