Build end-to-end pipelines that export field-collected Kobo data as GeoJSON, publish it in GeoServer, style it for web maps, and automate refresh cycles for live visualization.
This module brings together the two halves of the course: KoboToolbox for field data collection and GeoServer for geospatial publication. Learners will build integration pipelines that transform Kobo submissions into publishable geospatial layers.
The module covers exporting Kobo data as GeoJSON, publishing derived layers in GeoServer, styling field-collected data, automating refresh pipelines, and visualizing results on web maps. It emphasizes reproducibility, data quality, and operational reliability.
The integration pipeline moves data from field collection to live web maps through a series of well-defined stages:
GeoJSON is the natural bridge between Kobo field data and GeoServer. Kobo submissions with spatial questions can be exported as GeoJSON, preserving geometry and attributes.
# Export Kobo submissions as GeoJSON
GET /api/v2/assets/{asset_uid}/data/?format=geojson
# Example saved output
curl -H "Authorization: Token $KOBO_TOKEN" \
"https://kf.kobotoolbox.org/api/v2/assets/$UID/data/?format=geojson" \
-o field_data.geojson
ogrinfo or a Python GeoJSON library before publishing to GeoServer. This prevents silent data issues.
GeoServer can publish GeoJSON files as a vector layer. Publication can be done manually via the admin UI or automated via REST for repeatable pipelines.
# Publish a GeoJSON layer via REST
POST /geoserver/rest/workspaces/field-data/datastores
Content-Type: application/json
{
"dataStore": {
"name": "kobo_geojson",
"type": "GeoJSON",
"connectionParameters": {
"entry": [
{ "@key": "url", "$": "file:///data/kobo/field_data.geojson" }
]
}
}
}
Field data is often point-based (e.g., survey sites, facilities, or observations). Effective styling improves readability and communicates the meaning of the data.
# Example SLD for categorized point styling
<Rule>
<Name>health_facility</Name>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>facility_type</ogc:PropertyName>
<ogc:Literal>health</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<PointSymbolizer>
<Graphic>
<Mark>
<WellKnownName>circle</WellKnownName>
<Fill><CssParameter name="fill">#e63946</CssParameter></Fill>
</Mark>
<Size>10</Size>
</Graphic>
</PointSymbolizer>
</Rule>
Field data changes continuously. A reliable pipeline refreshes published layers periodically while ensuring data consistency and cache correctness.
Once published, field layers can be visualized in web maps using WMTS or WMS. Clients such as OpenLayers and Leaflet support interactive features including popups and filtering.
// Example OpenLayers WMTS layer
const layer = new ol.layer.Tile({
source: new ol.source.WMTS({
url: "https://geoserver.example.org/gwc/service/wmts",
layer: "field-data:survey_sites",
matrixSet: "EPSG:900913",
format: "image/png",
tileGrid: ol.tilegrid.WMTS.createFromCapabilitiesMatrixSet(matrixSet)
})
});
Integration pipelines must preserve data quality and respect governance requirements. Field data often contains errors, and published layers may expose sensitive information.
| Quality Check | Method | Action |
|---|---|---|
| Invalid geometry | Geometry validation | Exclude or repair |
| Missing coordinates | Null check | Exclude from map |
| Out-of-range GPS | Coordinate bounds | Flag for review |
| Duplicate sites | Unique ID check | Merge or remove |
In this lab, you will build a complete pipeline from Kobo export to GeoServer publication with styling and caching, and visualize the result on a web map.
| Criteria | Weight |
|---|---|
| Kobo GeoJSON export and validation | 15% |
| GeoServer publication correctness | 20% |
| Styling quality | 15% |
| Refresh pipeline and cache management | 20% |
| Web map visualization | 15% |
| Pipeline documentation and runbook | 15% |
Pass mark for this module: 70%