Overview
Split Lines By Points breaks each line feature at the projected position of nearby points. You can control how "nearby" a point must be (areal buffer), exclude points too close to the line (ring buffer), and filter splits that are too close together or too far apart (linear filter).
Download the example GeoPackage to try the tool immediately: 📦 SplitLines.gpkg
Interface
The plugin adds a ✂ toolbar button and a menu entry under Vector → Split Lines By Points. Clicking opens the dialog below.
Dialog in idle state — temporary layer selected (default).
File output mode — temporary layer unchecked; format, name and folder are enabled.
Dialog during processing — progress bar and live log active, Cancel button enabled.
Sections
| Section | Description |
|---|---|
| Input Layers | Select the line layer to split and the point layer used as split positions. Dropdowns are populated automatically with compatible layers from the project. |
| Buffer | Controls which points are considered split candidates (areal / ring buffer around each line). |
| Distance between split points | Optional linear filter: skip splits that are too close together or too far apart. |
| Output | Choose file format (GPKG, SHP, GeoJSON) or temporary memory layer, set a custom output name and folder, and optionally apply automatic styling. |
| Progress & Log | Live progress bar and colour-coded log. Processing runs in a background thread — QGIS stays responsive. |
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| Line layer required | Vector — Line | — | The layer whose features will be split. |
| Point layer required | Vector — Point | — | Points that define where the lines are split. |
| Max distance from line required | Double [map units] | 1.0 | Outer radius of the buffer around each line. Only points within this distance are considered. |
| Min distance from line optional | Double [map units] | 0.0 | Inner radius. Points closer than this value are excluded, creating a ring buffer. Leave at 0 to disable. |
| Min distance between splits optional | Double [map units] | 0.0 | Consecutive split points closer than this value along the line are skipped. |
| Max distance between splits optional | Double [map units] | 0 (unlimited) | Consecutive split points farther than this value are skipped. Set to 0 for no upper limit. |
Output & Style
Output type
| Option | Description |
|---|---|
| Temporary layer (default) | Created in memory — no file written. The layer is lost when QGIS is closed unless explicitly saved. Ideal for quick previews. |
| File output new | Uncheck "Create temporary layer" to enable file output. Choose format, name, and destination folder. |
File formats new
| Format | Extension | Notes |
|---|---|---|
| GeoPackage | .gpkg | Recommended — single file, supports all field types. |
| Shapefile | .shp | Wide compatibility; field names truncated to 10 chars. |
| GeoJSON | .geojson | Good for web use; coordinates in WGS84 recommended. |
Output name & folder new
Set a custom file name in "Output name" (leave blank to use <layer>_split).
The correct extension is added automatically — no need to type it.
Use the … button to browse for a destination folder;
if left blank the project folder is used (or the system temp folder if no project is open).
Attributes
All fields of the original line layer are copied to every output segment.
The reserved fid field is excluded automatically to avoid conflicts.
Categorized style by @id
When "Apply categorized style by @id" is checked (default on), the result layer is automatically styled with a distinct colour per feature id, using thick rounded lines.
Result layer loaded in QGIS with automatic categorized style by @id.
@id,
so it works on both file-based and memory layers with no extra field required.
Example — Simple buffer
Split lines using points within 20 m of the line (max buffer = 20, min buffer = 0).
Result — each line is broken at the projected position of every qualifying point:
Example — Ring buffer
Split lines using only points between 20 m and 30 m from the line (max buffer = 30, min buffer = 20). Points closer than 20 m are excluded.
Result — only the point just beyond 20 m is used as a split:
Example — Linear filter
Split lines with points within 30 m but requiring at least 10 m between consecutive splits (max buffer = 30, min split dist = 10).
Result — closely spaced candidate points are filtered out:
Notes & Tips
Thread safety
Since v1.4 all QGIS objects are accessed exclusively in the main thread. The background worker receives plain Python data (WKT strings + attribute lists) and never touches the QGIS API directly. This eliminates the "object lives in a different thread" warnings seen in earlier versions.
Performance
A QgsSpatialIndex is built on the point layer before processing.
Candidate-point lookup is O(log n), giving significant speedup on large datasets.
CRS compatibility
The tool does not reproject. Make sure both layers share the same CRS, otherwise distances will be computed incorrectly.
Pseudo-nodes
Floating-point arithmetic can leave split endpoints very slightly apart. If topological precision matters, post-process with Vector → Geometry Tools → Snap geometries to layer.
Large layers
For very large datasets (100 000+ features) consider splitting processing into tiles or using a projected CRS to keep map-unit distances meaningful.
Changelog
| Version | Changes |
|---|---|
| 1.7 | Multi-format output (GPKG, SHP, GeoJSON); custom output name and save folder; file writing via direct OGR — fixes GPKG fid conflict; default output is temporary layer. |
| 1.6 | Added 📖 Open Help link in dialog UI; updated help page with GUI screenshots. |
| 1.5 | Categorized style by @id applied automatically; thick rounded lines; optional checkbox. |
| 1.4 | Full thread-safety: QGIS objects read in main thread, worker uses WKT only. Eliminates thread warnings. |
| 1.3 | GUI edition: toolbar + dialog; temporary memory layer option; Qt5/Qt6 compatibility. |
| 1.2 | Bug fix: UnboundLocalError on lines with no nearby points; spatial index; full attribute preservation. |
| 1.1 | Initial public release as Processing provider plugin. |