pyqgis

Automate geospatial data processing and map rendering with PyQGIS Python bindings.

49|9|Updated Mar 9, 2026
One-click install
npx skills add https://github.com/znlgis/opengis-skills --skill pyqgis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pyqgis
Source: https://github.com/znlgis/opengis-skills/tree/main/pyqgis
Command: npx skills add https://github.com/znlgis/opengis-skills --skill pyqgis

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PyQGIS enables developers and analysts to automate repetitive GIS tasks, perform spatial analysis at scale, and render or export maps programmatically without relying on manual QGIS desktop interaction.

Core Features & Use Cases

  • Programmatic layer I/O and project management for Shapefile, GeoPackage, PostGIS, GeoJSON and other providers.
  • Geometry creation and spatial operations (buffer, intersection, union, distance, centroid) and efficient spatial queries with spatial indexes.
  • Coordinate reference system management and reliable coordinate transformations for reprojection workflows.
  • Integration with the Processing framework to run algorithms (native and GDAL) for batch analysis and raster/vector workflows.
  • Map rendering and export to image or PDF for automated map production and report generation.
  • Use case: run a headless Python script to load many input files, reproject and buffer features, run dissolve and export results to a GeoPackage for downstream analysis.

Quick Start

Initialize a standalone PyQGIS application in a Python script, load your vector layer, run a processing algorithm such as native:buffer, and save the result to an output file.

Frequently Asked Questions about pyqgis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate geospatial workflows with PyQGIS in a headless server script?

Run QGIS Processing algorithms like native:buffer by initializing QgsApplication in a standalone Python script, loading your layer, and saving the output to a GeoPackage. This automates batch vector workflows without manual desktop interaction.

Can I use Python to reproject layers and run spatial operations like buffer and dissolve?

PyQGIS provides APIs for geometry operations like buffer, intersection, and dissolve, alongside coordinate reference system management for reliable reprojection. You can execute native and GDAL Processing algorithms in Python for batch spatial analysis.

Does PyQGIS support map rendering and export to PDF for automated report generation?

PyQGIS supports map rendering and export to image or PDF for automated map production. You can programmatically render maps and export them to generate reports without relying on manual QGIS desktop interaction.

What's the best way to load and save multiple Shapefile and GeoJSON layers programmatically?

PyQGIS handles programmatic layer I/O for Shapefile, GeoPackage, PostGIS, and GeoJSON providers. You can load multiple input files, process geometries, and save results to a GeoPackage for downstream analysis.

Do I need QGIS desktop installed to run standalone PyQGIS Python scripts?

Standalone PyQGIS scripts require initializing QgsApplication but do not need manual QGIS desktop interaction. This allows developers to run headless Python scripts for batch geospatial data processing on servers.