identify_location
Retrieve geographic features and data layers for any Swiss location using coordinates. Access transport, weather, geodata, and other open datasets without API keys.
Instructions
Identify geographic features and data layers at a specific Swiss location
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lat | Yes | Latitude (WGS84) | |
| lng | Yes | Longitude (WGS84) | |
| layers | No | Comma-separated layer ids (default: all visible) |
Implementation Reference
- src/modules/geodata.ts:242-262 (handler)The handler implementation for the identify_location tool in src/modules/geodata.ts.
case "identify_location": { const lat = args.lat as number; const lng = args.lng as number; const extent = `${lng - 0.001},${lat - 0.001},${lng + 0.001},${lat + 0.001}`; const layers = args.layers ? `all:${args.layers}` : "all"; const url = buildUrl(`${BASE}/rest/services/all/MapServer/identify`, { geometry: `${lng},${lat}`, geometryType: "esriGeometryPoint", layers, mapExtent: extent, imageDisplay: "500,500,96", tolerance: 5, sr: 4326, returnGeometry: false, }); const data = await fetchJSON<IdentifyResponse>(url); return JSON.stringify({ count: data.results.length, results: data.results.slice(0, 20).map(slimIdentifyResult), }); } - src/modules/geodata.ts:139-150 (schema)The tool registration and input schema for identify_location.
name: "identify_location", description: "Identify geographic features and data layers at a specific Swiss location", inputSchema: { type: "object", required: ["lat", "lng"], properties: { lat: { type: "number", description: "Latitude (WGS84)" }, lng: { type: "number", description: "Longitude (WGS84)" }, layers: { type: "string", description: "Comma-separated layer ids (default: all visible)" }, }, }, },