# Formatting GeoJSON for TradeAware Application Uploads

The following guide shows how to structure your `.geojson` files for successful uploads to the TradeAware platform.

### What geometries are accepted?

* **Supported:** `Point`, `Polygon`, `MultiPolygon`
* **Not supported:** `LineString`, `MultiPoint`, `GeometryCollection`
* Coordinates must be **WGS84 / CRS84 (EPSG:4326)** in **\[longitude, latitude]** order.

### What properties are required?

Each plot (or feature) in your GeoJSON file must include **exactly these required fields** inside the `properties` block:

* `"name"` — a unique name for each plot
* `"commodities"` — a list of one or more relevant commodities, e.g. `["rubber"]`

Example of required structure:

```json
"properties": {
  "name": "Plot A",
  "commodities": ["rubber"]
}
```

### Adding extra information with **`customData`**

If you want to include additional details about a plot — such as the supplier, plot code, tree species, or plantation name — you can use the `customData` field.

Think of `customData` as a “notes box” for your plots.\
You can use it to store useful context like *who owns the land*, *where it’s located*, or *what crop variety is planted*.\
This information is securely stored and linked to your plots, but it’s not used for analysis or compliance checks.

⚠️ **Important:**\
Do not add custom fields directly under `properties`.\
All optional or descriptive information must go inside `properties.customData`.\
This ensures your file passes validation and uploads successfully.

**`customData` rules**

* You can include up to 10 keys in total.
* Each value must be a string, number, or boolean — arrays or nested objects are not supported.
* If you have more than 10 attributes, group some of them into one or two rolled-up keys (for example, `"extra"`) formatted as JSON strings.

### Example 1: Uploading Points

```json
{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [30.7132, 2.1940]
      },
      "properties": {
        "name": "Smallholder Plot A",
        "commodities": ["cocoa"],
        "areaHa": 2.5,
        "customData": {
          "farmerId": "SH-00123",
          "village": "Akouda",
          "certified": true
        }
      }
    }
  ]
}
```

### Example 2: Uploading Polygons

All non-mandatory fields are placed under `customData`

```json
{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": {
        "type": "Polygon",
        "coordinates": [
          [
            [108.06050, 13.48690],
            [108.06310, 13.48690],
            [108.06310, 13.48920],
            [108.06050, 13.48920],
            [108.06050, 13.48690]
          ]
        ]
      },
      "properties": {
        "name": "TK2508_020_13",
        "commodities": ["rubber"],
        "customData": {
          "Supplier": "Thai Tien Phat Wood Company Limited",
          "Plot_code": "TK2508_020",
          "Plot_No": "13",
          "Parcel_area_hectare": "24.52",
          "Type_of_geolocation": "Polygon (5 vertex)",
          "Latitude_Center": "13.487761",
          "Longitude_Center": "108.062264",
          "Location_of_the_land_parcel": "Ia Ko Rubber Plantation",
          "Forest_Owner": "Chu Se Rubber Company Limited",
          "extra": "{\"KML_FOLDER\":\"GL\",\"Common_species\":\"Cao su\",\"Scientific_species\":\"Hevea brasiliensis\",\"Compartment\":\"10\",\"Sub_Compartment\":\"1120\",\"Old_Commune\":\"Ia Blu\",\"New_Commune\":\"Ia Le\",\"Province\":\"Gia Lai\"}"
        }
      }
    }
  ]
}

```

***

### Example 3: Uploading MultiPolygons

```json
{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": {
        "type": "MultiPolygon",
        "coordinates": [
          [[[30.7200, 2.2000],[30.7400, 2.2000],[30.7400, 2.2200],[30.7200, 2.2200],[30.7200, 2.2000]]],
          [[[30.7500, 2.2300],[30.7700, 2.2300],[30.7700, 2.2500],[30.7500, 2.2500],[30.7500, 2.2300]]]
        ]
      },
      "properties": {
        "name": "Estate North Blocks",
        "commodities": ["timber"],
        "customData": {
          "estateId": "EST-9982",
          "manager": "J. Mensah"
        }
      }
    }
  ]
}

```

***

### Example 4: Uploading both Points and Polygons (Mixed)

```json
{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [30.7132, 2.1940]
      },
      "properties": {
        "name": "Point Plot",
        "commodities": ["rubber"],
        "areaHa": 3.8,
        "customData": {
          "smallholder": true
        }
      }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "Polygon",
        "coordinates": [
          [
            [30.7160, 2.1960],
            [30.7180, 2.1960],
            [30.7180, 2.1980],
            [30.7160, 2.1980],
            [30.7160, 2.1960]
          ]
        ]
      },
      "properties": {
        "name": "Block F",
        "commodities": ["rubber"]
      }
    }
  ]
}

```

### Important Notes

* TradeAware **strictly validates** GeoJSON property fields.\
  Only the following top-level fields inside `properties` are accepted:
  * `name`
  * `commodities`
  * *(optional)* `description`
  * *(optional)* `areaHa`
  * *(optional)* `customData`
* Put all other attributes in `customData`.
* Plot names must be unique within the file. TradeAware will append a number during upload to enforce uniqueness (e.g., `Block F_1`).
* No self-intersections in polygons. Max plot size: 10,000 ha. Max upload file: 10 MB.
* Overarching requirement: TradeAware enforces EU TRACES GeoJSON constraints (format/geometry validity/projection).


---

# 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-web-app/plot-upload-and-analysis-trouble-shooting/formatting-geojson-for-tradeaware-application-uploads.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.
