Terranode icon

Terranode

Spatial queries via the Terranode Geospatial API

Find Nearest

AI-generated

Summary

Find nearest features to a coordinate.

Inputs

  • datasetId (required) — The dataset to query against
  • lat (required) — Latitude in decimal degrees (WGS84)
  • lng (required) — Longitude in decimal degrees (WGS84)
  • n — Number of nearest features to return (max 20)
  • radius — Maximum search radius in meters (0 = unlimited, max 500000)

Output shape

Each input item produces one output item with json merged from the original item and the API response from GET /nearest, plus pairedItem referencing the input index.

Returns an array of output items; pairedItem maps back to the corresponding input item index.

Examples

Example 1: Query the nearest 5 features within 1000 meters to a given point.

datasetId + lat + lng + n=5 + radius=1000

Links

Discussion