Home / Works / Field Template Generator
Field Template Generator
Python Tool
Overview
Generated 131 location-specific mobile data-collection templates (SW Maps) across 14 provinces in one run. Copies a master template per row of a CSV config, renames its layers and pre-sets province, municipality and barangay dropdowns, replacing hand-editing each template in the app.
How it works
The CSV config enters at three steps of a per-row loop.
InputStepDecision / optionData storeOutput
Details
- Generated 131 location-specific mobile data-collection templates across 14 provinces in one run with a Python tool (pandas, sqlite3).
- SW Maps templates (
.swmt) are SQLite databases. The tool copies a master template once per row of a CSV config, renames its data layers, and pre-sets the province, municipality and barangay dropdown values in the attribute fields, filing each output into a per-province folder. - One config per report type and team (land and right-of-way), so a template refresh for every site is a single run instead of hand-editing each file in the app.
- Built with: Python, pandas, sqlite3, Jupyter
About the code
Built for my department. The code stays with the company, so this page describes the tool only.