add_layer
Adds or replaces a thematic QGIS layer styled from the catalog, with automatic field detection, clipping, and legend titles.
Instructions
Add (or replace) a thematic layer, styled from the catalog.
In QGIS it appears in the "Capas temáticas" group, in drawing order.
Args: layer_type: Key from list_layer_types, e.g. "zonas_vida", "rios", "volcanes". path: Vector or raster file with the data. field: Attribute used to classify colors (auto-detected when omitted). label_field: Attribute used for labels (auto-detected when omitted). clip: "shape" cuts to the project polygon, "extent" to the map frame, "none" keeps the layer whole. Defaults depend on the layer type. title: Legend title (defaults to the catalog title). subset: Optional attribute filter in QGIS expression syntax.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clip | No | ||
| path | Yes | ||
| field | No | ||
| title | No | ||
| subset | No | ||
| layer_type | Yes | ||
| label_field | No |