# GeoJSON format

#### What is GeoJSON?

[GeoJSON](https://geojson.org/) is a widely used format for encoding geographic data structures using JSON. It represents features (like plots) as JSON objects with geometry and associated properties.

#### Supported GeoJSON Types

The following GeoJSON object types are used for plots:

* **Feature**: Represents a single plot.
* **FeatureCollection**: Represents a collection of plots.

#### Content-Type and Accept Headers for GeoJSON

To use GeoJSON in your

* **Request Payload**: Set `Content-Type: application/geo+json`
* **Responses**: Set `Accept: application/geo+json`

The system will automatically serialize and deserialize GeoJSON according to these headers, converting `Feature` and `FeatureCollection` objects to and from the internal data model.

#### Plot as GeoJSON Feature

A single plot is represented as a `Feature` with the following structure:

```json
{
  "type": "Feature",
  "id": "UUID",
  "geometry": {
    "type": "Polygon",
    "coordinates": [[[...]]]  // Lng/Lat pairs in GeoJSON format
  },
  "properties": {
    "name": "Plot A",
    "commodity": "timber",
    "createdAt": "2024-01-01T12:00:00Z",
    "updatedAt": "2024-01-05T12:00:00Z",
    "businessId": "business-uuid",
    // ....additional properties
  }
}
```

#### Multiple Plots as FeatureCollection

When listing or batch-creating multiple plots, the response or request will use a `FeatureCollection`:

```json
{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "id": "plot-uuid-1",
      "geometry": {
        "type": "Polygon",
        "coordinates": [[[...]]]
      },
      "properties": {
        "name": "Plot 1",
        "commodity": "coffee"
        // ....additional properties
      }
    },
    {
      "type": "Feature",
      "id": "plot-uuid-2",
      "geometry": {
        "type": "Polygon",
        "coordinates": [[[...]]]
      },
      "properties": {
        "name": "Plot 2",
        "commodity": "cocoa"
        // ....additional properties
      }
    }
  ]
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.live-eo.com/tradeaware/using-the-tradeaware-api/api-reference/plots/batch/geojson-format.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
