Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] Add "Linear Referencing" symbol layer type (Request in QGIS) #9231

Open
qgis-bot opened this issue Sep 4, 2024 · 0 comments
Open
Labels
3.40 Symbology Refers to layer symbol properties

Comments

@qgis-bot
Copy link
Collaborator

qgis-bot commented Sep 4, 2024

Request for documentation

From pull request qgis/QGIS#58484
Author: @nyalldawson
QGIS version: 3.40

[feature] Add "Linear Referencing" symbol layer type

PR Description:

This new symbol layer type allows placing text labels at regular intervals along a line (or at positions corresponding to existing vertices). Positions can be calculated using Cartesian distances, or interpolated from z/m values.

Functionality includes:

  • Labels can be placed using fixed cartesian 2d distances, at regular linearly interpolated spacing calculated using the Z or M values in geometries, or at existing vertices
  • Labels can show either the running total distance, or the linearly interpolated Z/M value
  • Uses text renderer to draw labels, so the full range of functionality is available for the labels (including buffers, shadows, etc)
  • Uses the QGIS numeric format classes to format numbers as strings, so users have full range of customisation options for eg decimal places
  • An optional "skip multiples of" setting. If set, then labels which are a multiple of this value will be skipped over. This allows construction of complex referencing labels, eg where a symbol has two linear referencing symbol layers, one set to label every 100m in a small font, skipping multiples of 1000, and a second set to label every 1000m in a big bold font
  • Labels are rendered using an angle calculated by averaging the linestring, so sharp tiny jaggies don't result in unslightly label rotation
  • Optionally, markers can be placed at referenced points in the line string, using a full QGIS marker symbol (this allows eg showing a cross-hatch at the labeled point, for a "ruler" style line)
  • Data defined control over the placement intervals, skip multiples setting, marker visibility and average angle calculation length

Notes:

  • When using the distance-based placement or labels, the distances are calculated using 2D only, Cartesian calculations based on the original layer CRS. This could potentially be extended in future to expose options for 3D Cartesian distances, or ellipsoidal distance calculations.

Sponsored by the Swiss QGIS User Group

image

Commits tagged with [need-docs] or [FEATURE]

"[feature] Add "Linear Referencing" symbol layer type\n\nThis new symbol layer type allows placing text labels at regular\nintervals along a line (or at positions corresponding to\nexisting vertices). Positions can be calculated using\nCartesian distances, or interpolated from z/m values.\n\nFunctionality includes:\n\n- Labels can be placed using fixed cartesian 2d distances,\nat regular linearly interpolated spacing calculated using\nthe Z or M values in geometries, or at existing vertices\n- Labels can show either the running total distance, or\nthe linearly interpolated Z/M value\n- Uses text rendered to draw labels, so the full range\nof functionality is available for the labels (including\nbuffers, shadows, etc)\n- Uses the QGIS numeric format classes to format numbers\nas strings, so users have full range of customisation\noptions for eg decimal places\n- An optional "skip multiples of" setting. If set, then\nlabels which are a multiple of this value will be skipped\nover. This allows construction of complex referencing labels,\neg where a symbol has two linear referencing symbol layers,\none set to label every 100m in a small font, skipping multiples\nof 1000, and a second set to label every 1000m in a big\nbold font\n- Labels are rendered using an angle calculated by averaging\nthe linestring, so sharp tiny jaggies don't result in\nunslightly label rotation\n- Optionally, markers can be placed at referenced points\nin the line string, using a full QGIS marker symbol (this allows\neg showing a cross-hatch at the labeled point, for a "ruler"\nstyle line)\n- Data defined control over the placement intervals, skip\nmultiples setting, marker visibility and average angle\ncalculation length\n\nNotes:\n\n- When using the distance-based placement or labels, the\ndistances are calculated using 2D only, Cartesian calculations\nbased on the original layer CRS. This could potentially be\nextended in future to expose options for 3D Cartesian distances,\nor ellipsoidal distance calculations.\n\nSponsored by the Swiss QGIS User Group"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.40 Symbology Refers to layer symbol properties
Projects
None yet
Development

No branches or pull requests

3 participants