Get Geometry Drawn on the Map
gis_get_drawn_geometryGet the geometry you drew and saved on the map, with validated GeoJSON ready for flood zone screening and waterway analysis.
Instructions
Retrieve the geometry a user drew and saved on the interactive map.
Call this after gis_open_map once the user has drawn a shape and clicked "Save" on the map page. Geometry stored by the map is already validated and normalized (WGS84, closed rings). The returned "geometry" string can be passed directly to nfhl_screen_flood_zone, hydro_find_waterways, and other geometry-accepting GIS tools.
Use when: "I drew a shape, get it", or wired to the "Load drawn geometry" button inside the gis_open_map app.
session_id handling:
If you know the exact id from the latest gis_open_map result, pass it.
If you don't have it (e.g. a later turn), OMIT session_id entirely and the most recently saved geometry is returned. Never pass a placeholder like "default" — that will fail.
Returns when a shape has been saved: { "ready": true, "session_id": str, # the resolved session id "geometry": str, # compact GeoJSON string, ready to paste downstream "summary": { geo_type, crs_epsg, vertex_count, part_count, bbox, ... } }
Returns when nothing has been saved yet: { "ready": false, "message": "No geometry saved yet ..." }
Error responses:
{"ready": false, "error": "Unknown or expired session ..."} — bad session_id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | No | The draw session id returned by gis_open_map. Optional: if omitted (or if you don't have the exact id), the most recently drawn-and-saved geometry is returned. Prefer passing the exact session_id from the most recent gis_open_map result when you have it. Do NOT invent a value like 'default' — leave it unset instead. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||