The InSAR CSV handoff: where good stacks become bad deliverables
Published · about 10 min read
Most post-processing attention goes to the parts of an InSAR workflow that feel like science: the interferogram network, the atmospheric correction, the unwrapping, the reference point. The moment that most often damages a deliverable is much less glamorous. It is the export of a finished stack to a comma-separated file, followed by somebody opening that file in a spreadsheet, joining it to a GIS layer and quoting a number in a report. A CSV is a remarkably fragile container for a measurement that took a satellite, a processor and several weeks to produce.
This article is about that boundary. It looks at three failure modes that are pure formatting, one that is pure metadata, and the small set of habits that make a table auditable. The examples use a North American corridor workflow — WGS 84 geographic coordinates, a UTM zone 10N agency deliverable, QGIS and GDAL — because that is the toolchain most English-language monitoring teams actually hand off to. The arithmetic is universal; the failure modes are not exotic.
Why eight-digit dates are worse than they look
MintPy writes acquisition dates compactly. An epoch is 20190101, and a pair label
may be 20190101_20200101. To a human these are obviously dates. To software they are
eight-digit integers, or strings that happen to be numeric, or — if the file was opened in Excel
and saved again — a serial number with a completely different meaning. The failure is rarely
dramatic. A sorting operation that treats the column as text still works, because ISO-like compact
dates sort lexicographically in the right order. The damage appears when a spreadsheet applies a
date format, when a pandas read infers an integer dtype, or when a range label is split on a
delimiter that also appears in the data.
Normalising to YYYY-MM-DD is therefore not cosmetic; it is what makes a
chronological join well defined. A defensible normaliser should also validate the calendar.
20190230 is not 2 March by any reasonable rule, and silently rolling it forward
invents an acquisition. The honest behaviour is to leave the ISO cell blank and keep the row, so
the analyst can see exactly which inputs need attention. Our own kernel takes the first segment of
a REF_DATE_DATE range, which is the reference epoch of the pair, and rejects
impossible month and day values including leap-year mistakes.
The decimal separator that moves a point off the continent
A longitude written as -121,4832 is unambiguous to a European analyst and
ambiguous to a parser. If the comma is interpreted as a thousands separator the value becomes
−1214832, which is not a longitude at all. If the whole column is interpreted as text, a spatial
join silently drops the row. Either failure is easy to miss because the point count changes by a
handful in a table of thousands.
The fix is a column-level decision. Parsers that decide per cell produce a column where some rows are degrees and others are nonsense, which is worse than a uniformly wrong column because it is harder to spot. Decide once for the whole field, record the decision, and treat any cell that breaks the pattern as non-numeric with a visible note. The same discipline applies to the delimiter: semicolon, tab, pipe and comma all appear in real exports, and the choice should be made from the stability of the field count across several rows rather than from the first line.
Marking an outlier is not the same as finding one
Interquartile range is a useful screen precisely because it makes no assumptions about the
shape of a distribution beyond having a middle. Compute Q1 and Q3, form the fence
[Q1 − k·IQR, Q3 + k·IQR], mark what lies outside. With k = 1.5 the
screen is deliberately sensitive; with k = 3.0 it isolates only extreme tails. A
robust implementation ignores non-finite values and declines to flag anything at all when fewer
than four valid numbers are available.
None of that distinguishes a genuine event from a processing error. An unwrapping mistake, a co-seismic step, a pumping-well cone and a real sinkhole all produce a single value far from the median. What separates them is spatial coherence and site history, neither of which lives in a velocity column. This is why the flag should be an extra column and not a filter. In a mining compliance submission or a state DOT corridor report, the reviewer's first question about a suspicious point is "what did you do with it", and the only defensible answer is an explicit decision you can show. A table where rows have quietly vanished cannot answer it.
There is a second, subtler failure: bimodality. A profile crossing two geological units, an aquifer boundary or a lease boundary will have two populations. A fence built across both marks the smaller population wholesale, and the analyst then "cleans" away real differential settlement. Stratify first, screen second.
A CSV has nowhere to store a coordinate reference system
The most consequential handoff error is not in the table at all. A CSV of longitudes and latitudes carries no CRS declaration. QGIS will ask you to choose one; GDAL will use the one you give it; a colleague will assume the one their last project used. WGS 84 geographic degrees (EPSG:4326) are the usual default for a MintPy point export, but "usual" is not a specification, and a UTM deliverable such as EPSG:32610 requires an actual transformation.
The reproducible route is a VRT that declares the geometry columns and the source SRS, then an
explicit ogr2ogr -t_srs with the target. Verify the resulting extent with
ogrinfo -so before anyone draws a map. Where an agency requires a NAD83 realisation,
use the appropriate transformation pipeline and write down which one; relabelling a layer's CRS
without moving the coordinates is the single most common way to produce a beautifully rendered,
completely misplaced deformation map.
What the KML is for, and what it is not
A point KML is an excellent triage artifact. It opens immediately in Google Earth or QGIS, it colours points by velocity bucket, and it lets a project manager see where the extreme values sit relative to a road alignment or a lease boundary without installing anything. It is not a deliverable raster, it does not preserve a CRS in any meaningful sense, and it should not be used for measurement. A KML writer that skips rows with non-numeric coordinates is being fail-closed, not losing data: a Placemark without a coordinate is invalid. If your KML has fewer points than your CSV, look at the quality note first, not at the colour ramp.
A handoff routine that survives review
Keep the raw export, unchanged, as an archive file. Produce one cleaned table with standard column names, ISO dates and an explicit flag column; never overwrite the archive. Record four things in the delivery note: the source dataset and export command, the delimiter and decimal decisions the parser made, the source CRS and the transformation pipeline, and the disposition of every flagged row. Then verify the layer extent in a GIS before the first map is issued. This is perhaps twenty minutes of work on a normal project, and it converts a fragile text file into something a third party can reproduce.
The broader lesson is that formatting is part of the measurement chain. A velocity that has been misparsed is not a slightly worse velocity; it is a different quantity wearing the same units. Teams that treat the CSV handoff as a real, checkable step stop discovering these problems in peer review, which is the most expensive place to find them.
| Handoff failure | What a reader sees | Where it surfaces | Fix that survives review |
|---|---|---|---|
| Compact dates as integers | 20190101 sorts before 20181231 in some tools, or becomes a serial date | Time-series plot, annual reporting window | Convert to ISO 8601 and keep the original column in an archive copy |
| Decimal comma in a longitude column | Point lands thousands of kilometres away, or is dropped as non-numeric | QGIS point layer, KML, spatial join | Decide the convention per column and report it in the quality note |
| Undeclared velocity spike | Mean and classification shift; map colour ramp saturates | Screening report, hazard class | Mark with an explicit flag column, retain the row, adjudicate against coherence |
| CRS assumed rather than declared | Layer extent nonsense, or a subtly shifted corridor alignment | GIS handoff, agency deliverable | State EPSG:4326 on input, transform with a recorded PROJ pipeline, verify extent |
| Silent row deletion | Point count in the report no longer matches the source stack | Audit, peer review, legal discovery | Keep every row; make exclusion an explicit, documented option |
Thresholds and behaviour quoted from this site's CSV cleaning kernel: default IQR coefficient k = 1.5, minimum four finite values before any flag is issued, KML velocity buckets at −15, −3, 3 and 15 mm/yr. Coordinates in the worked example are synthetic and use WGS 84 geographic degrees; EPSG:32610 is WGS 84 / UTM zone 10N.
Frequently asked questions
- Why not just open the MintPy CSV in Excel and fix it by hand?
- Hand editing is fine for a five-point check, but it destroys reproducibility. Every manual change is invisible to the next reader, and spreadsheet auto-typing can convert a compact date or a decimal-comma longitude before you notice. A scripted normaliser produces the same output from the same input every time, records the decisions it made and keeps the original file intact.
- Is ISO 8601 really necessary if compact dates sort correctly?
- For sorting, compact YYYYMMDD is already lexicographically ordered. The problem is everything else: date arithmetic, joins to a GNSS series, libraries that infer an integer dtype, and spreadsheet re-saves that convert the field to a serial number. ISO 8601 removes the ambiguity and makes the column self-describing to every downstream tool.
- Should I use 1.5 or 3.0 for the IQR coefficient?
- Use 1.5 when you want a sensitive triage list you will inspect row by row, and 3.0 when you only want extreme tails. Neither is a correctness threshold. Because the flag never deletes a row by default, starting sensitive is usually safer: an overlooked outlier is more costly than an extra few minutes of adjudication.
- How do I tell a real settlement spike from an unwrapping error?
- Spatially. Open the flagged points over the coherence layer and look at their neighbours. A real event is coherent across a cluster with a plausible pattern such as a bowl edge or a scarp; an unwrapping error is typically isolated or speckled, often at a decorrelation boundary, and persists as an offset in every later epoch. Compare against the site history and any available GNSS or levelling before deciding.
- What CRS should I declare for a MintPy point export?
- Declare what the export actually contains, which for longitude and latitude columns is normally WGS 84 geographic degrees, EPSG:4326. Do not declare EPSG:32610 for those same numbers: that is a projected system in metres. Transform with an explicit pipeline such as ogr2ogr -t_srs EPSG:32610 and verify the output extent. If your agency requires a NAD83 realisation, choose the appropriate transformation and record it.
- Can the cleaner fix a wrong sign or a bad reference point?
- No. A univariate screen cannot see a systematic sign error, an atmospheric ramp or a field tied to a moving reference point; all of those can look perfectly well behaved. Those are interpretation problems that need the sign-convention audit, the error budget and ground truth. Formatting cleanup is a prerequisite for that work, not a substitute for it.
- Does a KML point layer count as a GIS deliverable?
- It counts as a review artifact. KML is convenient for visual triage in Google Earth or QGIS, but it is not a measured raster, it carries no meaningful CRS declaration and it is a poor basis for quantitative comparison. Use it to locate and discuss flagged points, then issue the authoritative data as CSV plus a properly georeferenced raster or geopackage.