Skip to content
GuidesBlogPlaygroundDashboard

Elements

Query features by spatial predicate, bounding box, or H3 cell
client.Elements.Query(ctx, query) (*FeatureCollection, error)
GET/api/v1/features
Query features by spatial predicate, bounding box, or H3 cell
client.Elements.QueryPost(ctx, body) (*FeatureCollection, error)
POST/api/v1/features
Get feature by type and ID
client.Elements.Get(ctx, type_, id) (*GeoJsonFeature, error)
GET/api/v1/features/{type}/{id}
Get feature by type and ID
client.Elements.Lookup(ctx) (*GeoJsonFeature, error)
POST/api/v1/features/lookup
Fetch multiple features by type and ID
client.Elements.Batch(ctx, body) (*FeatureCollection, error)
POST/api/v1/features/batch
Find features near a geographic point
client.Elements.Nearby(ctx, query) (*FeatureCollection, error)
GET/api/v1/features/nearby
Find features near a geographic point
client.Elements.NearbyPost(ctx, body) (*FeatureCollection, error)
POST/api/v1/features/nearby
ModelsExpand Collapse
type BatchRequest struct{…}

Fetch multiple OSM elements by their type and ID in a single request. Maximum 100 elements per batch.

Elements []BatchRequestElement

Array of element references to fetch

ID int64

OSM element ID

Type BatchRequestElementsType

OSM element type

One of the following:
const BatchRequestElementsTypeNode BatchRequestElementsType = "node"
const BatchRequestElementsTypeWay BatchRequestElementsType = "way"
const BatchRequestElementsTypeRelation BatchRequestElementsType = "relation"