> For the complete documentation index, see [llms.txt](https://docs.carto.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.carto.com/carto-user-manual/maps/layers/line.md).

# Line

In CARTO Builder, the Point layer visualization option allows you to render and style point features on your map. This layer type offers various advanced styling options to enhance the visual representation of your data such as creating heatmap or grid visualizations dynamically from your original source.

<figure><img src="/files/KqVhl6PYNqDmmcItyaxF" alt=""><figcaption></figcaption></figure>

## Visualization

Within the **Advanced visualization options** <img src="/files/KXy7rV4Gu0pLuWqxXqlk" alt="" data-size="line"> , you can access **Zoom Visibility** to define the range at which your layer should be visualized. This ensures that your lines are displayed at appropriate zoom levels, improving the clarity and relevance of your map.

<figure><img src="/files/EUMPs7wUboByFCgje47S" alt=""><figcaption></figcaption></figure>

If your data source contains identical geometries with varying attributes (e.g., weather stations, admin regions or buildings), you can use the **Aggregate by geometry** functionality to aggregate your layer based on a distinct spatial column. [Learn more in this section](/carto-user-manual/maps/layers.md#visibility-by-zoom-level-1).

## Stroke

The stroke of your line layer can be customized in various ways to suit your visualization needs:

* **Stroke Color**: Set a simple color or use a color schema based on a given property to add depth and meaning to your lines. Additionally, you can adjust the stroke opacity to your desired percentage for better visual effects.
* **Stroke Weight**: Define the stroke weight as either a fixed value or based on a given property. You can modify the stroke weight using a simple slider when set to fixed, or by defining a weight range when configured by a property.

<figure><img src="/files/EvpHu53Z0awxQdDRDLI8" alt=""><figcaption></figcaption></figure>

When configuring either the stroke color or stroke weight based on a property, you can access **Advanced stroke options** <img src="/files/KXy7rV4Gu0pLuWqxXqlk" alt="" data-size="line"> to set the color scale or weight scale. This allows for a more granular and informative visualization.

## Custom aggregation expressions

On layers using [Aggregate by geometry](/carto-user-manual/maps/layers.md#aggregate-by-geometry), apart from the predefined aggregation methods (`avg`, `sum`, `min`, `max`, `count`), you can write a custom SQL aggregation expression that runs on your data warehouse. This is useful for derived metrics like rates, ratios and weighted averages.

```sql
SUM(female) / NULLIF(SUM(population), 0)
```

Custom aggregation is also available in popup fields. See [Interactions](/carto-user-manual/maps/interactions.md#custom-aggregation-in-popups).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.carto.com/carto-user-manual/maps/layers/line.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
