Raster processing
All examples · Vector Raster plugin
A raster travels through Hop as a Raster value, not one row per pixel. Read a source, derive a clip or a reprojection, then write a file or calculate statistics. The project includes all six raster transforms: Reader, Info, Clip, Reproject, Writer and ZonalStats.
Download all eight pipelines and data
Set up the example project once
- Install Spatial Hop, then extract the complete ZIP into a writable folder. Keep
data,metadata,outputand all pipelines together. - In Hop GUI, create a project named raster-processing. Set Home folder to the extracted
raster-processingfolder and use the includedproject-config.json. Use the existing configuration when prompted. - Select the project, open a pipeline and select the included local run configuration.
- Run it. Every pipeline is independent. Only
zonal-online.hplneeds internet; no database or separately installed GDAL is required.
All local paths use ${PROJECT_HOME}. Keep the supplied data unchanged. Overwrite is disabled: to repeat an example, choose a new output name or remove only its previously generated outputs. The polygon example creates one TIFF per building.
Choose a tutorial
| Tutorial | Pipelines | Result |
|---|---|---|
| Read, inspect and write | read-write-geotiff.hpl, read-write-cog.hpl |
GeoTIFF and COG with internal overviews. |
| Clip by bounding box | clip-bbox.hpl |
A 250 × 250 m crop on the original grid. |
| Clip by building polygon | clip-polygon.hpl |
33 separate, masked TIFFs. |
| Reproject and resample | reproject-nearest.hpl, reproject-bilinear.hpl |
EPSG:3857 rasters with 1-unit pixels. |
| Building height statistics | zonal.hpl |
33 building records with height statistics. |
| Statistics from an online COG | zonal-online.hpl |
The same analysis using HTTP range reads. |
Meet the sample data
Buildings only. data/buildings.gpkg, layer buildings, contains 33 polygons selected with art_txt = 'Gebaeude' from the MOpublic dataset 2549. Other land-cover classes are not included. The ordinary building_id attribute copies the original T_Id primary key so it remains available in Hop and output datasets. Original attributes, INTERLIS identifiers and coordinates are retained.
2019 nDSM. data/ndsm-2019.tif is a losslessly compressed crop of the normalised building surface model, not the 2023 raster. The crop adds a 10-metre margin around the buildings, rounded to source pixel boundaries. No values were resampled or reprojected.
| Property | Value |
|---|---|
| CRS | EPSG:2056 — CH1903+ / LV95 |
| Size | 2322 × 4709 pixels, one band |
| Pixel size | 0.25 × 0.25 metres |
| Extent | E 2611454.75–2612035.25; N 1233360.75–1234538.00 |
| Numeric type / NoData | Float32 / -9999 |
| Measurements | Normalised heights in metres above terrain |
The current building inventory and the 2019 raster describe different dates. Four buildings have no valid raster samples in this snapshot. Their statistics remain null with status NO_VALID_PIXELS; they are not assigned a height of zero. Even a valid maximum is a sampled nDSM value inside a footprint, not an exact surveyed roof height.
Source: Kanton Solothurn, Amt für Geoinformation, MOpublic and LiDAR 2019. Source-data terms allow commercial and non-commercial use; attribution is recommended. The ZIP contains full provenance and checksums in data/README.md and data/provenance.json.