Skip to content

A collection of various QGIS processing scripts written in Python

License

Notifications You must be signed in to change notification settings

webrian/QGIS-processing-algorithms

Repository files navigation

QGIS Processing Algorithms

A collection of QGIS processing algorithms.

Unzip Processing Algorithm

Motivation

There is a handy processing algorithm to download files from an arbitrary URL. But as it seems geodata are often in compressed ZIP archives. In case of ZIP archives it is necessary to extract downloaded data to a destination folder for further processing.

Installation

  1. download the Python script
  2. open Processing Toolbox in QGIS
  3. select "Open Existing Script" in the Processing Toolbox menu
  4. select the script UnzipArchiveProcessing.py
  5. algorithm is added in section "Scripts"

Screenshot from 2022-12-19 22-37-09

Use in a Model

This algorithm is useful for use in a model after downloading data.

model

FTP Upload Processing Algorithm

Motivation

QGIS features already a Download File processing tool to download (geo-)data from a server. But there is a missing tool to upload files to a server.

Installation

  1. download the Python script
  2. open Processing Toolbox in QGIS
  3. select "Open Existing Script" in the Processing Toolbox menu
  4. select the script FtpUploadProcessing.py
  5. algorithm is added in section "Scripts"

image

Use in a Model

image

Transformation Processing Algorithms

Motivation

While QGIS features an user-friendly and sophisticated georeferencer for raster files with different transformation options, it lacks a similar tool for vector layers. QGIS features a native vector georeferencer since version 3.26. The GDAL/OGR library provides the gcp options to georeference vector layers with polynominal transformations. But there is still an option missing to reference data with a 4-parameter Helmert transformation with estimated parameters using the least square fitting. This QGIS processing script should fill this gap.

Installation

  1. download the Python script
  2. open Processing Toolbox in QGIS
  3. select "Open Existing Script" in the Processing Toolbox menu
  4. select the scripts HelmertTransformationProcessing.py and/or PolynominalTransformationProcessing.py
  5. algorithms are added in section "Scripts"

How to use the processing script

  1. load the unreferenced vector layer

  1. create a new linestring layer (temporary scratch layer is sufficient)
  2. determine control points and add one linestring (with start and end point) for each control point from the unreferenced layer to the georeferenced layer

Screenshot from 2022-03-16 12-24-04 Screenshot from 2022-03-16 12-24-31

  1. run the processing algorithm

  1. check the transformation

Screenshot from 2022-03-16 12-32-04

About

A collection of various QGIS processing scripts written in Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages