Skip to content

Smart Annotations

Click the ๐Ÿ’ฌ icon in the Tool Ribbon to open the Smart Annotations panel. Annotations let you flag locations and features on the map, record field observations, organize work into named collections, and dispatch each annotation โ€” or a whole batch โ€” to the AI-Hydro agent for analysis.


Drawing an Annotation

Three geometry types are available:

Button Geometry
๐Ÿ“ Pin Single point โ€” gauges, outlets, sample sites
โฌ  Poly Polygon โ€” catchment outlines, flood extents
ใ€ฐ Line Polyline โ€” reach segments, roads, transects

Click the button, draw on the map (single click for a pin; click vertices then double-click to finish for poly/line), and the annotation is saved immediately as a compact card in the panel.


Annotation Card

Each annotation shows a collapsed card with its colour swatch, geometry type, name, and quick actions. Click โ–ผ to expand the full editor.

Expanded card fields

Field Purpose
Name Editable inline label (default: Annotation N)
๐Ÿ““ My Notes Your field observations โ€” sent to the agent as background context
๐Ÿค– AI Prompt An explicit instruction for the agent (e.g. "Delineate the watershed at this point"). Leave blank to use the smart default based on your notes.
Tags Comma-separated keywords for filtering
Status new ยท active ยท complete ยท archived
Priority low ยท medium ยท high ยท critical
Colour HTML colour picker โ€” the pin/polygon on the map updates immediately

Quick actions (collapsed card)

Button Action
๐Ÿ“ Fly to Zoom the map to the annotation's bounding box
โœจ Ask Agent Send this annotation to the AI agent
๐Ÿ—‘๏ธ Delete Remove the annotation (no undo)

Asking the Agent

Click โœจ Ask Agent on any card. The agent receives:

  • The geometry (coordinates / polygon vertices)
  • Your My Notes text as background context
  • The AI Prompt as the explicit instruction (or a smart default if blank)
  • The list of currently visible layers and their names

The agent's response appears in the chat panel. Typical workflows:

  • "Delineate the watershed at this outlet" โ†’ delineate_watershed is called and the boundary is pushed back to the map automatically
  • "What land cover dominates this polygon?" โ†’ agent fetches NLCD and summarizes by class
  • "Flag if this reach has upstream dams" โ†’ agent queries the NID API

Collections

Collections group related annotations into named tabs โ€” one field visit, one sub-basin, one project phase.

Creating and managing collections

Action How
+ Collection Click the button above the tab row to create a new collection
Assign annotation In the expanded card, click the collection name buttons under "Collections"
Switch collection Click the tab at the top of the panel
Rename Double-click the tab label
Delete Click โœ• on the tab (annotations move to the default collection)

The All tab always shows every annotation regardless of collection.

Batch analysis

While viewing any collection tab, click โœจ Batch Ask Agent to send the entire collection to the agent in a single request. The agent receives a summary table of all annotations (coordinates, geometry type, notes, AI prompt) and produces a consolidated analysis โ€” useful for comparing multiple potential outlet points, or reviewing all flagged reaches before fieldwork.


Exporting Annotations

Click โฌ‡ Export โ–พ to choose a format:

Format Use case
๐Ÿ“Š CSV Spreadsheet / database import
๐ŸŒ GeoJSON Web mapping, geopandas, QGIS
๐ŸŒ KML Google Earth, field GPS apps
๐Ÿ“ฆ Shapefile (.zip) QGIS, ArcGIS, most desktop GIS
๐Ÿ“ Markdown report Meeting notes, field reports, documentation

Export targets the current collection tab (or all annotations when on the All tab). The filename includes today's date.


Persistence

Annotations are saved to localStorage under the key aihydro.map.annotations.v1. They survive panel close, VS Code restart, and extension update โ€” nothing is lost unless you explicitly delete or clear.

Tip: Export to GeoJSON periodically as a backup, especially before long batch analysis sessions.


Tips & Workflows

  • Place a ๐Ÿ“ Pin at each potential outlet point before running batch delineation โ€” the batch prompt sends all coordinates at once, letting the agent compare drainage areas in a single reply
  • Use Priority: critical for sites that need field verification first; filter by priority in the search bar
  • Assign Tags like #dryseason or #flooding then filter the panel to that tag when reviewing a specific phenomenon
  • The ๐ŸŒ KML export is ready for import into Google Earth or any field data app that accepts KML