Get started

Analysis & terrain

Geometry analysis

The analyzeGeometry query of the Data API. Every request is a POST to https://data.mountaya.com/graphql with a publishable key and a session token: see Authentication.

analyzeGeometry

POST
/graphql

Analyze surface and way type of an existing geometry. An analysis the routing engine failed on in part is answered as analysis states.

Arguments

input

AnalyzeGeometryInput!

required

The geometry to analyze and the activity to analyze it for.

Returns

analyzeGeometry

AnalyzeGeometryResult!

required

The result of analyzeGeometry.

Errors A field the API refuses is answered 200, its entry in errors beside the data that resolved. See Errors.

curl https://data.mountaya.com/graphql \
  -H "X-API-Key: pk_your_publishable_key" \
  -H "X-Session-Token: sess_your_session_token" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "query AnalyzeGeometry($input: AnalyzeGeometryInput!) { analyzeGeometry(input: $input) { analysis { elevations } duration } }",
    "variables": {
      "input": {
        "activity": "HIKING_AND_TRAIL",
        "coordinates": [
          [6.91692, 45.93976],
          [6.91732, 45.93898],
          [6.91722, 45.93799],
          [6.91713, 45.93745],
          [6.91787, 45.93614]
        ]
      }
    }
  }'