Measure Line Length
length_toolMeasure the total length of a line from coordinate pairs in kilometers, miles, meters, or feet to calculate drawn routes, paths, or boundaries without a routing API call or network access.
Instructions
Measure the total length of a line defined by a series of coordinates. Useful for measuring a drawn route, path, or boundary without a routing API call. Supports kilometers, miles, meters, and feet. Works offline without API calls.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"coordinates": "<coordinates>"
},
"name": "length_tool"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| units | No | Units for the length measurement | meters |
| coordinates | Yes | LineString coordinates as [longitude, latitude] pairs |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| units | Yes | Units of measurement | |
| length | Yes | Total length of the line | |
| num_coordinates | Yes | Number of coordinate points in the line |