Skip to content

API Reference

API Reference

Complete API documentation for the qgis-rs crates.

Crates

qgis-render

The core rendering library.

Main Types:

  • Project — Load and manage QGIS projects
  • Layer — Access vector and raster layers
  • Feature — Iterate over features
  • Geometry — Spatial operations
  • RenderSettings — Configure rendering
  • Crs — Coordinate reference systems

qgis-sys

Low-level CXX bindings to QGIS C++ API.

qgis-server

HTTP server for WMS/WFS/OGC APIs. See the server module and the Server Overview.

qgis-cli

Command-line interface. See the CLI reference.

qgis-sdk

Plugin development SDK (Python). See Plugin Development.

qgis-sdk modules:

  • bridge — Typed QWebChannel bridge
  • testing — Fakes and pytest fixtures
  • network — QgsNetworkAccessManager wrapper
  • tasks — QgsTaskManager wrapper

The transport

Every language binding — Python, Node, and the CLI’s own client — reaches the engine through one versioned JSON envelope rather than a per-language FFI surface.

  • wire-protocol — the request/response envelope, TRANSPORT_VERSION, every operation and every error kind

Modules

Rendering

  • render — Rendering functions and types
  • tiles — Tile generation
  • layout — Print layouts

Data Access

  • features — Feature iteration and filtering
  • geometry — Geometry operations
  • crs — Coordinate transforms

Server

  • server — HTTP server
  • wms — WMS protocol
  • wfs — WFS protocol

Expressions

  • expr — QGIS expression engine

Error Handling

All fallible operations return Result<T, QgisError>:

use qgis_render::QgisError;
match Project::open("map.qgs") {
Ok(project) => { /* ... */ }
Err(QgisError::FileNotFound(path)) => { /* ... */ }
Err(QgisError::InvalidProject { message }) => { /* ... */ }
Err(e) => { /* catch-all */ }
}

Thread Safety

QGIS objects are !Send + !Sync. See Architecture for details.

Examples

See the Guides section for practical examples.