Add contour line label provider for raster layers - #2
Closed
Geojim wants to merge 6 commits into
Closed
Conversation
Introduces QgsRasterContourLabelProvider and QgsRasterLayerContourLabeling, enabling labels placed along contour lines generated on-the-fly from raster DEM data via GDAL's contour generation API. Key changes: - New QgsRasterContourLabelProvider generates contour geometries in map CRS and registers them as line features with the PAL labeling engine - New QgsRasterLayerContourLabeling configuration class with contour interval, index interval, downscale factor, and label-index-only settings - QgsRasterLayerLabelProvider changed from final to extensible (protected members, virtual generateLabels, override instead of final) - Factory dispatch in createFromElement handles "contour" type https://claude.ai/code/session_01TaS7A3X8CXBYqJzq2EMLak
Generate SIP bindings for QgsRasterLayerContourLabeling and update the base class ConvertToSubClassCode for the "contour" type. Add Python tests covering properties, clone, XML round-trip, scale visibility, and layer serialization. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds QgsRasterContourLabelSettingsWidget with controls for band,
contour interval, index interval, downscale, number format, and
index-only labeling. Integrates as a third option ("Label with
Contour Lines") in the raster layer Labels tab.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add %Include in core_auto.sip and create auto_additions file so the Python bindings compile and the prepare_sip pre-commit hook passes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Band, contour interval, index interval, and downscale are already configured in the Symbology tab via QgsRasterContourRenderer. The label provider now reads these values directly from the renderer at render time, keeping the two tabs in sync and avoiding confusing duplication. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduces QgsRasterContourLabelProvider and QgsRasterLayerContourLabeling, enabling labels placed along contour lines generated on-the-fly from raster DEM data via GDAL's contour generation API.
Key changes:
https://claude.ai/code/session_01TaS7A3X8CXBYqJzq2EMLak
Description
[Replace this with some text explaining the rationale and details about this pull request]
AI tool usage