> ## Documentation Index
> Fetch the complete documentation index at: https://avala.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Polyline Tool

> Draw open line segments for lanes, paths, boundaries, and other linear features

The Polyline tool draws open line segments for features like lanes, paths, curbs, and barriers. Unlike polygons, polylines remain open (they do not close into a shape).

## When to Use

Use polylines when:

* You need to annotate linear features that do not enclose an area
* The task involves lane detection, road boundary marking, or trajectory annotation
* Objects are inherently linear (curbs, fences, wires, cracks)
* You are working in both 2D images and 3D point clouds

Consider a different tool when:

* You need a closed shape around an object -- use the [Polygon](/docs/annotation/guides/tools/polygon) tool
* You need rectangular localization -- use the [Bounding Box](/docs/annotation/guides/tools/bounding-box) tool
* You need pixel-level masks -- use the [Segmentation](/docs/annotation/guides/tools/segmentation) tool

## Usage

1. Press `L` or select the **Polyline tool** from the toolbar
2. Click to place the first point
3. Continue clicking to add points along the line
4. Press `Enter` to finish the polyline (it remains open, unlike a polygon)
5. Assign a label

## Editing

* **Move a point**: Click and drag any point handle
* **Add a point**: Click on a segment midpoint
* **Delete a point**: Right-click a point and select **Delete Point**
* **Extend the line**: Select the endpoint and click to add more points

## Shortcuts

| Shortcut               | Action                     |
| ---------------------- | -------------------------- |
| `L`                    | Activate the Polyline tool |
| `Enter`                | Finish the polyline        |
| `Escape`               | Cancel current polyline    |
| `Delete` / `Backspace` | Delete selected polyline   |
| `Ctrl+Z` / `⌘Z`        | Undo                       |
| `Ctrl+Shift+Z` / `⌘⇧Z` | Redo                       |

## Use Cases

* **Lane markings**: Trace the center or edges of lane lines on roads
* **Road boundaries**: Mark curb edges and road shoulders
* **Fences and barriers**: Annotate linear barriers and guardrails
* **Trajectory paths**: Trace the path an object has traveled or will travel
* **Cracks and defects**: Mark linear defects in industrial inspection images

## Common Mistakes

* **Inconsistent point spacing**: Keep points evenly spaced for smoother lines
* **Too few points on curves**: Curved sections need more points to accurately represent the curvature
* **Not extending to image edges**: For lanes and boundaries, extend the polyline to the edge of the visible area
* **Confusing polyline with polygon**: If you need a closed shape, use the Polygon tool instead

## Advanced Tips

* Keep points consistent in spacing for smooth lines
* Use more points on curves, fewer on straight sections
* In video mode, polylines can be tracked across frames like any other annotation
* For 3D point cloud lanes, polylines are placed in the 3D space and projected onto camera views for verification

## Related Tools

* [Polygon](/docs/annotation/guides/tools/polygon) -- For closed shapes that outline objects
* [Bounding Box](/docs/annotation/guides/tools/bounding-box) -- For rectangular localization
* [3D Cuboid](/docs/annotation/guides/tools/cuboid-3d) -- For 3D object detection in point clouds
* [Segmentation](/docs/annotation/guides/tools/segmentation) -- For pixel-level masks
