Skip to content

Add contour line label provider for raster layers - #3

Closed
Geojim wants to merge 1 commit into
masterfrom
raster-contour-labeling
Closed

Add contour line label provider for raster layers#3
Geojim wants to merge 1 commit into
masterfrom
raster-contour-labeling

Conversation

@Geojim

@Geojim Geojim commented Feb 28, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds on-the-fly contour line labels for raster DEM layers using GDAL's contour generation API
  • New QgsRasterContourLabelProvider generates contour geometries and registers them with the PAL labeling engine
  • New QgsRasterLayerContourLabeling configuration class with text format, numeric format, thinning, and scale-based visibility
  • Contour parameters (band, interval, index interval, downscale) are read from the Symbology renderer to avoid duplication
  • GUI widget integrates with the existing labeling framework (text formatting, placement, rendering tabs)

AI tool usage

  • AI tool(s) (Claude) supported development of this PR

🤖 Generated with Claude Code

Introduces on-the-fly contour line labels for raster DEM layers using
GDAL's contour generation API. Contour geometries are generated at
render time and registered with the PAL labeling engine for placement
along the lines.

New classes:
- QgsRasterContourLabelProvider: generates contour lines from raster
  data and registers them as label features
- QgsRasterLayerContourLabeling: configuration class with text format,
  numeric format, thinning, and scale-based visibility settings

The label provider reads band, contour interval, index interval, and
downscale factor from QgsRasterContourRenderer (Symbology tab) to
avoid settings duplication.

Sketched-With: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Geojim
Geojim force-pushed the raster-contour-labeling branch from c2f28c0 to a367201 Compare February 28, 2026 13:09
@Geojim Geojim closed this Feb 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant