Geography
Convierte un GeoJSON FeatureCollection en un SVG estático incrustable sin dependencia de tiles: agua/verdes/edificios/carreteras por clase al estilo OSM Carto, chinchetas POI etiquetadas clasificadas por amenity/shop/tourism, rutas LineString resaltadas con flechas de rumbo geodésico por segmento, barra de escala, retícula y atribución completa de OSM (© OpenStreetMap contributors, ODbL); geocodificación Nominatim opcional (≤5 consultas, con ritmo y User-Agent identificado según la política oficial).
Llama a esta herramienta desde tu código en tres lenguajes.
curl -X POST 'http://127.0.0.1:3003/es/api/tools/openstreetmap-nominatim-geojson-static-svg-map-renderer-with-styled-poi-icons-and-route-overlay' \
-H 'Content-Type: application/json' \
-d '{"geojsonInput":"{\n \"type\": \"FeatureCollection\",\n \"features\": [\n {\n \"type\": \"Feature\",\n \"properties\": {\n \"natural\": \"water\",\n \"name\": \"Cold River\"\n },\n \"geometry\": {\n \"type\": \"Polygon\",\n \"coordinates\": [\n [\n [\n -1.235,\n 52.632\n ],\n [\n -1.225,\n 52.636\n ],\n [\n -1.212,\n 52.633\n ],\n [\n -1.205,\n 52.637\n ],\n [\n -1.198,\n 52.634\n ],\n [\n -1.2,\n 52.63\n ],\n [\n -1.21,\n 52.628\n ],\n [\n -1.222,\n 52.63\n ],\n [\n -1.235,\n 52.632\n ]\n ]\n ]\n }\n },\n {\n \"type\": \"Feature\",\n \"properties\": {\n \"leisure\": \"park\",\n \"name\": \"Riverside Park\"\n },\n \"geometry\": {\n \"type\": \"Polygon\",\n \"coordinates\": [\n [\n [\n -1.232,\n 52.646\n ],\n [\n -1.218,\n 52.649\n ],\n [\n -1.21,\n 52.644\n ],\n [\n -1.222,\n 52.641\n ],\n [\n -1.232,\n 52.646\n ]\n ]\n ]\n }\n },\n {\n \"type\": \"Feature\",\n \"properties\": {\n \"landuse\": \"residential\"\n },\n \"geometry\": {\n \"type\": \"Polygon\",\n \"coordinates\": [\n [\n [\n -1.205,\n 52.648\n ],\n [\n -1.192,\n 52.65\n ],\n [\n -1.188,\n 52.642\n ],\n [\n -1.2,\n 52.64\n ],\n [\n -1.205,\n 52.648\n ]\n ]\n ]\n }\n },\n {\n \"type\": \"Feature\",\n \"properties\": {\n \"building\": \"yes\"\n },\n \"geometry\": {\n \"type\": \"Polygon\",\n \"coordinates\": [\n [\n [\n -1.203,\n 52.646\n ],\n [\n -1.199,\n 52.647\n ],\n [\n -1.197,\n 52.643\n ],\n [\n -1.201,\n 52.642\n ],\n [\n -1.203,\n 52.646\n ]\n ]\n ]\n }\n },\n {\n \"type\": \"Feature\",\n \"properties\": {\n \"building\": \"yes\"\n },\n \"geometry\": {\n \"type\": \"Polygon\",\n \"coordinates\": [\n [\n [\n -1.196,\n 52.646\n ],\n [\n -1.193,\n 52.647\n ],\n [\n -1.192,\n 52.644\n ],\n [\n -1.195,\n 52.643\n ],\n [\n -1.196,\n 52.646\n ]\n ]\n ]\n }\n },\n {\n \"type\": \"Feature\",\n \"properties\": {\n \"highway\": \"motorway\"\n },\n \"geometry\": {\n \"type\": \"LineString\",\n \"coordinates\": [\n [\n -1.235,\n 52.651\n ],\n [\n -1.215,\n 52.647\n ],\n [\n -1.198,\n 52.649\n ],\n [\n -1.19,\n 52.652\n ]\n ]\n }\n },\n {\n \"type\": \"Feature\",\n \"properties\": {\n \"highway\": \"residential\"\n },\n \"geometry\": {\n \"type\": \"LineString\",\n \"coordinates\": [\n [\n -1.213,\n 52.635\n ],\n [\n -1.206,\n 52.64\n ],\n [\n -1.198,\n 52.644\n ]\n ]\n }\n },\n {\n \"type\": \"Feature\",\n \"properties\": {\n \"name\": \"Ridge Trail\"\n },\n \"geometry\": {\n \"type\": \"LineString\",\n \"coordinates\": [\n [\n -1.23,\n 52.65\n ],\n [\n -1.222,\n 52.648\n ],\n [\n -1.216,\n 52.644\n ],\n [\n -1.208,\n 52.645\n ],\n [\n -1.201,\n 52.648\n ]\n ]\n }\n },\n {\n \"type\": \"Feature\",\n \"properties\": {\n \"amenity\": \"restaurant\",\n \"name\": \"Harbor Grill\"\n },\n \"geometry\": {\n \"type\": \"Point\",\n \"coordinates\": [\n -1.21,\n 52.647\n ]\n }\n },\n {\n \"type\": \"Feature\",\n \"properties\": {\n \"amenity\": \"cafe\",\n \"name\": \"Bean There\"\n },\n \"geometry\": {\n \"type\": \"Point\",\n \"coordinates\": [\n -1.2,\n 52.642\n ]\n }\n },\n {\n \"type\": \"Feature\",\n \"properties\": {\n \"tourism\": \"hotel\",\n \"name\": \"Lakeside Inn\"\n },\n \"geometry\": {\n \"type\": \"Point\",\n \"coordinates\": [\n -1.194,\n 52.646\n ]\n }\n },\n {\n \"type\": \"Feature\",\n \"properties\": {\n \"tourism\": \"viewpoint\",\n \"name\": \"Eagle Point\"\n },\n \"geometry\": {\n \"type\": \"Point\",\n \"coordinates\": [\n -1.226,\n 52.648\n ]\n }\n },\n {\n \"type\": \"Feature\",\n \"properties\": {\n \"amenity\": \"parking\"\n },\n \"geometry\": {\n \"type\": \"Point\",\n \"coordinates\": [\n -1.216,\n 52.641\n ]\n }\n },\n {\n \"type\": \"Feature\",\n \"properties\": {\n \"tourism\": \"attraction\",\n \"name\": \"Old Mill\"\n },\n \"geometry\": {\n \"type\": \"Point\",\n \"coordinates\": [\n -1.205,\n 52.634\n ]\n }\n }\n ]\n}","nominatimQueries":"","svgWidth":960,"svgHeight":640,"showLabels":true,"showBearingArrows":true,"showScaleBar":true,"showGraticule":false,"writeSvgFile":false}'Envía una petición POST con tus entradas en JSON. Los parámetros de tipo archivo requieren una subida previa.
POST http://127.0.0.1:3003/es/api/tools/openstreetmap-nominatim-geojson-static-svg-map-renderer-with-styled-poi-icons-and-route-overlay| Nombre | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| geojsonInput | textarea | Sí | — |
| nominatimQueries | text | No | — |
| svgWidth | number | No | — |
| svgHeight | number | No | — |
| showLabels | checkbox | No | — |
| showBearingArrows | checkbox | No | — |
| showScaleBar | checkbox | No | — |
| showGraticule | checkbox | No | — |
| writeSvgFile | checkbox | No | — |
Resultado HTML
{
"result": "<div>Processed HTML content</div>",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}Añade esta herramienta a tu servidor Model Context Protocol para que los agentes de IA puedan listarla y llamarla.
Añade este bloque a la configuración de tu cliente MCP:
{
"mcpServers": {
"elysiatools-openstreetmap-nominatim-geojson-static-svg-map-renderer-with-styled-poi-icons-and-route-overlay": {
"name": "openstreetmap-nominatim-geojson-static-svg-map-renderer-with-styled-poi-icons-and-route-overlay",
"description": "Convierte un GeoJSON FeatureCollection en un SVG estático incrustable sin dependencia de tiles: agua/verdes/edificios/carreteras por clase al estilo OSM Carto, chinchetas POI etiquetadas clasificadas por amenity/shop/tourism, rutas LineString resaltadas con flechas de rumbo geodésico por segmento, barra de escala, retícula y atribución completa de OSM (© OpenStreetMap contributors, ODbL); geocodificación Nominatim opcional (≤5 consultas, con ritmo y User-Agent identificado según la política oficial).",
"baseUrl": "http://127.0.0.1:3003/mcp/sse?toolId=openstreetmap-nominatim-geojson-static-svg-map-renderer-with-styled-poi-icons-and-route-overlay",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}Tras conectar al endpoint SSE, lista las herramientas expuestas:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoca la herramienta por su id; los argumentos se construyen a partir de sus parámetros:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "openstreetmap-nominatim-geojson-static-svg-map-renderer-with-styled-poi-icons-and-route-overlay",
"arguments": {
"geojsonInput": "{\n \"type\": \"FeatureCollection\",\n \"features\": [\n {\n \"type\": \"Feature\",\n \"properties\": {\n \"natural\": \"water\",\n \"name\": \"Cold River\"\n },\n \"geometry\": {\n \"type\": \"Polygon\",\n \"coordinates\": [\n [\n [\n -1.235,\n 52.632\n ],\n [\n -1.225,\n 52.636\n ],\n [\n -1.212,\n 52.633\n ],\n [\n -1.205,\n 52.637\n ],\n [\n -1.198,\n 52.634\n ],\n [\n -1.2,\n 52.63\n ],\n [\n -1.21,\n 52.628\n ],\n [\n -1.222,\n 52.63\n ],\n [\n -1.235,\n 52.632\n ]\n ]\n ]\n }\n },\n {\n \"type\": \"Feature\",\n \"properties\": {\n \"leisure\": \"park\",\n \"name\": \"Riverside Park\"\n },\n \"geometry\": {\n \"type\": \"Polygon\",\n \"coordinates\": [\n [\n [\n -1.232,\n 52.646\n ],\n [\n -1.218,\n 52.649\n ],\n [\n -1.21,\n 52.644\n ],\n [\n -1.222,\n 52.641\n ],\n [\n -1.232,\n 52.646\n ]\n ]\n ]\n }\n },\n {\n \"type\": \"Feature\",\n \"properties\": {\n \"landuse\": \"residential\"\n },\n \"geometry\": {\n \"type\": \"Polygon\",\n \"coordinates\": [\n [\n [\n -1.205,\n 52.648\n ],\n [\n -1.192,\n 52.65\n ],\n [\n -1.188,\n 52.642\n ],\n [\n -1.2,\n 52.64\n ],\n [\n -1.205,\n 52.648\n ]\n ]\n ]\n }\n },\n {\n \"type\": \"Feature\",\n \"properties\": {\n \"building\": \"yes\"\n },\n \"geometry\": {\n \"type\": \"Polygon\",\n \"coordinates\": [\n [\n [\n -1.203,\n 52.646\n ],\n [\n -1.199,\n 52.647\n ],\n [\n -1.197,\n 52.643\n ],\n [\n -1.201,\n 52.642\n ],\n [\n -1.203,\n 52.646\n ]\n ]\n ]\n }\n },\n {\n \"type\": \"Feature\",\n \"properties\": {\n \"building\": \"yes\"\n },\n \"geometry\": {\n \"type\": \"Polygon\",\n \"coordinates\": [\n [\n [\n -1.196,\n 52.646\n ],\n [\n -1.193,\n 52.647\n ],\n [\n -1.192,\n 52.644\n ],\n [\n -1.195,\n 52.643\n ],\n [\n -1.196,\n 52.646\n ]\n ]\n ]\n }\n },\n {\n \"type\": \"Feature\",\n \"properties\": {\n \"highway\": \"motorway\"\n },\n \"geometry\": {\n \"type\": \"LineString\",\n \"coordinates\": [\n [\n -1.235,\n 52.651\n ],\n [\n -1.215,\n 52.647\n ],\n [\n -1.198,\n 52.649\n ],\n [\n -1.19,\n 52.652\n ]\n ]\n }\n },\n {\n \"type\": \"Feature\",\n \"properties\": {\n \"highway\": \"residential\"\n },\n \"geometry\": {\n \"type\": \"LineString\",\n \"coordinates\": [\n [\n -1.213,\n 52.635\n ],\n [\n -1.206,\n 52.64\n ],\n [\n -1.198,\n 52.644\n ]\n ]\n }\n },\n {\n \"type\": \"Feature\",\n \"properties\": {\n \"name\": \"Ridge Trail\"\n },\n \"geometry\": {\n \"type\": \"LineString\",\n \"coordinates\": [\n [\n -1.23,\n 52.65\n ],\n [\n -1.222,\n 52.648\n ],\n [\n -1.216,\n 52.644\n ],\n [\n -1.208,\n 52.645\n ],\n [\n -1.201,\n 52.648\n ]\n ]\n }\n },\n {\n \"type\": \"Feature\",\n \"properties\": {\n \"amenity\": \"restaurant\",\n \"name\": \"Harbor Grill\"\n },\n \"geometry\": {\n \"type\": \"Point\",\n \"coordinates\": [\n -1.21,\n 52.647\n ]\n }\n },\n {\n \"type\": \"Feature\",\n \"properties\": {\n \"amenity\": \"cafe\",\n \"name\": \"Bean There\"\n },\n \"geometry\": {\n \"type\": \"Point\",\n \"coordinates\": [\n -1.2,\n 52.642\n ]\n }\n },\n {\n \"type\": \"Feature\",\n \"properties\": {\n \"tourism\": \"hotel\",\n \"name\": \"Lakeside Inn\"\n },\n \"geometry\": {\n \"type\": \"Point\",\n \"coordinates\": [\n -1.194,\n 52.646\n ]\n }\n },\n {\n \"type\": \"Feature\",\n \"properties\": {\n \"tourism\": \"viewpoint\",\n \"name\": \"Eagle Point\"\n },\n \"geometry\": {\n \"type\": \"Point\",\n \"coordinates\": [\n -1.226,\n 52.648\n ]\n }\n },\n {\n \"type\": \"Feature\",\n \"properties\": {\n \"amenity\": \"parking\"\n },\n \"geometry\": {\n \"type\": \"Point\",\n \"coordinates\": [\n -1.216,\n 52.641\n ]\n }\n },\n {\n \"type\": \"Feature\",\n \"properties\": {\n \"tourism\": \"attraction\",\n \"name\": \"Old Mill\"\n },\n \"geometry\": {\n \"type\": \"Point\",\n \"coordinates\": [\n -1.205,\n 52.634\n ]\n }\n }\n ]\n}",
"nominatimQueries": "",
"svgWidth": 960,
"svgHeight": 640,
"showLabels": true,
"showBearingArrows": true,
"showScaleBar": true,
"showGraticule": false,
"writeSvgFile": false
}
}
}¿Dudas o problemas? Contacta con [email protected]