Case study 03 / 10Engineering toolIn development

Swamp embankments from raw survey sheets

A second input path for the canal studio. Rehabilitation work on tidal-swamp farmland is surveyed as spreadsheets of points per reach, with no hydraulic model — so none of it could be drawn automatically. This extension lets the studio read those sheets directly.

At a glance

14embankment reaches drawn for the first village
174PDF sheets plus DXF
0PDF gate findings on all 29 output files; 29 DXF files audited with no errors
16new automated tests
Period
September 2026
Role
Wrote the survey data contract and design rules; extension built with AI coding agents
Status
In development
Links
Sample drawing set (PDF, synthetic data)
Cross-section sheet produced by the embankment module from a synthetic survey sheet. Title block replaced with a neutral demo block; not for construction.

01Problem

Rehabilitation work on tidal-swamp farmland in Banyuasin is surveyed as spreadsheets of points per reach, with no hydraulic model. The canal studio expected HEC-RAS geometry, so none of it could be drawn automatically.

02What I built

A second input path for the studio: a written contract for survey sheets (embankments, canal normalisation, new tertiary canals), a checker that flags inconsistent sheets before anything is drawn, an embankment design step, and the studio's existing renderer for long sections, cross sections and a site plan.

03How it works

  1. A data contract. One sheet per reach, chainage written as “STA a+bb”, point codes starting from the canal side, E/N/Z coordinates, and flood parameters.
  2. Computed, never copied. Crest elevation = flood reference + maximum flood height + 0.50 m freeboard. Crest width 3 m, side slopes 1:1, volumes by average end area.
  3. A checker that speaks first. On the first real sheets it flagged 22 places where the distance along the axis disagreed with the chainage, a reach that doubles back on itself, and pairs of embankments only 12–15 m apart.
  4. Built beside, not inside. New modules on top of the canal studio, so the irrigation pipeline and its tests stay untouched.
From raw survey sheets to embankment drawingsSurvey sheet per reach, a checker that flags inconsistencies, an embankment design step and the studio renderer producing drawings.01Survey sheetone sheet per reachSTA a+bb chainageE / N / Z pointsflood parametersread02Checkerdistance vs chainagereaches doubling backembankments too closestop before drawingclean03Embankment designcrest = flood ref.+ max flood + 0.50 mcrest 3 m, slopes 1:1average end arearender04Drawingslong sectionscross sectionssite planPDF + DXF, PDF gate 0
Swipe sideways to see the whole diagram. From survey sheet to drawings: the checker stops inconsistent sheets before anything is drawn.

04Results and scale

  • 14 embankment reaches → 174 PDF sheets plus DXF for the first village.
  • PDF gate at zero on all 29 output files; 29 DXF files audited with no errors; 16 new automated tests.
  • The drawings shown here come from a synthetic survey sheet (three fictitious reaches) run through the same module; the demo set passed the same PDF gate with zero findings.

05Stack

  • Python
  • ezdxf
  • reportlab
  • pytest
Next case studyDesign-versus-cost review for 28 locationsA repeatable review pipeline instead of 28 manual checks