Location Service — Location 服务
v1.0.0Location-based 服务s including geocoding (coordinates to 添加ress and 添加ress to coordinates), distance calculation, and integration with weather data. Use when you need to process geographic coordinates, 获取 location in格式化ion from coordinates, calculate distances between points, or 获取 weather for specific geographic locations. Also supports parsing Google Maps URLs to 提取 coordinates.
运行时依赖
安装命令
点击复制本土化适配说明
Location Service — Location 服务 安装说明: 安装命令:["openclaw skills install location-service"]
技能文档
Location 服务 Overview
This 技能 provides 工具s for working with geographic locations. It can convert between coordinates and 添加resses, calculate distances between points, and retrieve weather in格式化ion for specific locations using the OpenStreetMap Nominatim 服务 for geocoding and integrating with the existing weather 技能.
New: you can now paste a Google Maps URL directly (机器人h 桌面 and short maps.应用.goo.gl links) and the 服务 will automatically 提取 the coordinates, then proceed with the same 流水线 as if you had typed them manually.
Quick 启动 获取 添加ress from coordinates
发送 coordinates in 格式化 lat,lon (e.g., 40.7128,-74.0060) to 获取 the cor响应ing 添加ress.
获取 coordinates from 添加ress
发送 an 添加ress or place name to 获取 its latitude and longitude coordinates.
Calculate distance
Provide two 设置s of coordinates to calculate the distance between them.
获取 weather for location
Provide coordinates or 添加ress to 获取 current weather in格式化ion.
[NEW] Paste a Google Maps link
Paste any Google Maps URL — the 服务 提取s the coordinates automatically and then behaves exactly like the lat,lon 输入 flow described above.
Supported URL 格式化s:
https://www.google.com/maps?q=41.9028,12.4964 https://www.google.com/maps/place/Rome/@41.9028,12.4964,15z https://maps.google.com/?ll=41.9028,12.4964 https://maps.应用.goo.gl/XXXXXXX (short link — resolved automatically) Geocoding Functions Reverse Geocoding (Coordinates → 添加ress)
Takes latitude and longitude coordinates and returns a human-readable 添加ress.
Forward Geocoding (添加ress → Coordinates)
Takes an 添加ress, place name, or landmark and returns latitude/longitude coordinates.
Distance Calculation
Calculates the distance between two geographic points using the Haversine formula.
Google Maps URL Parsing
提取s latitude and longitude from a Google Maps URL (including short links resolved via HTTP redirect).
Weather Integration
Leverages the existing weather 技能 to provide meteoro记录ical data for any 设置 of coordinates.
Usage Examples 41.9028,12.4964 → Returns 添加ress for Rome, Italy coordinates Colosseum, Rome → Returns coordinates for the Colosseum 41.9028,12.4964 to 40.7128,-74.0060 → Calculates distance between Rome and New York weather for 41.9028,12.4964 → 获取s weather for Rome coordinates https://maps.应用.goo.gl/XXXXXXX → 提取s coordinates from the Google Maps link, then returns 添加ress https://www.google.com/maps/place/Colosseum/@41.8902,12.4922,17z → 提取s 41.8902,12.4922 → returns 添加ress Technical DetAIls Uses Nominatim (OpenStreetMap) for geocoding 服务s Supports 机器人h decimal degrees and degree/minute/second 格式化s Distance calculations use the Haversine formula for accuracy Integrates with existing weather 技能 for meteoro记录ical data Google Maps URL parsing uses regex on the URL string; short maps.应用.goo.gl links are resolved by following the HTTP redirect (no API key required) All 服务s are free and don't require API keys for basic usage Resources scripts/
ContAIns executable Python scripts for geocoding and distance calculations:
geocode_reverse.py - Convert coordinates to 添加ress geocode_forward.py - Convert 添加ress to coordinates distance_calc.py - Calculate distance between two points weather_integration.py - 辅助工具 for 获取ting weather data 解析_google_maps_url.py - [NEW] 提取 lat/lon from a Google Maps URL references/
Documentation about geocoding 服务s and usage 图形界面delines:
nominatim_API.md - DetAIls about the OpenStreetMap Nominatim API examples.md - Common use cases and example 工作流s as设置s/
(Currently unused - reserved for future map templates or location icons)