terranode

n8n community node for spatial queries via the Terranode Geospatial API

Package Information

Released: 6 mo ago
Downloads: 16 weekly / 64 monthly
Latest Version: 0.1.3
Author: Terranode

Documentation

n8n-nodes-terranode

n8n community node for spatial queries via the Terranode Geospatial API.

Enrich your workflow data with polygon attributes, nearest features, distances, and spatial joins — no geospatial/GIS expertise required.

Install

In your n8n instance: Settings → Community Nodes → Install → search for n8n-nodes-terranode → click Install. That's it — no code required.

Get an API key at app.terranode.co.

Credential Setup

  1. Go to Credentials → New Credential → Terranode API
  2. Enter your API key (starts with tn_)
  3. Save — n8n will test connectivity automatically

Operations

Check Location

Point-in-polygon query. Given a lat/lng coordinate, returns the polygon(s) that contain it.

Use case: "Which county is this coordinate in?" "Is this point inside a service zone?"

  • Dataset — pick from the dropdown (system + your custom datasets)
  • Latitude / Longitude — decimal degrees (supports n8n expressions)

Find Nearest

Find the N closest features to a coordinate, sorted by boundary distance.

Use case: "What are the 5 nearest counties?" "Find the closest school district within 10km."

  • Dataset — pick from the dropdown
  • Latitude / Longitude — decimal degrees
  • Number of Results — 1–20 (default 1)
  • Radius — max search distance in meters (0 = unlimited)

Calculate Distance

Geodesic distance between two points on Earth's surface. No dataset needed.

Use case: "How far is the warehouse from the delivery point?"

  • Latitude 1 / Longitude 1 — first point
  • Latitude 2 / Longitude 2 — second point
  • Returns distance_m (meters) and distance_mi (miles)

Spatial Join

Batch operation — enriches ALL input items with polygon attributes in one API call. Each input item needs a lat/lng field.

Use case: "Take this spreadsheet of lat/lng coordinates and add their state, county, and census tract."

  • Dataset — pick from the dropdown
  • Latitude Field — name of the field containing latitude (default: lat)
  • Longitude Field — name of the field containing longitude (default: lng)
  • Output items get _joined (boolean) and matched polygon properties merged in

Workflow Examples

Spreadsheet → Spatial Join → Enriched Output

Take a CSV or spreadsheet of coordinates and enrich every row with polygon attributes in one shot.

[Read CSV] → [Terranode: Spatial Join (us-counties)] → [Write CSV]
  1. Read Binary File or Google Sheets node reads your data
  2. Spreadsheet File node (if CSV) converts rows to items
  3. Terranode node with Spatial Join enriches each row with county attributes
  4. Write node outputs the enriched file

Fleet Zone Tracking

Identify which zones your fleet vehicles are in right now.

[HTTP Request: Fleet API] → [Terranode: Spatial Join (service-zones)] → [Switch] → [Slack Alert]
  1. HTTP Request pulls current vehicle positions (lat/lng) from your fleet API
  2. Terranode Spatial Join matches each vehicle to its service zone
  3. Switch node filters for vehicles outside their assigned zone
  4. Slack sends an alert for out-of-zone vehicles

Distance Calculator

[Form Trigger] → [Terranode: Calculate Distance] → [Respond to Webhook]
  1. Form collects two coordinate pairs
  2. Terranode calculates geodesic distance
  3. Response includes distance in meters and miles

Error Handling

The node respects n8n's Continue On Fail setting:

  • Off (default): Errors stop the workflow with a clear message
  • On: Failed items pass through with an error field — useful for batch processing where some items may have bad coordinates

Error messages are mapped to actionable hints:

  • 401 → "Check your Terranode credential"
  • 403 → "Your plan may not include this feature"
  • 404 → "Dataset not found"
  • 429 → "Rate limit exceeded"

Feedback

Report issues or feature requests: feedback@terranode.co

Discussion