Skip to content
GuidesPlaygroundDashboard

Look up elevation at one or more points

client.Elevation.Lookup(ctx, query) (*ElevationLookupResult, error)
GET/api/v1/elevation

Look up elevation at one or more points

ParametersExpand Collapse
query ElevationLookupParams
Lat param.Field[float64]optional

Latitude (single point)

Lng param.Field[float64]optional

Longitude (single point)

Locations param.Field[string]optional

Pipe-separated lng,lat pairs (batch)

ReturnsExpand Collapse
type ElevationLookupResult struct{…}

GeoJSON Point Feature with 3D coordinate [lng, lat, elevation] (RFC 7946 §3.1.1)

Coordinates GeoJsonGeometryCoordinatesUnion

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
type GeoJsonGeometryCoordinatesArray []float64
type GeoJsonGeometryCoordinatesArray [][]float64
type GeoJsonGeometryCoordinatesArray [][][]float64
type GeoJsonGeometryCoordinatesArray [][][][]float64
Type GeoJsonGeometryType
One of the following:
const GeoJsonGeometryTypePoint GeoJsonGeometryType = "Point"
const GeoJsonGeometryTypeLineString GeoJsonGeometryType = "LineString"
const GeoJsonGeometryTypePolygon GeoJsonGeometryType = "Polygon"
const GeoJsonGeometryTypeMultiPoint GeoJsonGeometryType = "MultiPoint"
const GeoJsonGeometryTypeMultiLineString GeoJsonGeometryType = "MultiLineString"
const GeoJsonGeometryTypeMultiPolygon GeoJsonGeometryType = "MultiPolygon"
Properties ElevationLookupResultProperties
ElevationM float64optional

Elevation in meters above mean sea level

Type ElevationLookupResultType

Look up elevation at one or more points

package main

import (
  "context"
  "fmt"

  "github.com/plazafyi/plaza-go"
  "github.com/plazafyi/plaza-go/option"
)

func main() {
  client := githubcomplazafyiplazago.NewClient(
    option.WithAPIKey("My API Key"),
  )
  elevationLookupResult, err := client.Elevation.Lookup(context.TODO(), githubcomplazafyiplazago.ElevationLookupParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", elevationLookupResult.Geometry)
}
Returns Examples