mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-06 00:07:29 -04:00
This commit adds a virtual method to QgsMapLayer to enable the creation of custom elevation profiles for any type of layer. The methods returns a pointer to a helper class of type QgsAbstractProfileSource which is a factory for profile generators (cf. documentation for QgsAbstractProfileSource). Existing layers that derive from QgsAbstractProfileSource just override this method returning a *this* pointer. As the method is *sipified* it can be used in python to declare custom profile source for classes derived from PluginLayer (ownership of the QgsAbstractProfileSource must then be managed on the python side).
19 lines
3.5 KiB
Python
19 lines
3.5 KiB
Python
# The following has been generated automatically from src/core/raster/qgsrasterlayer.h
|
|
try:
|
|
QgsRasterLayer.__attribute_docs__ = {'SAMPLE_SIZE': 'Default sample size (number of pixels) for estimated statistics/histogram calculation', 'SINGLE_BAND_ENHANCEMENT_ALGORITHM': 'Default enhancement algorithm for single band raster', 'MULTIPLE_BAND_SINGLE_BYTE_ENHANCEMENT_ALGORITHM': 'Default enhancement algorithm for multiple band raster of type Byte', 'MULTIPLE_BAND_MULTI_BYTE_ENHANCEMENT_ALGORITHM': 'Default enhancement algorithm for multiple band raster of type different from Byte', 'SINGLE_BAND_MIN_MAX_LIMITS': 'Default enhancement limits for single band raster', 'MULTIPLE_BAND_SINGLE_BYTE_MIN_MAX_LIMITS': 'Default enhancement limits for multiple band raster of type Byte', 'MULTIPLE_BAND_MULTI_BYTE_MIN_MAX_LIMITS': 'Default enhancement limits for multiple band raster of type different from Byte', 'subsetStringChanged': "Emitted when the layer's subset string has changed.\n\n.. versionadded:: 3.12\n"}
|
|
QgsRasterLayer.__annotations__ = {'SAMPLE_SIZE': float, 'SINGLE_BAND_ENHANCEMENT_ALGORITHM': 'QgsContrastEnhancement.ContrastEnhancementAlgorithm', 'MULTIPLE_BAND_SINGLE_BYTE_ENHANCEMENT_ALGORITHM': 'QgsContrastEnhancement.ContrastEnhancementAlgorithm', 'MULTIPLE_BAND_MULTI_BYTE_ENHANCEMENT_ALGORITHM': 'QgsContrastEnhancement.ContrastEnhancementAlgorithm', 'SINGLE_BAND_MIN_MAX_LIMITS': 'Qgis.RasterRangeLimit', 'MULTIPLE_BAND_SINGLE_BYTE_MIN_MAX_LIMITS': 'Qgis.RasterRangeLimit', 'MULTIPLE_BAND_MULTI_BYTE_MIN_MAX_LIMITS': 'Qgis.RasterRangeLimit'}
|
|
QgsRasterLayer.isValidRasterFileName = staticmethod(QgsRasterLayer.isValidRasterFileName)
|
|
QgsRasterLayer.lastModified = staticmethod(QgsRasterLayer.lastModified)
|
|
QgsRasterLayer.__virtual_methods__ = ['setOpacity', 'opacity', 'subsetString', 'setSubsetString']
|
|
QgsRasterLayer.__overridden_methods__ = ['clone', 'profileSource', 'createProfileGenerator', 'dataProvider', 'reload', 'createMapRenderer', 'isSpatial', 'htmlMetadata', 'properties', 'subLayers', 'setLayerOrder', 'setSubLayerVisibility', 'timestamp', 'accept', 'temporalProperties', 'elevationProperties', 'setTransformContext', 'readSymbology', 'readStyle', 'readXml', 'writeSymbology', 'writeStyle', 'writeXml', 'encodedSource', 'decodedSource']
|
|
QgsRasterLayer.__group__ = ['raster']
|
|
except (NameError, AttributeError):
|
|
pass
|
|
try:
|
|
QgsRasterLayer.LayerOptions.__attribute_docs__ = {'loadDefaultStyle': 'Sets to ``True`` if the default layer style should be loaded', 'transformContext': 'Coordinate transform context\n\n.. versionadded:: 3.8', 'skipCrsValidation': "Controls whether the layer is allowed to have an invalid/unknown CRS.\n\nIf ``True``, then no validation will be performed on the layer's CRS and the layer\nlayer's :py:func:`~QgsRasterLayer.crs` may be :py:func:`~QgsRasterLayer.invalid` (i.e. the layer will have no georeferencing available\nand will be treated as having purely numerical coordinates).\n\nIf ``False`` (the default), the layer's CRS will be validated using :py:func:`QgsCoordinateReferenceSystem.validate()`,\nwhich may cause a blocking, user-facing dialog asking users to manually select the correct CRS for the\nlayer.\n\n.. versionadded:: 3.10"}
|
|
QgsRasterLayer.LayerOptions.__annotations__ = {'loadDefaultStyle': bool, 'transformContext': 'QgsCoordinateTransformContext', 'skipCrsValidation': bool}
|
|
QgsRasterLayer.LayerOptions.__doc__ = """Setting options for loading raster layers."""
|
|
QgsRasterLayer.LayerOptions.__group__ = ['raster']
|
|
except (NameError, AttributeError):
|
|
pass
|