Workflow Builder and batch processing

Batch processing: one tool on many layers

Run one operation, such as reprojecting or clipping, on many layers at once with Batch Processing, name the outputs with a template, and download them as one ZIP archive.

Intermediate2 min read

You will learn

  • Choose an operation and inputs.
  • Name outputs with a template.
  • Check the plan, run, retry and download.

Prerequisites

Data for this tutorial

Roads (synthetic) Download roads.geojson

Format
GeoJSON
Geometry
LineString
CRS
EPSG:32643 (WGS 84 / UTM zone 43N)
Content
23 roads: 2 primary, 5 secondary, 16 local
In Orbis
Browser panel ▸ Tutorial sample data (synthetic) ▸ Roads, or Load complete tutorial pack.
Fields used in the tutorials
FieldTypeDescription
road_idtextRoad identifier.
nametextRoad name.
classtextprimary, secondary or local.
lanesintegerNumber of lanes.
surfacetextpaved or unpaved.

Facilities (synthetic) Download facilities.geojson

Format
GeoJSON
Geometry
Point
CRS
EPSG:32643 (WGS 84 / UTM zone 43N)
Content
97 points: 3 hospitals, 6 health centres, 26 clinics, 58 schools, 4 colleges
In Orbis
Browser panel ▸ Tutorial sample data (synthetic) ▸ Facilities, or Load complete tutorial pack.
Fields used in the tutorials
FieldTypeDescription
facility_idtextF001 to F097.
nametextFacility name.
categorytexthealth or education.
typetexthospital, health_centre, clinic, school or college.
ownershiptextpublic or private.
capacityintegerBeds or students.
openedintegerYear opened.

Wards (synthetic) Download wards.geojson

Format
GeoJSON
Geometry
Polygon
CRS
EPSG:32643 (WGS 84 / UTM zone 43N)
Content
84 wards (31 peri-urban, 19 rural, 34 urban), 333,497 residents
In Orbis
Browser panel ▸ Tutorial sample data (synthetic) ▸ Wards, or Load complete tutorial pack.
Fields used in the tutorials
FieldTypeDescription
ward_idtextWard code W01 to W84.
ward_nametextWard name.
zonetexturban, peri-urban or rural.
populationintegerResidents.
householdsintegerHouseholds.
area_km2realEllipsoidal area in km².
density_km2realPersons per km².
literacy_raterealLiterate share, per cent.

Licence: CC0 1.0. All tutorial data is synthetic and generated by Orbis. About the datasets

The task

You need the roads, facilities and wards in WGS 84 longitude and latitude (EPSG:4326) as GeoJSON files, for a web map. Instead of running Reproject layer three times, you run it once as a batch.

Steps

  1. Add Roads, Facilities and Wards from Browser ▸ Tutorial sample data (synthetic).
  1. Open the Batch Processing workspace. Keep the Layer by layer mode.
  1. In Apply to every input, choose Reproject vector layers.
  1. Under Inputs, tick the three layers. Under the parameters, set Target CRS to EPSG:4326.
  1. Under the outputs, type a Batch name such as web layers. Keep Output names at {name}_{operation}, keep the destination in the project, set Download to One ZIP archive with manifest.json and log.txt and File format to GeoJSON.

    Batch Processing with Reproject vector layers, three inputs ticked and the Plan tab showing three ready tasks
    The plan of a three-layer batch.
  1. The Plan tab lists one row per input with its CRS and output name, marked Ready. Click Run batch.
  1. The Run tab shows the progress of every task. When it finishes, the outputs are added to a layer group named after the batch and the ZIP archive is downloaded.

Expected result

Three new layers, Roads (synthetic)_reprojected, Facilities (synthetic)_reprojected and Wards (synthetic)_reprojected, with 23, 97 and 84 features in EPSG:4326, and a ZIP archive with the three GeoJSON files under outputs/, manifest.json and log.txt.

Common mistakes

  • Reprojecting to fix a wrong CRS label. Reprojection changes coordinates. Fix wrong labels by assigning the CRS; see Fixing CRS problems.
  • The same name twice. Repeated output names get _2, _3. Use {index} in the template if you prefer numbers.

Troubleshooting

  • A task is "Will be skipped". The plan gives the reason, for example a line layer for a polygon-only operation.
  • A task failed. Open it in the Run tab, change its settings with Edit overrides and Retry; Retry failed retries every failed task.