Workflow Builder and batch processing

Processing feature by feature: one file and map per ward

Split a layer into one dataset per feature, optionally process each one, write a file and a map for every item, and download everything as one ZIP archive.

Advanced2 min read

You will learn

  • Plan items and folder names with templates.
  • Write files and maps for every feature.
  • Follow, pause and retry an iteration.

Prerequisites

Data for this tutorial

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

Every ward office should receive its own boundary as a shapefile and a map. With 84 wards that is 84 files and 84 maps, made in one run.

Steps

  1. Add Wards from Browser ▸ Tutorial sample data (synthetic). To try it on a few wards first, select some of them on the map.
  1. Open Batch Processing and switch to Feature by feature.
  1. Choose Wards (synthetic) as Vector layer to iterate (tick Only the features selected on the map for a test run).
  1. Type {field:ward_id} as Name of each item and {field:zone}/{name} as Folder of each item: the files are grouped in one folder per zone, with a sub-folder per ward.
  1. Under Vector files per item, untick the formats ticked by default and tick Shapefile packed as one ZIP. Under Map of each item, tick Make a map of every item and keep the title {feature} and the PNG format.

    The Feature by feature form with the ward layer and its fields, the name and folder templates, and Shapefile packed as one ZIP ticked
    Planning one shapefile and one map per ward.
  1. The preview lists the planned names and folders. Click Create and run. Orbis creates a workflow with a Feature Iterator and runs it; the Workflow Builder Run tab shows processed, completed and failed items, with Pause and Cancel.

Expected result

A ZIP archive with folders peri-urban, rural and urban, a sub-folder per ward (for example urban/W37/) holding the ward's shapefile ZIP and its map W37_Map.png, and items.csv listing every item with its status and files.

Common mistakes

  • Names with empty values. NULL or empty attribute values are replaced by the Text for empty values (default unnamed); the preview reports how often.
  • Invalid file names. Characters such as / or : become _, and equal names get _2, _3. Check the preview before running.

Troubleshooting

  • An item failed. By default the iteration skips it and continues. After the run, Retry N failed runs only the failed items again; Item log (CSV) lists the errors.
  • You need a processing step per item. Choose it under Processing step for each feature, or open the workflow (Open as workflow) and add steps after the iterator.