Calculate terrain-aware routes
Find a route between two points using elevation, slope, ruggedness, land cover, roads, and an optional mobility policy.
/api/pathfinding/Wait only for terrain and roads.
Pathfinding needs sources.elevation.ok, sources.land_cover.ok, andsources.roads.ok. These correspond to terrain_source_artifacts androad_artifacts. It does not need terrain_road_graph, display-tile phases, soil, population, or buildings.
path_start, path_end, and every GeoJSON coordinate use[longitude, latitude]. The API returns 400 if either endpoint lies outside the supplied area of operations.Submit one synchronous route request.
curl --request POST "$BLUE_API_URL/api/pathfinding/" \
--header "Authorization: Bearer $BLUE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"map_id": "'"$BLUE_MAP_ID"'",
"echelon": "team",
"formation": "column",
"boundary_shape": {
"type": "Polygon",
"coordinates": [[[-104.90, 38.80], [-104.70, 38.80], [-104.70, 38.95], [-104.90, 38.95], [-104.90, 38.80]]]
},
"path_start": [-104.86, 38.84],
"path_end": [-104.74, 38.91],
"pathfinding_weights": {
"roads": 5,
"land_cover": -5,
"terrain_ruggedness": -5
},
"mobility_config": {
"landcover_classes": {
"10": "severe",
"20": "restricted",
"30": "unrestricted",
"40": "unrestricted",
"50": "restricted",
"60": "unrestricted",
"70": "severe",
"80": "blocked",
"90": "severe",
"95": "severe",
"100": "unrestricted"
}
}
}'mobility_config is optional. The example shows the default land-cover policy so you can change individual ESA WorldCover classes. For example, change water (80) from blocked tosevere to allow a route through it at a high cost, or change wetland (90) fromsevere to blocked to make it impassable.
| API value | Routing behavior |
|---|---|
unrestricted | Open terrain with the lowest base cost. |
restricted | Traversable terrain with a higher base cost. |
severe | Severely restricted, but still traversable at a high cost. |
blocked | Impassable; the pathfinder will not cross the cell. |
- Default weights are
roads: 5,land_cover: -5, andterrain_ruggedness: -5. - Positive road weights prefer stronger road classes; negative land-cover and ruggedness weights penalize restricted terrain.
- Supplying
landcover_classesreplaces the complete default mapping. Include every land-cover code whose behavior you want to preserve or change. blocked_classescan optionally make every cell classified asrestrictedorsevereimpassable, regardless of which terrain input produced that classification.corridor_width_kmandpathfinding_weights.corridor_widthare accepted for client compatibility but are not used by the production v1 pathfinder.- A successful request also creates a
pathfindingmap layer namedGenerated Path.
Decode the GeoJSON strings in the first path.
The response is JSON, but each geometry field inside paths is itself a serialized GeoJSON string. Parse paths[0].path once more to obtain the WGS84 LineString feature.
{
"paths": [
{
"path": "{\"type\":\"Feature\",\"properties\":{},\"geometry\":{\"type\":\"LineString\",\"coordinates\":[[-104.86,38.84],[-104.74,38.91]]}}",
"canalizing_polygons": "{\"type\":\"FeatureCollection\",\"features\":[]}",
"overwatch_points": "{\"type\":\"FeatureCollection\",\"features\":[]}"
}
]
}canalizing_polygons and overwatch_points are currently empty FeatureCollections. The route is in path.Handle prerequisite and routing failures.
400Invalid route
An endpoint is outside the AO, blocked, invalid, or no route can be found.
422Source data missing
Terrain or road COG data is unavailable. Recheck the terrain job source fields.
404Map missing
The map ID is invalid or unavailable to the authenticated account.
200Route and layer ready
Decode the path and refresh pathfinding map layers if your client displays them.