SCHEMAXIS · Declared work. Results you can check.Documentation ↗ · Contact
schemaxis/Agent’s Hands

Documentation / generated/qgis-operations.md
Core 11629ae · View or edit Markdown on GitHub ↗

Qgis operation reference

Generated from the current declarations. Do not edit this file by hand.

Types, limits and defaults below describe resolved values. Runtime expressions must produce these types. Unknown options are rejected; defaults apply only when omitted. Constructor options must be constant after document composition.

Index#

buffer, centroid, clip, readVector, reproject, selectAttributes, summariseAttributes

buffer#

Replaces each feature by the area within a fixed distance of it (QgsGeometry.buffer), so points become discs, lines become corridors and polygons grow outward; attributes are kept. Choose it for proximity zones such as setbacks or catchments. The layer must be in a projected CRS whose map units are metres; geographic coordinates are rejected rather than buffering in degrees.

Common mistakes and assumptions:

  • Reproject first: a layer in EPSG:4326 fails with 'buffer requires a projected CRS in metres'.
  • Overlapping buffers stay separate features; nothing is dissolved or merged.
  • This calls the geometry API directly, not the Processing 'Buffer' algorithm; its end-cap and join options are not exposed.

Native binding: QgsGeometry.buffer. Output kind: ["geospatialVector"].

Input port Multiplicity Required Kind
input one node yes geospatialVector
Option Meaning Type / constraints Default
distance Buffer radius: how far the zone extends from each feature, in metres along the projected map plane. Larger values give larger, more overlapping zones. Schemaxis checks before buffering that the layer's CRS is projected with metre map units, so the number is never applied to degrees or feet. {"type":"number","minimum":0.001,"maximum":100000} required
segments Number of straight segments QGIS uses to approximate curved parts of the buffer; for rounded corners this is the count per quarter circle. More segments give smoother outlines and areas closer to a true circle, at the cost of more vertices (which count toward the one-million-vertex limit). {"type":"integer","minimum":4,"maximum":64} 16

centroid#

Replaces each polygon or multipolygon feature by its planar area-weighted centre of mass (QgsGeometry.centroid), producing a point layer that keeps attributes and CRS. Choose it to reduce parcels or zones to representative points, for example before buffering around their centres. The input must be a polygon layer in a projected CRS; the boundary and area are not retained.

Common mistakes and assumptions:

  • Requires polygon geometry and a projected CRS; reproject explicitly first. Geographic coordinates and point or line layers fail during execution.
  • The point can lie outside a concave polygon or inside a hole; it is not a point-on-surface label position or a geodesic centre.

Native binding: QgsGeometry.centroid. Output kind: ["geospatialVector"].

Input port Multiplicity Required Kind
input one node yes geospatialVector

Options: none.

clip#

Intersects each feature with an axis-aligned rectangle given in the input layer's CRS (QgsGeometry.intersection with a rectangle), keeping attributes. Features entirely outside the rectangle are dropped; those crossing its edge are cut. Choose it to restrict analysis to a study area; there is no clipping by another layer's polygons.

Common mistakes and assumptions:

  • Bounds use the coordinates of the layer as it reaches this node: after a reproject they are in the target CRS, not the original.
  • If no feature survives, or clipping leaves features of different geometry types, the run fails.

Native binding: QgsGeometry.intersection. Output kind: ["geospatialVector"].

Input port Multiplicity Required Kind
input one node yes geospatialVector
Option Meaning Type / constraints Default
bounds The clipping rectangle as [xmin, ymin, xmax, ymax] in the input layer's CRS and coordinate units: metres for a metric projected CRS, degrees for a geographic one. x is the first coordinate of the layer's geometries (easting or longitude) and y the second. xmin must be below xmax and ymin below ymax. {"type":"array","items":{"type":"number","minimum":-1000000000.0,"maximum":1000000000.0},"minItems":4,"maxItems":4} required

readVector#

Loads one vector layer from a single-file GeoJSON or GeoPackage as the start of a vector chain, keeping its geometry, attributes and declared CRS. Schemaxis copies the file into the run before QGIS opens the copy through the OGR provider. Choose it for every input layer; other operations take a reader or a later node as input. The layer must hold valid, nonempty 2D geometry with an EPSG CRS, at most 10000 features and one million vertices.

Common mistakes and assumptions:

  • A GeoPackage must contain exactly one vector layer, and must be closed: -wal, -shm or -journal sidecar files cause UNSUPPORTED_RESOURCE.
  • Z or M coordinates, invalid geometry, nonprimitive attribute types or a non-EPSG CRS fail during execution; repair the data in QGIS first.
  • Shapefiles, rasters, web services and multi-file inputs are not supported.

Native binding: QgsVectorLayer. Output kind: ["geospatialVector"].

Inputs: none.

Option Meaning Type / constraints Default
file Absolute path of a .geojson or .gpkg file holding exactly one vector layer. Schemaxis records its digest during planning, copies its bytes into the run and fails if the file changes in between; QGIS reads only the copy. All readVector inputs together are limited to 64 MiB. {"type":"string","minLength":1,"maxLength":4096} required

reproject#

Transforms every feature's coordinates from the input layer's CRS to an explicit EPSG target CRS with QgsCoordinateTransform, keeping attributes. Choose it before buffer or centroid, which need a projected CRS (buffer in metres), or to match another layer's CRS before clipping. Ballpark and fallback transformations are disabled, so a missing datum grid makes the run fail instead of silently losing accuracy.

Common mistakes and assumptions:

  • Pick a projected CRS suited to the study area (for example the local UTM zone) for distances and areas; Web Mercator (EPSG:3857) distorts lengths away from the equator.
  • Datum grid files and EPSG definitions come from the QGIS installation; a transform that needs an absent grid fails.

Native binding: QgsCoordinateTransform. Output kind: ["geospatialVector"].

Input port Multiplicity Required Kind
input one node yes geospatialVector
Option Meaning Type / constraints Default
crs Target coordinate reference system as an EPSG authority identifier, written EPSG: followed by a 3-6 digit code (for example EPSG:4326 for WGS 84 latitude/longitude, or EPSG:32633 for WGS 84 / UTM zone 33N). The output geometry, and every later clip bound and buffer distance, are expressed in this CRS. A projected CRS with metre units is needed for buffer, and any projected CRS for centroid. {"type":"string","minLength":8,"maxLength":11} required

selectAttributes#

Select features using conjunctive literal typed attribute tests and explicit minimum/maximum count requirements; retain geometry, CRS and original fields. Declare minFeatures/maxFeatures to detect an unexpected selection. No geometry or CRS conversion occurs.

Common mistakes and assumptions:

  • Null is distinct from zero and from an empty string. Storage fid is regenerated; use a stable semantic string ID field.

Native binding: QgsFeature.attribute. Output kind: ["geospatialVector"].

Input port Multiplicity Required Kind
input one node yes geospatialVector
Option Meaning Type / constraints Default
idField Existing semantic field containing unique nonempty nonnull string feature IDs. IDs are unitless and copied verbatim into sorted memberIds. Duplicate, numeric, empty or missing IDs fail rather than regenerating them. {"type":"string","minLength":1,"maxLength":128} required
predicates One to sixteen typed field tests combined with AND. Every nonnull value in every referenced input field must match its declared type before filtering, even for features another test would exclude. {"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":128,"required":true},"type":{"type":"enum","values":["number","string","boolean"],"required":true},"comparison":{"type":"enum","values":["eq","ne","gt","ge","lt","le","isNull","isNotNull"],"required":true},"value":{"type":"union","options":[{"type":"number"},{"type":"string","maxLength":4096},{"type":"boolean"}]}}},"minItems":1,"maxItems":16} required
minFeatures Minimum selected feature count, inclusive, in features; defaults to 1. Empty vector outputs remain unsupported. Set it to the independently expected lower bound so missing data fails clearly. {"type":"integer","minimum":1,"maximum":10000} 1
maxFeatures Maximum selected feature count, inclusive, in features; defaults to 10000. It must be at least minFeatures. Use an exact equal lower/upper requirement when feature membership count is known. {"type":"integer","minimum":1,"maximum":10000} 10000

summariseAttributes#

Publish a typed group summary table and CSV with sorted member IDs, explicit units and numeric null handling while passing the input vector through unchanged. Each summary publishes a CSV, a typed JSON table and a separate editable GeoPackage no-geometry table reopened from the saved QGIS project. The vector output remains suitable for downstream geometry operations.

Common mistakes and assumptions:

  • Null is distinct from zero and from an empty string. Storage fid is regenerated; use a stable semantic string ID field.

Native binding: QgsVectorDataProvider.addFeatures. Output kind: ["geospatialVector","table"].

Input port Multiplicity Required Kind
input one node yes geospatialVector
Option Meaning Type / constraints Default
idField Existing semantic field containing unique nonempty nonnull string feature IDs. IDs are unitless and copied verbatim into sorted memberIds. Duplicate, numeric, empty or missing IDs fail rather than regenerating them. {"type":"string","minLength":1,"maxLength":128} required
groupBy Exact existing string field used as the group key; null is one explicit group, distinct from the empty string. Groups sort null first, then Unicode string order. Numeric or Boolean grouping is outside this bounded slice. {"type":"string","minLength":1,"maxLength":128} required
aggregates One to sixteen named output columns. Counts include or exclude null as explicitly selected; sum/mean ignore null numeric values and yield null for an all-null group. Units are annotations you declare; no conversion occurs. {"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128,"required":true},"statistic":{"type":"enum","values":["count","nonNullCount","sum","mean"],"required":true},"field":{"type":"string","minLength":1,"maxLength":128},"units":{"type":"string","minLength":1,"maxLength":128,"required":true}}},"minItems":1,"maxItems":16} required