Skip to content

Polygons

Polygons are named, typed regions drawn on the map that drive real behaviour in the rest of the system. Unlike flags (point markers), polygons bound areas — a geofence restricts where a drone can fly, a SAR polygon can seed a drone mission plan, a no-fly keeps operators out of regulated airspace.

The types

TypeStrokeFillPurpose
geofence#22c55e (green)rgba(34, 170, 68, 0.12)Keep-inside / stay-area. Drones must remain inside.
nofly#ef4444 (red)rgba(255, 68, 68, 0.18)Forbidden airspace. Drones cannot take off from or fly inside.
sar#22c55e (green)Search-and-rescue area. Drives the SAR grid generator in the planner.
search_gridAuto-generated coverage pattern inside a SAR or custom polygon. Rendered as a polyline overlay, not as a true polygon fill.

search_grid is technically a separate storage type but doesn’t support direct user drawing — it’s produced by the SAR grid generator applied to an existing polygon.

Drawing a polygon

  1. In the map tile, right-click anywhere to open the context menu.
  2. Pick Draw geofence / Draw no-fly / Draw SAR. The first vertex drops at the click point and the tile enters polygon-edit mode.
  3. Click more points to add vertices — each click extends the polygon edge. A rubber-band line shows the shape as it grows.
  4. Double-click the last vertex (or click the first vertex) to close.
  5. The polygon panel opens on the right with fields for:
    • Name — required.
    • Message / description — optional free-text.
    • Priority — low / medium / high.
    • Assigned team or asset — optional, for tasking.
  6. Click Save to commit to Firestore. The polygon now appears for every participant in real time.

Alternative entry point: the New polygon button in the tile header opens the polygon panel in “pick type” mode and waits for you to pick a type before accepting clicks.

Editing an existing polygon

Click any polygon edge to select it. The polygon enters edit mode with interactive vertex handles:

  • Drag a vertex (left-click + hold + drag) to move it. The polygon shape updates in real time for every connected participant.
  • Right-click a vertex to delete it. The polygon collapses to one fewer vertex — no confirmation, so be careful.
  • Midpoint insertion is not yet implemented. If you need to add a vertex, delete and redraw the polygon.

Click the polygon body (not an edge) to open the polygon panel for metadata edits (rename, change priority, reassign).

Click outside the polygon to deselect.

Who can edit

  • The user who created the polygon can edit or delete it.
  • A commander or org admin can edit/delete anyone’s polygon in the mission.
  • Team members with the polygon’s assigned-team scope get read-only view + the ability to trigger actions linked to it (e.g. start SAR-grid generation on a SAR polygon).

All edits emit a Firestore write; every participant sees the update within a second.

Visual stacking

If two polygons overlap:

  • They render in creation order (newer on top).
  • Each polygon’s fill has alpha 0.12-0.18 — multiple overlapping fills stack into a muddier combined colour. This is intentional so you can see both.

DJI dock auto-sync

If the mission has any DJI docks assigned, geofence and no-fly polygons are automatically synced to every assigned dock’s aircraft as a DJI Custom Flight Area file. The full flow:

  1. You draw (or edit) a geofence or no-fly polygon.
  2. A client-side service debounces polygon writes by 1.5 s (so drawing a multi-vertex polygon doesn’t trigger a sync on every single click).
  3. After the debounce settles, ARGUS packages all current geofences + no-flys into the DJI custom-flight-area format with an MD5 fingerprint, uploads it to S3 via presigned PUT, registers it with argus-api, and assigns it to each dock.
  4. argus-dji publishes the MQTT flight_areas_update service to each dock; the dock downloads and applies the new area file.
  5. From that point on the aircraft’s flight controller enforces the polygon — the drone physically cannot enter a no-fly or leave a geofence, even if the ARGUS app, Android gateway, and internet all disappear.

This is the third defence layer described under Geofence safety.

Empty-set behaviour: if you delete all your geofence and no-fly polygons, the sync still runs with a zero-length file. The dock receives it and clears its previous overrides — so deleting a polygon in ARGUS removes the restriction from the drone.

Docks in the mission without aircraft online: the sync is written; the dock will apply the areas on next aircraft boot.

Deleting a polygon

Click the polygon to select, then click the trash icon in the polygon panel. There’s a 5-second undo toast after deletion.

Known limitations

  • No hole polygons — can’t draw an exclusion zone inside a geofence. You’d need two separate polygons (outer geofence, inner no-fly).
  • No snap-to-grid — vertices snap only to where you click.
  • No import / export — polygons live in Firestore only. There’s no “import KML” button yet.
  • Midpoint vertex insertion — not implemented. Delete-and-redraw is the workaround.