Skip to content

QGIS: Mileage Plugin

Line interpolate equidistant points

Inputs

  1. Input layer
  2. Select identifier field
  3. Select start mileage field
  4. Select end mileage field
  5. Select interpolation distance field
  6. Output layer

Process

Ref: https://qgis.org/pyqgis/master/core/index.html

  1. Loop through line features, get Nth feature (geom + props)
  2. vLength = eM - sM = IN4 - IN3; vD = IN5;
  3. Generate list of fraction of total length (0-1);
  4. Interpolate point on line on $Length * fraction; Add line props to points, return and add to feature sink;
  5. Update Progress.

Add fields for interpolation config

Inputs

  1. Input layer(lists)
  2. Output layer

Process

Ref: https://qgis.org/pyqgis/master/core/index.html

  1. Loop through layers, get Nth layer (geom + props)
  2. Check if field exists, add if non-exist, log if field type don't match.
  3. (Optional?) Add length for reference.
  4. Update Progress.

Credit @Wayne19980