Analysis
analyzeGeometry classifies an existing line: it segments the geometry by surface (paved, gravel, dirt, and so on), by way type (path, track, footway, and so on), and by slope angle. Every routing result already carries this analysis under route.analysis; call analyzeGeometry directly when you have a geometry from elsewhere, for example a GPX track or a user-drawn line, and want the same breakdown.
All coordinates are [longitude, latitude] in WGS 84.
Each activity routes on a profile tuned to its terrain and movement style. Directions availability varies: most activities support turn-by-turn routing, backcountry skiing is freehand-line only, and cycling activities are not yet available for routing. The GraphQL ActivitySlug enum uses the uppercase value; the Map Studio and Tile APIs use the lowercase, underscore-free wire form.
analyzeGeometry
Input
analyzeGeometry(input: AnalyzeGeometryInput!)
activityActivitySlug!
Activity to analyze for. Selects the profile used to interpret way and surface suitability.
coordinates[[Float!]!]!
Ordered list of [longitude, latitude] pairs forming the geometry.
Example
Response
GeometryAnalysis returns lists of segments plus the route-level advisories. Each segment references a range of the input coordinates by index, so you can map a classification back onto the exact part of the line it covers.
surfaceInfo[SurfaceInfo!]!
Surface-type segments. Each entry has fromIndex, toIndex, and a value of SurfaceType (for example ASPHALT, GRAVEL, DIRT).
waytypeInfo[WaytypeInfo!]!
Way-type segments. Each entry has fromIndex, toIndex, and a value of WaytypeType (for example PATH, TRACK, FOOTWAY).
slopeInfo[SlopeInfo!]!
Slope segments. Each entry has fromIndex, toIndex, and a value slope angle in degrees. Positive is uphill, negative is downhill.
advisoriesRouteAdvisories!
Any tollway or access-restricted way the geometry crosses, as the union over the whole line. The same shape directions and suggestions return — see hazards and avoidance.
The fromIndex and toIndex of each segment are inclusive indices into the coordinates array you sent. See routing for the same analysis attached to computed routes, and the playground for the full SurfaceType and WaytypeType value lists.