> ## Documentation Index
> Fetch the complete documentation index at: https://docs.valar.space/llms.txt
> Use this file to discover all available pages before exploring further.

# AOI GeoJSON Subset

> The RFC 7946 GeoJSON subset accepted by Areas of Interest

> For the complete documentation index, see [llms.txt](/llms.txt).

When you create an Area of Interest by pasting or uploading GeoJSON (see the [GeoJSON paste/upload tab](/features/areas-of-interest/create-aoi#geojson-pasteupload) in the AOI creation drawer), VALAR accepts a deliberately narrow subset of [RFC 7946](https://datatracker.ietf.org/doc/html/rfc7946). This page catalogues what is accepted, what is rejected, what transformations are applied on ingest, and a worked example you can paste verbatim.

## Supported Types

VALAR accepts these top-level GeoJSON objects:

| Type                  | Constraints                                                                                                                 |
| --------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| **Polygon**           | Exterior ring only (no holes). Vertex count must be in `[3, 500]` distinct vertices.                                        |
| **MultiPolygon**      | Between 2 and 50 disjoint single-ring pieces. Each piece must itself satisfy the Polygon rules.                             |
| **Feature**           | A Feature wrapper around either of the above geometries. The Feature's geometry is unwrapped on ingest.                     |
| **FeatureCollection** | A FeatureCollection containing exactly one Feature, whose geometry is one of the above. The wrapper is unwrapped on ingest. |

## Rejected Types

VALAR rejects every other RFC 7946 type with a specific operator-facing error message. The message you see in the UI matches the row of the GeoJSON pasted or uploaded:

| Input                                           | Error returned                                                                                |
| ----------------------------------------------- | --------------------------------------------------------------------------------------------- |
| Polygon with one or more interior rings (holes) | `Polygons with holes are not supported`                                                       |
| `GeometryCollection`                            | `GeometryCollection is not supported`                                                         |
| `Point` or `MultiPoint`                         | `Point and MultiPoint are not supported`                                                      |
| `LineString` or `MultiLineString`               | `This primitive is not supported. Supported primitives: Polygon, CircularDisk, MultiPolygon.` |
| `FeatureCollection` of more than one feature    | `FeatureCollection with multiple features is not supported`                                   |

Polygon and MultiPolygon contents are validated against the same geometry rules the structured-coordinate form enforces — see [Validation Errors](/features/areas-of-interest/create-aoi#validation-errors) for the full catalogue.

## Body Size Cap

The pasted body or uploaded file must be at most **1 MB (1,000,000 bytes)**. Larger bodies are rejected with `File exceeds 1 MB limit (1,000,000 bytes). Simplify in QGIS/ArcGIS before paste.` Simplify the geometry (e.g. Douglas-Peucker reduction at a tolerance appropriate for your AOI) in a desktop GIS tool before retrying.

## Ingest Transformations

VALAR applies the following deterministic transformations to the GeoJSON before persisting the AOI:

| Transformation                  | Behaviour                                                                                                                                                                      |
| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Strip 3rd coordinate**        | If a coordinate pair carries an altitude (3rd value), it is dropped. AOIs are 2D Earth-surface regions.                                                                        |
| **Edge densification**          | Edges longer than `1°` of great-circle arc (≈ 111 km) are subdivided into sub-segments of `≤ 1°` before construction. Densification preserves the original vertices unchanged. |
| **Antimeridian crossing**       | Polygons that cross the antimeridian are accepted directly as spherical polygons — no longitude-domain bookkeeping is required from the operator.                              |
| **Feature unwrap**              | A bare `Feature` is unwrapped to its inner geometry; a `FeatureCollection` of exactly one Feature is also unwrapped.                                                           |
| **MultiPolygon-of-1 collapse**  | A `MultiPolygon` with exactly one piece is collapsed to a plain `Polygon`.                                                                                                     |
| **Winding-order normalisation** | The exterior ring is normalised to counter-clockwise winding. Clockwise input is auto-rewound; the geometry's footprint is unchanged.                                          |

## Rectangle and the Map Drawing Tool

Rectangles drawn through the **Draw on map** tab are serialised to a 4-vertex Polygon on the client before submit — VALAR does not accept a bespoke `Rectangle` type. If you have a bounding box from an external source, hand-craft the corresponding closed Polygon.

## Worked Example — Tuscany Coast

Below is a valid Polygon describing a small AOI covering the Tuscany coast near Livorno. It satisfies every rule documented above: a closed ring of 5 coordinate pairs (4 distinct + 1 closing repeat), no altitude component, no hole, no antimeridian crossing.

```json theme={null}
{
  "type": "Polygon",
  "coordinates": [
    [
      [10.20, 43.80],
      [10.40, 43.80],
      [10.40, 43.60],
      [10.20, 43.60],
      [10.20, 43.80]
    ]
  ]
}
```

Paste this block into the **GeoJSON paste/upload** tab of the AOI creation drawer, fill the rest of the [Create an AOI](/features/areas-of-interest/create-aoi) form, and **Save** — the AOI lands in the workspace and an automatic recompute follows.

## Worked Example — MultiPolygon

A MultiPolygon must carry **at least 2** disjoint pieces:

```json theme={null}
{
  "type": "MultiPolygon",
  "coordinates": [
    [
      [
        [9.10, 45.50],
        [9.20, 45.50],
        [9.20, 45.40],
        [9.10, 45.40],
        [9.10, 45.50]
      ]
    ],
    [
      [
        [12.45, 41.95],
        [12.55, 41.95],
        [12.55, 41.85],
        [12.45, 41.85],
        [12.45, 41.95]
      ]
    ]
  ]
}
```

<Info>
  Full specification of the GeoJSON encoding is in [RFC 7946 — The GeoJSON Format](https://datatracker.ietf.org/doc/html/rfc7946). VALAR's subset is documented above; anything outside the subset is rejected with one of the messages listed in the [Rejected Types](#rejected-types) table.
</Info>

## Related Pages

* [Create an AOI](/features/areas-of-interest/create-aoi) — full coverage of the creation drawer, including the **GeoJSON paste/upload** tab.
* [Areas of Interest overview](/features/areas-of-interest/overview) — what an AOI is and how the page is laid out.
* [Overflight events](/features/areas-of-interest/overflight-events) — read predicted overflights against the AOI you just created.
