Longitud de un recorrido
geo-path-lengthCalcula la longitud total de una ruta por varios puntos y distancia por tramo. Cuándo: hay que calcular coordenadas, distancias, rumbos o áreas a partir de puntos dados. No para: calcular la distancia ortodrómica entre dos puntos (geo-haversine). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). Determinista: la misma entrada da la misma salida. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.
EN: Computes the total great-circle length of a path through up to 100,000 points, with per-segment distances (first 1,000). When: coordinates, distances, bearings or areas have to be computed from given points. Not for: computing the great-circle distance between two lat/lon points on a spherical Earth (geo-haversine). Side effects: none (read-only, no network access, no stored state). Deterministic: the same input gives the same output. Limits: JSON input up to 64 KB, 1 s per call, result up to 1 MB.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| unit | No | Distance unit (optional; one of: m, km, mi, nmi, ft; default "km"). | km |
| points | Yes | Points in order (array of object; required; at least 2 items). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| unit | No | ||
| total | No | ||
| segments | No |