edge-stitch
See docs/reference/README.md for the MUST/SHOULD/MAY convention, and
docs/reference/shared.md for rules edge-stitch shares with other tools.
Inputs¶
edge-stitchMUST read the input and reproject it to EPSG:4326.edge-stitchMUST NOT coverage-clean the input before stitching: whatever seams or defects the input has are exactly what the stitch pass exists to close.
Stitching¶
edge-stitchMUST run one whole-tableST_CoverageCleanpass over the input, using a fixed snapping-distance-scale gap-closing width, not a shape-based heuristic.
Outputs¶
edge-stitch's final output MUST pass the hard gate indocs/reference/shared.md(no overlap; unlike other tools, an unfilled gap does not block export, seedocs/adr/0027).edge-stitchMUST export the final cleaned layer, and MUST NOT carry asource_filecolumn on it even if the input already had one (e.g. a re-stitchededge-mosaic/edge-matchoutput), silently dropping it (seedocs/adr/0087).edge-stitchMUST also export an issues report alongside it, using the shared schema indocs/reference/shared.md, listing every leftover gap wider thanSNAP_TOLERANCE, so a human can audit what may need review.area_m2,max_width_m, andthinness_ratioMUST be populated for each row; every other column MUST be null.edge-stitchMUST produce the issues report only when it has at least one row; when it would be empty, no file MUST be written (and a stale file from a previous run at that path MUST be removed).
Configuration (api.edge_stitch.stitch() / CLI)¶
edge-stitch's input role MAY span multiple already-tiled files, combined internally into one table before the clean pass. The CLI additionally accepts--input(repeatable and comma-separable) alongside the glob-capableINPUT_FILEpositional, matchingedge-mosaic's own--inputidiom.- With a single input file, the output path MUST default to that input
path with a
_stitchedsuffix. With multiple input files,output_pathMUST be given explicitly. The issues-report path MUST default to the output path with an_issuessuffix. edge-stitchMUST raiseFileExistsErrorif either output path already exists and overwriting wasn't requested.step, if given, MUST be one ofinputs,topo-clean,outputs; any other value MUST raiseValueError.edge-stitchMAY opt into cascading admin-hierarchy columns viafill_schema/--fill-schema, right after cleaning and before export.name_field/code_field/--name-field/--code-field(given together or both omitted; omitted falls back to structural auto-detection) anddepth_column/--depth-column(defaultadm_lvl) narrow it; all MUST raiseValueErrorif given withoutfill_schema=True.edge-stitchMUST raiseValueErrorifdepth_columnalready names an existing column whenfill_schemais set (seedocs/adr/0095).