> For the complete documentation index, see [llms.txt](https://cityweft.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cityweft.gitbook.io/docs/basics/exports.md).

# Exports

Export a request directly to CAD, BIM and 3D file formats — the API returns a download URL instead of JSON geometry.

Add the `export` object to any `/v1/context` request to receive a ready-to-open file instead of JSON geometry:

```json
{
  "polygon": [[lat, lon], ...],
  "settings": { ... },
  "export": {
    "format": "obj"
  }
}
```

## Supported formats

| Format         | Description        |
| -------------- | ------------------ |
| `obj`          | Wavefront OBJ      |
| `3dm`          | Rhino              |
| `dxf`          | AutoCAD DXF        |
| `skp`          | SketchUp           |
| `glb` / `gltf` | glTF binary / JSON |
| `ifc`          | IFC (BIM)          |
| `rvt`          | Revit              |
| `stl`          | STL                |
| `ply`          | PLY                |
| `dae`          | COLLADA            |

## Coordinate system, placement & units

{% hint style="success" %}
**New:** exports can be delivered in a real-world coordinate reference system, with configurable placement and units.
{% endhint %}

```json
"export": {
  "format": "dxf",
  "crs": "EPSG:27700",
  "placement": "absolute",
  "units": "m"
}
```

| Option        | Values                                                  | Description                                                                                                                                                                                                                                                                                                                |
| ------------- | ------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `crs`         | `"local"` (default) or a projected EPSG code            | Origin-relative meters, or any supported projected system in meters, international feet, or US survey feet (US State Plane variants included). Geometry is reprojected per vertex, so the output is grid-north aligned and two nearby exports in the same CRS register exactly. Only valid when `settings.crs` is `local`. |
| `placement`   | `"anchor"` (default) \| `"absolute"`                    | `anchor` keeps coordinates origin-relative plus the format's native georeference anchor; `absolute` bakes real grid coordinates into the file for GIS workflows. Absolute is unavailable for `skp`/`rvt` (fixed internal units), `stl`/`ply` (32-bit storage), and for `glb`/`gltf` in foot-based systems.                 |
| `units`       | `"m"` (default) \| `"mm"` \| `"ft"` \| `"in"`           | Model units for the exported file. Ignored for `skp`/`rvt` and `glb`/`gltf` (fixed by the format). With absolute placement, coordinates export in the CRS's own unit — meters for metric grids, (survey) feet for foot-based grids.                                                                                        |
| `surfaceType` | `"meshes"` (default) \| `"centerlines"` \| `"outlines"` | Deliver ground surfaces as meshes, or as centerline/outline curves instead — see [Surface Lines](/docs/geometry/surface-lines.md).                                                                                                                                                                                         |

Invalid values are rejected with HTTP `400`. More on coordinate systems: [Coordinate Systems (CRS)](/docs/basics/coordinate-systems-crs.md).

## Response structure

```json
{
  "downloadUrl": "https://.../exports/file.obj",
  "spatialReference": {
    "crs": "local",
    "origin": [lat, lon]
  }
}
```

* **`downloadUrl`** — direct URL to download the exported file.
* **`spatialReference`** — the coordinate system of the exported file: `crs` (`local`, `EPSG:3857`, or `UTM`), plus `origin` for `local`, or `utmZoneEPSG` / `zoneString` / `hemisphere` / `zone` / `letter` for `UTM`.

{% hint style="info" %}
Export processing takes longer than standard geometry requests, and exported files are stored temporarily — download them promptly.
{% endhint %}
