Skip to content
Back to skills

11 Pyqgis Application Bootstrap Headless

ASecurity

Sub-skill of qgis: 1.1 PyQGIS Application Bootstrap (Headless) (+2).

  • 17 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 9, 2026
ai-agentspythongogit

Security analysis

A100/100

Scanned September 9, 2026

npx -y skills add vamseeachanta/workspace-hub --skill 11-pyqgis-application-bootstrap-headless --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 11 Pyqgis Application Bootstrap Headless?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 11 Pyqgis Application Bootstrap Headless
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vamseeachanta-11-pyqgis-application-bootstrap-headless/badge)](https://www.skillsdirectory.com/skills/vamseeachanta-11-pyqgis-application-bootstrap-headless)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: qgis-11-pyqgis-application-bootstrap-headless
description: 'Sub-skill of qgis: 1.1 PyQGIS Application Bootstrap (Headless) (+2).'
version: 1.0.0
category: engineering/gis
type: reference
scripts_exempt: true
---

# 1.1 PyQGIS Application Bootstrap (Headless) (+2)

## 1.1 PyQGIS Application Bootstrap (Headless)


```python
import sys
import os

# Required: set QGIS prefix path before importing
os.environ["QT_QPA_PLATFORM"] = "offscreen"  # headless mode
from qgis.core import QgsApplication

qgs = QgsApplication([], False)  # False = no GUI
qgs.initQgis()

# Always call at end of script:
# qgs.exitQgis()
```


## 1.2 Well Locations from CSV (lat/lon)


```python
from qgis.core import (QgsVectorLayer, QgsProject,
                        QgsCoordinateReferenceSystem)

# CSV with columns: well_name,latitude,longitude
uri = (
    "file:///path/to/wells.csv"
    "?delimiter=,"
    "&xField=longitude"
    "&yField=latitude"
    "&crs=EPSG:4326"          # WGS84 geographic
)
layer = QgsVectorLayer(uri, "wells", "delimitedtext")
if not layer.isValid():
    raise RuntimeError("Failed to load CSV layer")
QgsProject.instance().addMapLayer(layer)
```


## 1.3 Supported Input Formats


| Format | Driver | Use |
|--------|--------|-----|
| GeoPackage (.gpkg) | GPKG | Preferred vector store |
| Shapefile (.shp) | ESRI Shapefile | Legacy vector |
| GeoJSON (.geojson) | GeoJSON | Web interchange |
| GeoTIFF (.tif) | GTiff | Raster standard |
| NetCDF (.nc) | netCDF | Metocean/bathymetry |
| KML (.kml) | KML | Google Earth exchange |
| CSV + lat/lon | delimitedtext | Point data import |

---

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.