Docs / geometry tools

Geometry tools for agents
and spatial workflows.

DaedalMap exposes the shared geography spine through MCP tools: point resolution, boundary lookup, hierarchy inspection, and weighted conversion between administrative places and side-chain shapes such as ZCTAs and tribal areas.

The geometry spine

The main geography model is the administrative loc_id spine. Countries, states, counties, tracts, and block groups stack into one stable hierarchy. Packs use that same key, so a tool result can be joined to data rows without rebuilding geography logic in each workflow.

Some useful shapes do not fit cleanly inside that hierarchy. ZCTAs, tribal areas, watersheds, forests, parks, building footprints, and other overlays are side-chain geometry families. They overlap the spine rather than nesting perfectly inside it.

Core MCP tools

These free geography tools resolve locations on the same spine used by every published pack.

ToolInputReturns
resolve_point Latitude and longitude Deepest matched loc_id, country, and admin chain
get_boundary loc_id Bounding box, centroid, and optional full boundary polygon
loc_id_hierarchy loc_id Parent, ancestors, and child summary by admin level
loc_id_info loc_id Name, admin level, parent, centroid, bbox, and child counts

Call them through MCP

Use the umbrella MCP endpoint for all tools, or the geography facade when you only want geography utilities.

POST https://app.daedalmap.com/mcp
POST https://app.daedalmap.com/mcp/geography

MCP calls use a JSON-RPC envelope. Put the tool name in params.name and the tool input in params.arguments.

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "sidechain_to_admin",
    "arguments": {
      "source_family": "overlay_zcta",
      "source_loc_id": "10001",
      "target_admin_level": "tract",
      "limit": 10,
      "request_id": "bridge-zcta-10001-tract-001"
    }
  }
}

Point to loc_id

Use resolve_point when you have coordinates from a map click, field record, sensor, asset, or event feed. The response gives the deepest known match plus the broader chain, so the caller can use the same point at county, state, or country scope.

{
  "tool": "resolve_point",
  "arguments": {
    "lat": 40.7484,
    "lon": -73.9857
  }
}

loc_id to geometry

Use get_boundary when you already have a loc_id and need map extent, clipping geometry, or a display boundary. The default response stays small with bbox and centroid. Set include_polygon only when the full perimeter is needed.

{
  "tool": "get_boundary",
  "arguments": {
    "loc_id": "USA-NY-061",
    "include_polygon": false
  }
}

Hierarchy and metadata

loc_id_hierarchy is for walking the spine. It answers questions such as "what county contains this tract?" and "what child levels exist under this place?" loc_id_info is the compact record lookup when the caller needs name, level, parent, bbox, or centroid for one id.

Side-chain bridges

Side-chain bridge tools convert between unusual shapes and administrative loc_id values using measured polygon overlap. They do not guess from a centroid when an area spans multiple places. They return the primary match and the ranked overlap list.

The USA bridge set covers overlay_zcta and overlay_tribal against admin_0 through admin_4. That means country, state, county, tract, and block group outputs are available from the same contract.

Side-chain to admin

Use sidechain_to_admin when the input is a side-chain geometry id and the output should be an administrative level. This is the ZIP/ZCTA-to-tract pattern, but the tool is not ZIP-specific.

{
  "tool": "sidechain_to_admin",
  "arguments": {
    "source_family": "overlay_zcta",
    "source_loc_id": "USA-Z-10001",
    "target_admin_level": "admin_3",
    "limit": 10
  }
}

The response includes primary_match, source_area_share, target_area_share, and overlaps. For a ZCTA that crosses several tracts, the caller can use the top match for a simple answer or the overlap list for a weighted allocation.

Admin to side-chain

Use admin_to_sidechain when the input is a canonical administrative loc_id and the output should be the overlapping side-chain shapes. This answers questions such as "which ZCTAs overlap this block group?" or "which tribal areas overlap this county?"

{
  "tool": "admin_to_sidechain",
  "arguments": {
    "target_loc_id": "USA-NY-061-009903-2",
    "source_family": "overlay_zcta",
    "target_admin_level": "admin_4",
    "limit": 10
  }
}

Reading overlap shares

Bridge results carry two percentages because the direction matters. source_area_share answers "how much of the side-chain shape falls inside this admin place?" target_area_share answers "how much of the admin place is covered by this side-chain shape?"

FieldUse it for
source_area_share Choosing the best admin match for a ZCTA, tribal area, or other side-chain polygon
target_area_share Choosing the best side-chain match for a tract, county, or block group
is_primary The largest source-area match for the side-chain input
overlaps The ranked list to use for weighted allocation or transparent secondary matches

ZIP codes and ZCTAs

The bridge uses Census ZCTAs, not live USPS delivery ZIP routes. ZCTAs are polygon approximations that work well for Census-aligned analysis, site selection, demographics, market research, and bulk enrichment. For mail-delivery operations, keep the USPS distinction visible in the output.

Workflow patterns

  • Map click: call resolve_point, keep the returned loc_id, then query packs with filters.region_ids.
  • Boundary display: call get_boundary with include_polygon only for map rendering or exact clipping.
  • ZIP enrichment: normalize ZIP-like inputs to ZCTA ids, call sidechain_to_admin, then join demographics or pack metrics at the requested admin level.
  • Reverse lookup: call admin_to_sidechain to find overlapping ZCTAs or tribal areas for an existing loc_id.