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.
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
| Field | Type | Description |
|---|---|---|
ward_id | text | Ward code W01 to W84. |
ward_name | text | Ward name. |
zone | text | urban, peri-urban or rural. |
population | integer | Residents. |
households | integer | Households. |
area_km2 | real | Ellipsoidal area in km². |
density_km2 | real | Persons per km². |
literacy_rate | real | Literate 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
- Add Wards from Browser ▸ Tutorial sample data (synthetic). To try it on a few wards first, select some of them on the map.
- Open Batch Processing and switch to Feature by feature.
- Choose Wards (synthetic) as Vector layer to iterate (tick Only the features selected on the map for a test run).
- 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.
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.
Planning one shapefile and one map per ward.
- 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.