Case study 02 / 10Engineering toolLive · team only

Long Cross

Canal design studio for irrigation planning. A tertiary irrigation rehabilitation design covers dozens of blocks, and every change to the hydraulic model ripples through drawings, quantities, estimates and documents. Long Cross regenerates all of them from one set of computed numbers.

At a glance

72tertiary irrigation blocks in production across 3 schemes, South Sumatra
1,300+automated tests behind the studio
118PDFs in the last full gate sweep, all clean
250+commits between 17 August and 14 September 2026
Period
August 2026 – present
Role
Designed the workflow and engineering rules; built it with AI coding agents; decides pricing and design policy; the project team uses it daily
Status
Live for the project team (login required)
Links
Not public
Studio Gambar Saluran pipeline Automated pipeline from hydraulic model or field survey to drawings, quantities, bill of quantities, technical specification and a text-overlap quality gate. Studio Gambar Saluran: from survey data to tender documents Irrigation channel drawing pipeline (Python: reportlab, ezdxf, openpyxl, PyMuPDF; FastAPI web studio) INPUTS HEC-RAS model geometry file (.g01) profile output table reaches, stations, sections Field survey sheet E / N / Z points per station swamp embankments, no hydraulic model needed Master data channel condition per reach plot and title-block info AHSP unit prices (to 5) spec master .docx (to 6) PIPELINE 1 Read and check parse reaches and stations stationing and branch checks stop on errors, log warnings 2 Hydraulic design Manning / Strickler trapezoid, lining, freeboard design water level per reach 3 Drawings cross and long sections, situation and key plan A3 PDF + DXF from one shared element list 4 Quantities cut, fill, masonry, plaster per cross-section average end area x length 5 Bill of quantities quantities x AHSP prices recap per reach and plot Excel and PDF 6 Technical spec master .docx edited per plot: unused chapters removed, tables filled from the same numbers 7 Quality gate (must be zero before hand-over) text overlap = 0 · text outside frame = 0 · text crossing lines = 0 DXF audit · 1,300+ automated regression tests Output per plot drawings PDF / DXF, bill of quantities, spec
Swipe sideways to see the whole diagram. Pipeline: inputs → read and check → hydraulic design → drawings → quantities → bill of quantities → technical specification, behind a quality gate. View full size

01Problem

A tertiary irrigation rehabilitation design covers dozens of blocks. Each one needs long and cross sections, earthwork quantities, a cost estimate, technical specifications and a final report. Whenever the hydraulic model or a field survey changes, everything downstream changes too — and figures copied by hand drift apart between the drawings, the estimate and the documents.

02What I built

A web studio where the team uploads HEC-RAS geometry, a field-condition table and the canal alignment for each block. The server rebuilds the drawings, quantities and cost estimate, and the specifications and final reports are generated from those same computed numbers.

03How it works

  1. One folder per block. Geometry (.gNN), field conditions (kondisi.csv), alignment (.kmz) and title-block data. If a block has more than one geometry file, the studio refuses to guess and asks for confirmation — guessing could draw design geometry as if it were existing ground.
  2. Design criteria built in. Sections follow the Indonesian irrigation design criteria (KP-03 / KP-05); branched canals are supported.
  3. Drawings that open anywhere. A3 PDF sheets with the official title block, plus DXF files that open in AutoCAD.
  4. One source for money. The cost estimate is recalculated on the server (headless LibreOffice) from one master workbook per scheme; specifications read the computed values, not template cells.
  5. Release gates. More than 1,300 automated tests, and a PDF gate that measures overlapping text, text outside the frame and text crossing lines — all three must be zero. The last full sweep of 118 PDFs came back clean.
  6. Nothing silently lost. Uploads that replace a file back up the old version first; server data is snapshotted before any correction.
  7. Helpers for the team. Two one-click Windows tools print estimate workbooks to PDF and assemble document packages without installing Python.
0overlapping text
0text outside the frame
0text crossing lines
PDF gate: every sheet is measured before release, and all three counters must read zero.

04Results and scale

  • In production for 72 tertiary blocks across 3 irrigation schemes in South Sumatra — about 3,390 ha, with roughly 109 km of canal and 555 gates in the cost estimates.
  • Technical specifications for all 72 blocks generated from the recomputed estimates; per-block and per-scheme final reports are being produced from the same numbers.
  • Gate schedule checked against 416 gate-structure drawings; gate prices rebuilt from an assembly-based unit-price analysis.
  • More than 250 commits between 17 August and 14 September 2026.
  • Origins: I started coding in 2024 — websites with WordPress and a few Python automations; a FastAPI web app and a headless section kernel followed in mid-2026, before this studio replaced them.

05Try it

Two small pieces of the pipeline, rebuilt in the browser on a fictitious 1.2 km canal: a cross-section viewer (existing ground, design section, water level, cut and fill) and the quantities-to-estimate recap. Change an earthwork quantity and every amount, subtotal and weight follows.

Cross-section viewer

Three surveyed stations of a fictitious earth canal: existing ground, the trapezoidal design section with small banks, the design water level, and the cut and fill between them.

Illustrative data
STA 0+000

Swipe sideways to see the whole chart.

existing grounddesign sectionwater levelcutfill
Cut area
Fill area
Bed elevation
Water level

Design basis (Manning, uniform flow): Q 0.45 m³/s · n 0.025 · S 0.0006 · b 0.80 m · side slope 1:1 · normal depth 0.639 m · V 0.489 m/s · Fr 0.235 · freeboard 0.40 m → design depth 1.05 m. Local datum; data fictitious.

Quantities → bill of quantities

A fictitious 1.2 km canal package. Earthwork quantities come from the cross-sections by average end area × length; edit them to see amounts, subtotals, weights and the total follow.

Illustrative data · fictitious prices (IDR)
Share of subtotal by group

Swipe sideways to see every column.

Illustrative bill of quantities
CodeItemUnitQuantityUnit priceAmountWeight

Weights are what the S-curve uses. VAT shown at 11% for illustration. Nothing here comes from a real project.

All interactive demos

06Stack

  • Python
  • FastAPI
  • HEC-RAS geometry
  • ezdxf
  • reportlab
  • PyMuPDF
  • openpyxl
  • LibreOffice (headless)
  • python-docx
  • Docker
  • Coolify (VPS)
  • pytest
Next case studySwamp embankments from raw survey sheetsA second input path for the canal studio