Skip to content

Expiring flood polygons: stale, hidden marker, icon points - #12

Merged
chriselsen merged 1 commit into
mainfrom
fix/expiring-polygon-hidden-marker
Nov 17, 2026
Merged

chriselsen merged 1 commit into
mainfrom
fix/expiring-polygon-hidden-marker

Conversation

@chriselsen

Copy link
Copy Markdown
Contributor

Summary

CloudTAK (@tak-ps/node-cot >= 14.58.0, dfpc-coe/node-CoT#146) now converts a Polygon with a marker type (a-f-X-i-m-f) into a marker CoT with a <shape><polyline>. ATAK removes the polygon together with the marker at stale; a u-d-f drawing never expires. That already applies to this ETL. This PR handles the side effects, using what we validated on the avalanche ETL (TAK-NZ/etl-avalanche#21):

  • Stale: none of the polygons set stale, so node-cot's 20 s default applied and they would now vanish almost immediately. Inundation and basin polygons use the gauge forecast end, flash flood polygons use issue time + forecast period, significant events use the minimum end time. A missing or past end falls back to 24 h from the run.
  • Hidden marker: marker-color + marker-opacity: 0 (<color argb> alpha 0) so ATAK does not draw an unknown-type "?". The polygon has no icon: a valid usericon makes ATAK move the marker to another map group, which deletes the polygon it owns.
  • Icon points: flash flood and significant event polygons get a <id>-center point (flood icon in the polygon colour, same remarks/metadata) so they stay tappable. Inundation and basin polygons rely on their gauge point.
  • Tests for stale rules, centroid, icon point, and conversion of the polygon marker through CoTParser.from_geojson. Adds @tak-ps/node-cot as a devDependency.
  • npm audit: 0 vulnerabilities. Version 1.1.2.

Notes

  • In ATAK neither the polygon nor its invisible marker is tappable; the icon points are what you select. Deleting an icon point does not delete the polygon; it expires at stale.
  • The fallback of 24 h and the choice of end times are my picks, not validated against FloodHub behaviour. Please sanity check.
  • Needs CloudTAK with @tak-ps/node-cot >= 14.58.0.

Testing

npm test (11 pass), npm run lint, npm run build, npm audit (0).

CloudTAK (node-cot >= 14.58.0) turns the typed flood polygons into markers
with a shape/polyline, so ATAK removes them when the marker goes stale.
Set a real stale (they had none, so the 20 s default applied), hide the
marker (marker-opacity 0) so ATAK does not draw an unknown-type '?', and
add a -center icon point for flash flood and significant event polygons so
they stay tappable. Bump to 1.1.2.
@chriselsen
chriselsen merged commit 631161b into main Nov 17, 2026
1 check passed
@chriselsen
chriselsen deleted the fix/expiring-polygon-hidden-marker branch November 17, 2026 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant