Getting Started

Register a Polygon

Define the geographic boundary of your field by registering a polygon with GeoJSON coordinates. This is the first step before requesting any satellite analysis.

Coordinate Format

Polygons are defined using GeoJSON coordinates in [longitude, latitude] format. This is the standard GeoJSON order — longitude first, latitude second.

Important: The first and last coordinate in the array must be identical to close the polygon ring.

You can use tools like geojson.io to draw a polygon on a map and export the coordinates.

The generatePolygon Mutation

Use the generatePolygon() mutation to register a new field boundary.

Parameters

label REQUIRED
A human-readable name for the polygon (e.g., "North Field").
benefactor REQUIRED
An identifier for the owner or organization. Used to group polygons.
coordinates REQUIRED
Array of [longitude, latitude] pairs defining the polygon boundary. First and last coordinate must match.

Example Request

GraphQL Mutation
mutation { generatePolygon( label: "North Field" benefactor: "my-farm" coordinates: [ [10.4015, 63.4305], [10.4065, 63.4305], [10.4065, 63.4275], [10.4015, 63.4275], [10.4015, 63.4305] // closes the ring ] ) { polygonId acres hectares geometry } }

Response Fields

Field Type Description
polygonId String Unique identifier for the registered polygon. Used in all subsequent API calls.
acres Float Calculated area of the polygon in acres.
hectares Float Calculated area of the polygon in hectares.
geometry Object The stored GeoJSON geometry of the polygon.

Example Response

JSON Response
{ "data": { "generatePolygon": { "polygonId": "abc123-def456-ghi789", "acres": 12.4, "hectares": 5.02, "geometry": { ... } } } }

Tip: Save the polygonId from the response. You will need it for every subsequent analysis request.

Validating Before Registration

Use the calculatePlotMeasurements() query to validate your coordinates before registering. This returns the area and perimeter without creating a polygon, helping you catch coordinate errors early.