---
title: Buildings
source: https://infrared.city/docs/sdk/1.0/api/typescript/buildings/
---

# Buildings

<a id="acquirebuildings"></a>

## acquireBuildings

Import from `@infrared-city/infrared-sdk-ts/geodata`.

> **acquireBuildings**(`bbox`, `options?`): `Promise`&lt;[`DirectBuildingsResult`](buildings.md#directbuildingsresult)&gt;

Read building footprints for an area, parsed into feature objects.

The same read as [acquireBuildingsJson](buildings.md#acquirebuildingsjson), parsed once for a caller that
wants feature objects.

### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `bbox` | [`Bbox`](geodata.md#bbox) | The area to read, in WGS84 degrees. |
| `options` | [`AcquireBuildingsOptions`](buildings.md#acquirebuildingsoptions) | Read options. |

### Returns

`Promise`&lt;[`DirectBuildingsResult`](buildings.md#directbuildingsresult)&gt;

The footprint features, the source, any warnings and the Overture
  release.

### Throws

when the planned Overture read exceeds
  the byte limit.

### Throws

when Overture must be read and the optional
  parquet packages are not installed.

***

<a id="acquirebuildingsarea"></a>

## acquireBuildingsArea

Import from `@infrared-city/infrared-sdk-ts/geodata`.

> **acquireBuildingsArea**(`site`, `options`): `Promise`&lt;[`BuildingsAreaResult`](buildings.md#buildingsarearesult)&gt;

Read and extrude every building footprint of one site, in one frame.

A registered city overlay is used when one covers the site, otherwise the
global Overture building layer. The site is read once and extruded once, so
every mesh shares the origin in [BuildingsAreaResult.origin](buildings.md#buildingsarearesult-origin).

### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `site` | [`Bbox`](geodata.md#bbox) | The site rectangle, in WGS84 degrees. |
| `options` | [`AcquireBuildingsAreaOptions`](buildings.md#acquirebuildingsareaoptions) | Read options; `defaultHeightM` is required. |

### Returns

`Promise`&lt;[`BuildingsAreaResult`](buildings.md#buildingsarearesult)&gt;

The building meshes keyed by id, the frame origin, the source and
  any warnings.

### Throws

when the planned Overture read exceeds
  the byte limit.

### Throws

when Overture must be read and the optional
  parquet packages are not installed.

***

<a id="acquirebuildingsareaoptions"></a>

## AcquireBuildingsAreaOptions

Import from `@infrared-city/infrared-sdk-ts/geodata`.

Options for [acquireBuildingsArea](buildings.md#acquirebuildingsarea).

Extends [AcquireBuildingsOptions](buildings.md#acquirebuildingsoptions). The whole site is read once and
extruded in one local frame, so there is no concurrency option.

### Extends

- [`AcquireBuildingsOptions`](buildings.md#acquirebuildingsoptions)

### Properties

| Property | Modifier | Type | Description | Inherited from |
| ------ | ------ | ------ | ------ | ------ |
| <a id="acquirebuildingsareaoptions-bestavailable"></a> `bestAvailable?` | `readonly` | `boolean` | Set `false` to read the global Overture layer even inside a registered city. By default a registered city's own footprints are used when one covers the area. | [`AcquireBuildingsOptions`](buildings.md#acquirebuildingsoptions).[`bestAvailable`](buildings.md#acquirebuildingsoptions-bestavailable) |
| <a id="acquirebuildingsareaoptions-budget"></a> `budget?` | `readonly` | [`PlannedBudget`](geodata.md#plannedbudget) | The byte budget of the call this read belongs to. An area read of several ground layers passes one budget to all of them, so the limit covers the whole call rather than each layer. A read with no budget makes its own. | [`AcquireBuildingsOptions`](buildings.md#acquirebuildingsoptions).[`budget`](buildings.md#acquirebuildingsoptions-budget) |
| <a id="acquirebuildingsareaoptions-candidatebufferdeg"></a> `candidateBufferDeg?` | `readonly` | `number` | Extra margin, in degrees, added around the area when choosing which files to read. It never changes which features are returned. A file whose recorded bounding box stops just short of the area is still considered. Features are still filtered against the exact area, so the margin costs at most one extra file read. | [`AcquireBuildingsOptions`](buildings.md#acquirebuildingsoptions).[`candidateBufferDeg`](buildings.md#acquirebuildingsoptions-candidatebufferdeg) |
| <a id="acquirebuildingsareaoptions-defaultheightm"></a> `defaultHeightM` | `readonly` | `number` | Default extrusion height, in metres, for a footprint that carries none. | - |
| <a id="acquirebuildingsareaoptions-fetch"></a> `fetch?` | `readonly` | \{(`input`, `init?`): `Promise`&lt;`Response`&gt;; (`input`, `init?`): `Promise`&lt;`Response`&gt;; \} | Custom `fetch` implementation; defaults to the runtime's global `fetch`. | [`AcquireBuildingsOptions`](buildings.md#acquirebuildingsoptions).[`fetch`](buildings.md#acquirebuildingsoptions-fetch) |
| <a id="acquirebuildingsareaoptions-logger"></a> `logger?` | `readonly` | [`Logger`](client.md#logger) | Where a transport retry reports itself. Defaults to the console. Pass `silentLogger` to keep a retry out of the output. | [`AcquireBuildingsOptions`](buildings.md#acquirebuildingsoptions).[`logger`](buildings.md#acquirebuildingsoptions-logger) |
| <a id="acquirebuildingsareaoptions-maxfiles"></a> `maxFiles?` | `readonly` | `number` | Maximum number of parquet files to read. A read that matches more files fails with an `OvertureFileLimitError` instead of returning a partial answer. A guard for very large areas. | [`AcquireBuildingsOptions`](buildings.md#acquirebuildingsoptions).[`maxFiles`](buildings.md#acquirebuildingsoptions-maxfiles) |
| <a id="acquirebuildingsareaoptions-maxplannedbytes"></a> `maxPlannedBytes?` | `readonly` | `number` | Compressed bytes this read may plan, when it makes its own budget. Defaults to the runtime's ceiling. A larger plan fails with an `OvertureReadTooLargeError`. | [`AcquireBuildingsOptions`](buildings.md#acquirebuildingsoptions).[`maxPlannedBytes`](buildings.md#acquirebuildingsoptions-maxplannedbytes) |
| <a id="acquirebuildingsareaoptions-overturerelease"></a> `overtureRelease?` | `readonly` | `string` | Pin the Overture release, e.g. `"2026-08-19.0"`. Without a pin the latest release is used, which is refreshed daily, so the same area read on two days can return different data. A pinned release is reproducible. | [`AcquireBuildingsOptions`](buildings.md#acquirebuildingsoptions).[`overtureRelease`](buildings.md#acquirebuildingsoptions-overturerelease) |
| <a id="acquirebuildingsareaoptions-rectangles"></a> `rectangles?` | `readonly` | readonly [`Bbox`](geodata.md#bbox)\[\] | The simulation-tile query rectangles whose union is the site rectangle. They decide two things: whether the site has one building source (a site whose rectangles resolve to different sources is read rectangle by rectangle), and which parts of the site are extruded, so a long, narrow site does not extrude the empty corners of its bounding box. When omitted, the site rectangle stands for itself. | - |
| <a id="acquirebuildingsareaoptions-signal"></a> `signal?` | `readonly` | `AbortSignal` | Abort signal; aborting it ends the read with a `GeodataFetchError`. | [`AcquireBuildingsOptions`](buildings.md#acquirebuildingsoptions).[`signal`](buildings.md#acquirebuildingsoptions-signal) |
| <a id="acquirebuildingsareaoptions-stalltimeoutms"></a> `stallTimeoutMs?` | `readonly` | `number` | How long one attempt of a retried read may receive no data before it is aborted and asked again. Defaults to `STALL_TIMEOUT_MS`. | [`AcquireBuildingsOptions`](buildings.md#acquirebuildingsoptions).[`stallTimeoutMs`](buildings.md#acquirebuildingsoptions-stalltimeoutms) |
| <a id="acquirebuildingsareaoptions-timeoutms"></a> `timeoutMs?` | `readonly` | `number` | Total time for the answer and its body. Defaults to [DEFAULT\_PUBLIC\_TIMEOUT\_MS](geodata.md#default_public_timeout_ms). | [`AcquireBuildingsOptions`](buildings.md#acquirebuildingsoptions).[`timeoutMs`](buildings.md#acquirebuildingsoptions-timeoutms) |
| <a id="acquirebuildingsareaoptions-transport"></a> `transport?` | `readonly` | [`RangeTransport`](geodata.md#rangetransport) | Byte reader; defaults to HTTP range requests. Tests can serve bytes from memory. Pass one instance for a whole area: it carries the object-size cache, and a fresh one per tile re-learns every object's size. | [`AcquireBuildingsOptions`](buildings.md#acquirebuildingsoptions).[`transport`](buildings.md#acquirebuildingsoptions-transport) |

***

<a id="acquirebuildingsjson"></a>

## acquireBuildingsJson

Import from `@infrared-city/infrared-sdk-ts/geodata`.

> **acquireBuildingsJson**(`bbox`, `options?`): `Promise`&lt;[`DirectBuildingsJson`](buildings.md#directbuildingsjson)&gt;

Read building footprints for an area straight from the public data hosts,
as GeoJSON text.

A registered city's footprint layer is used when one covers the area,
otherwise Overture's building layer. The text is returned unparsed so it can
be passed straight on; use [acquireBuildings](buildings.md#acquirebuildings) for parsed features.

### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `bbox` | [`Bbox`](geodata.md#bbox) | The area to read, in WGS84 degrees. |
| `options` | [`AcquireBuildingsOptions`](buildings.md#acquirebuildingsoptions) | Read options. |

### Returns

`Promise`&lt;[`DirectBuildingsJson`](buildings.md#directbuildingsjson)&gt;

The footprints as FeatureCollection text, the source, any warnings
  and the Overture release.

### Throws

when the planned Overture read exceeds
  the byte limit.

### Throws

when Overture must be read and the optional
  parquet packages are not installed.

***

<a id="acquirebuildingsoptions"></a>

## AcquireBuildingsOptions

Import from `@infrared-city/infrared-sdk-ts/geodata`.

Options for [acquireBuildings](buildings.md#acquirebuildings) and [acquireBuildingsJson](buildings.md#acquirebuildingsjson).

Combines the FlatGeobuf read options and the Overture read options.

### Extends

- [`ReadFgbOptions`](geodata.md#readfgboptions).[`ReadOvertureOptions`](geodata.md#readovertureoptions)

### Extended by

- [`AcquireBuildingsAreaOptions`](buildings.md#acquirebuildingsareaoptions)

### Properties

| Property | Modifier | Type | Description | Inherited from |
| ------ | ------ | ------ | ------ | ------ |
| <a id="acquirebuildingsoptions-bestavailable"></a> `bestAvailable?` | `readonly` | `boolean` | Set `false` to read the global Overture layer even inside a registered city. By default a registered city's own footprints are used when one covers the area. | - |
| <a id="acquirebuildingsoptions-budget"></a> `budget?` | `readonly` | [`PlannedBudget`](geodata.md#plannedbudget) | The byte budget of the call this read belongs to. An area read of several ground layers passes one budget to all of them, so the limit covers the whole call rather than each layer. A read with no budget makes its own. | [`ReadOvertureOptions`](geodata.md#readovertureoptions).[`budget`](geodata.md#readovertureoptions-budget) |
| <a id="acquirebuildingsoptions-candidatebufferdeg"></a> `candidateBufferDeg?` | `readonly` | `number` | Extra margin, in degrees, added around the area when choosing which files to read. It never changes which features are returned. A file whose recorded bounding box stops just short of the area is still considered. Features are still filtered against the exact area, so the margin costs at most one extra file read. | [`ReadOvertureOptions`](geodata.md#readovertureoptions).[`candidateBufferDeg`](geodata.md#readovertureoptions-candidatebufferdeg) |
| <a id="acquirebuildingsoptions-fetch"></a> `fetch?` | `readonly` | \{(`input`, `init?`): `Promise`&lt;`Response`&gt;; (`input`, `init?`): `Promise`&lt;`Response`&gt;; \} | Custom `fetch` implementation; defaults to the runtime's global `fetch`. | [`ReadFgbOptions`](geodata.md#readfgboptions).[`fetch`](geodata.md#readfgboptions-fetch) |
| <a id="acquirebuildingsoptions-logger"></a> `logger?` | `readonly` | [`Logger`](client.md#logger) | Where a transport retry reports itself. Defaults to the console. Pass `silentLogger` to keep a retry out of the output. | [`ReadFgbOptions`](geodata.md#readfgboptions).[`logger`](geodata.md#readfgboptions-logger) |
| <a id="acquirebuildingsoptions-maxfiles"></a> `maxFiles?` | `readonly` | `number` | Maximum number of parquet files to read. A read that matches more files fails with an `OvertureFileLimitError` instead of returning a partial answer. A guard for very large areas. | [`ReadOvertureOptions`](geodata.md#readovertureoptions).[`maxFiles`](geodata.md#readovertureoptions-maxfiles) |
| <a id="acquirebuildingsoptions-maxplannedbytes"></a> `maxPlannedBytes?` | `readonly` | `number` | Compressed bytes this read may plan, when it makes its own budget. Defaults to the runtime's ceiling. A larger plan fails with an `OvertureReadTooLargeError`. | [`ReadOvertureOptions`](geodata.md#readovertureoptions).[`maxPlannedBytes`](geodata.md#readovertureoptions-maxplannedbytes) |
| <a id="acquirebuildingsoptions-overturerelease"></a> `overtureRelease?` | `readonly` | `string` | Pin the Overture release, e.g. `"2026-08-19.0"`. Without a pin the latest release is used, which is refreshed daily, so the same area read on two days can return different data. A pinned release is reproducible. | [`ReadOvertureOptions`](geodata.md#readovertureoptions).[`overtureRelease`](geodata.md#readovertureoptions-overturerelease) |
| <a id="acquirebuildingsoptions-signal"></a> `signal?` | `readonly` | `AbortSignal` | Abort signal; aborting it ends the read with a `GeodataFetchError`. | [`ReadFgbOptions`](geodata.md#readfgboptions).[`signal`](geodata.md#readfgboptions-signal) |
| <a id="acquirebuildingsoptions-stalltimeoutms"></a> `stallTimeoutMs?` | `readonly` | `number` | How long one attempt of a retried read may receive no data before it is aborted and asked again. Defaults to `STALL_TIMEOUT_MS`. | [`ReadFgbOptions`](geodata.md#readfgboptions).[`stallTimeoutMs`](geodata.md#readfgboptions-stalltimeoutms) |
| <a id="acquirebuildingsoptions-timeoutms"></a> `timeoutMs?` | `readonly` | `number` | Total time for the answer and its body. Defaults to [DEFAULT\_PUBLIC\_TIMEOUT\_MS](geodata.md#default_public_timeout_ms). | [`ReadFgbOptions`](geodata.md#readfgboptions).[`timeoutMs`](geodata.md#readfgboptions-timeoutms) |
| <a id="acquirebuildingsoptions-transport"></a> `transport?` | `readonly` | [`RangeTransport`](geodata.md#rangetransport) | Byte reader; defaults to HTTP range requests. Tests can serve bytes from memory. Pass one instance for a whole area: it carries the object-size cache, and a fresh one per tile re-learns every object's size. | [`ReadFgbOptions`](geodata.md#readfgboptions).[`transport`](geodata.md#readfgboptions-transport) |

***

<a id="areabuildings"></a>

## AreaBuildings

Import from `@infrared-city/infrared-sdk-ts`.

Buildings read for an area, as dotbim meshes keyed by building.

### Properties

| Property | Modifier | Type | Description |
| ------ | ------ | ------ | ------ |
| <a id="areabuildings-analysistype"></a> `analysisType` | `readonly` | `string` | The analysis type the read margin was taken from. |
| <a id="areabuildings-buildingids"></a> `buildingIds` | `readonly` | readonly `number`\[\] | Always an empty array: the public sources this service reads carry no building ids. |
| <a id="areabuildings-buildings"></a> `buildings` | `readonly` | `Readonly`&lt;`Record`&lt;`string`, [`DotBimMesh`](buildings.md#dotbimmesh)&gt;&gt; | The building meshes, keyed by building id. |
| <a id="areabuildings-executiontime"></a> `executionTime` | `readonly` | `number` | Time the read took, in seconds. |
| <a id="areabuildings-failedtiles"></a> `failedTiles` | `readonly` | readonly `string`\[\] | Always empty: the site is read as one request, which succeeds or fails as a whole. |
| <a id="areabuildings-origin"></a> `origin` | `readonly` | readonly \[`number`, `number`\] | `[lon, lat]` the meshes are framed around: the polygon's south-west corner. The whole area is extruded once, in this one frame, so the meshes render as one consistent site. When you submit them in a run, each simulation tile receives them re-anchored into its own frame. |
| <a id="areabuildings-overturerelease"></a> `overtureRelease?` | `readonly` | `string` | Overture release this read used, absent when a city overlay supplied the footprints. |
| <a id="areabuildings-readmarginm"></a> `readMarginM` | `readonly` | `number` | Half extent, in metres, of the read rectangle every tile was fetched with: 256 for the wind analyses and 384 for the others. `runArea` refuses a run whose analysis needs more than this. |
| <a id="areabuildings-skippedfootprints"></a> `skippedFootprints?` | `readonly` | readonly `object`\[\] | Footprints that could not be extruded, with their geometry type. A non-empty list means those buildings are missing from `buildings`. |
| <a id="areabuildings-totalbuildings"></a> `totalBuildings` | `readonly` | `number` | Number of buildings in `buildings`. |
| <a id="areabuildings-warnings"></a> `warnings` | `readonly` | readonly `string`\[\] | What the read degraded, as human-readable warnings. Empty when nothing degraded. `<city>_overlay_unavailable` means a registered city's high-fidelity footprints could not be read and the whole site fell back to Overture, a visible drop in building quality for the whole area. A city registry that could not be reached adds its own warning the same way. The same warnings are also sent to the client's `logger.warn`, so a caller who does not read this field is still told. |

***

<a id="buildingsarearesult"></a>

## BuildingsAreaResult

Import from `@infrared-city/infrared-sdk-ts/geodata`.

Footprints read for a whole site and extruded into one frame.

### Properties

| Property | Modifier | Type | Description |
| ------ | ------ | ------ | ------ |
| <a id="buildingsarearesult-buildings"></a> `buildings` | `readonly` | `Record`&lt;`string`, `Record`&lt;`string`, `unknown`&gt;&gt; | Building meshes keyed by building id, in the site frame, extruded once. |
| <a id="buildingsarearesult-origin"></a> `origin` | `readonly` | readonly \[`number`, `number`\] | The frame the meshes are in: the site rectangle's south-west corner, `[lon, lat]`. |
| <a id="buildingsarearesult-overturerelease"></a> `overtureRelease` | `readonly` | `string` | Overture release the footprints came from, or `""` when Overture was not read. |
| <a id="buildingsarearesult-source"></a> `source` | `readonly` | `string` | Which source answered for the site; several sources are joined with `+`. |
| <a id="buildingsarearesult-warnings"></a> `warnings` | `readonly` | readonly `string`\[\] | Degradations the caller should surface, such as an unavailable city overlay. |

***

<a id="buildingsconfig"></a>

## BuildingsConfig

Import from `@infrared-city/infrared-sdk-ts`.

Options for `BuildingsService.getBuildingsInArea`.

### Properties

| Property | Modifier | Type | Description |
| ------ | ------ | ------ | ------ |
| <a id="buildingsconfig-analysistype"></a> `analysisType?` | `readonly` | `string` | The analysis this read is for. It decides the tile grid and the read margin: 256 m for the two wind analyses and 384 m for every other one, which needs the shadow casters further out. Omit it for the widest margin, which is valid for every analysis. |
| <a id="buildingsconfig-maxtilesoverride"></a> `maxTilesOverride?` | `readonly` | `number` | Raises the cap on non-empty tiles (100 by default); a larger area is refused without it. |
| <a id="buildingsconfig-maxworkers"></a> `maxWorkers?` | `readonly` | `number` | Accepted for compatibility; it changes nothing. The site's footprints are fetched in one read, so there is no per-tile fan-out left for it to bound. Passing it is neither refused nor honoured: the call keeps working and returns the same answer. |
| <a id="buildingsconfig-overturerelease"></a> `overtureRelease?` | `readonly` | `string` | Pin the Overture release this read uses. |
| <a id="buildingsconfig-signal"></a> `signal?` | `readonly` | `AbortSignal` | Aborts the whole site read, not just one request. |

***

<a id="buildingsservice"></a>

## BuildingsService

Import from `@infrared-city/infrared-sdk-ts`.

Reads building footprints for an area from the public data hosts and extrudes
them locally into dotbim meshes.

The service takes only the transport settings of `ServiceOptions` (`fetch`,
`timeoutMs`, `logger`) and sends no API key anywhere. `buildingIds` is always
an empty array, because the public sources carry no building ids.

### Constructors

<a id="buildingsservice-constructor"></a>

#### Constructor

> **new BuildingsService**(`options`): `BuildingsService`

##### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `options` | [`ServiceOptions`](client.md#serviceoptions) | Transport settings: `fetch`, `timeoutMs` and `logger` are used for the public reads; `baseUrl` and `auth` are accepted but not used. |

##### Returns

`BuildingsService`

### Methods

<a id="buildingsservice-getbuildingsinarea"></a>

#### getBuildingsInArea()

> **getBuildingsInArea**(`polygon`, `options?`): `Promise`&lt;[`AreaBuildings`](buildings.md#areabuildings)&gt;

Reads and extrudes the buildings of a polygon area.

The footprints are read once for the whole site and extruded in one frame,
returned as `origin`. The read margin follows `options.analysisType`.

##### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `polygon` | [`Polygon`](tiling.md#polygon) | The area to read: a GeoJSON `Polygon` with one closed ring of `[longitude, latitude]` positions. |
| `options` | [`BuildingsConfig`](buildings.md#buildingsconfig) | Optional read settings; see `BuildingsConfig`. |

##### Returns

`Promise`&lt;[`AreaBuildings`](buildings.md#areabuildings)&gt;

The meshes keyed by building id, with the read's frame, margin and
  any warnings.

##### Throws

when `options` carries a removed option
  (`acquisition`, `compress`, `optimizations` or `outputFormat`).

***

<a id="cleanedmesh"></a>

## CleanedMesh

Import from `@infrared-city/infrared-sdk-ts`.

The result of `cleanMesh`.

### Properties

| Property | Modifier | Type | Description |
| ------ | ------ | ------ | ------ |
| <a id="cleanedmesh-coordinates"></a> `coordinates` | `readonly` | `Float32Array`&lt;`ArrayBufferLike`&gt; \| `Float64Array`&lt;`ArrayBufferLike`&gt; | Flat `[x, y, z, ...]`, in the input's precision. |
| <a id="cleanedmesh-indices"></a> `indices` | `readonly` | `Uint32Array` | Flat triangle indices. |
| <a id="cleanedmesh-report"></a> `report` | `readonly` | [`MeshCleanReport`](buildings.md#meshcleanreport) | What was done. When nothing changed, the input arrays are returned as they are. |

***

<a id="cleanmesh"></a>

## cleanMesh

Import from `@infrared-city/infrared-sdk-ts`.

> **cleanMesh**(`coordinates`, `indices`): [`CleanedMesh`](buildings.md#cleanedmesh)

Cleans one mesh the way analyses clean each building.

Vertices at bit-identical positions are joined (`-0.0` equals `+0.0`, no
tolerance), degenerate and exact duplicate triangles are dropped, the winding
is made consistent (the authored majority wins), and closed parts are turned
outward. An open part keeps its authored direction.

Clean each building on its own: two objects that touch must stay apart.

### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `coordinates` | `Float32Array`&lt;`ArrayBufferLike`&gt; \| `Float64Array`&lt;`ArrayBufferLike`&gt; \| `ArrayLike`&lt;`number`&gt; | Flat vertex coordinates `[x, y, z, ...]`. A `Float64Array` stays double precision; any other input is converted to single precision. |
| `indices` | `ArrayLike`&lt;`number`&gt; \| `Uint32Array`&lt;`ArrayBufferLike`&gt; | Flat triangle vertex indices. |

### Returns

[`CleanedMesh`](buildings.md#cleanedmesh)

The cleaned coordinates and indices, and a report of what changed.

### Throws

for a non-finite coordinate or an index out of range.

### Throws

for an index that is not a whole number in `0..2**32-1`;
  an index is never truncated or wrapped into another triangle.

***

<a id="directbuildingsjson"></a>

## DirectBuildingsJson

Import from `@infrared-city/infrared-sdk-ts/geodata`.

Building footprints read for an area, as GeoJSON FeatureCollection text.

### Properties

| Property | Modifier | Type | Description |
| ------ | ------ | ------ | ------ |
| <a id="directbuildingsjson-collectionjson"></a> `collectionJson` | `readonly` | `string` | The normalised footprints as GeoJSON FeatureCollection text. |
| <a id="directbuildingsjson-overturerelease"></a> `overtureRelease` | `readonly` | `string` | Overture release the footprints came from, or `""` when Overture was not read. |
| <a id="directbuildingsjson-source"></a> `source` | `readonly` | `string` | Which source answered: a city overlay key, or `"overture"`. |
| <a id="directbuildingsjson-warnings"></a> `warnings` | `readonly` | readonly `string`\[\] | Degradations the caller should surface, such as an unavailable city overlay. |

***

<a id="directbuildingsresult"></a>

## DirectBuildingsResult

Import from `@infrared-city/infrared-sdk-ts/geodata`.

Building footprints read for an area, as parsed GeoJSON feature objects.

### Properties

| Property | Modifier | Type | Description |
| ------ | ------ | ------ | ------ |
| <a id="directbuildingsresult-features"></a> `features` | `readonly` | readonly `Record`&lt;`string`, `unknown`&gt;\[\] | The normalised building footprint features. |
| <a id="directbuildingsresult-overturerelease"></a> `overtureRelease` | `readonly` | `string` | Overture release the footprints came from, or `""` when Overture was not read. |
| <a id="directbuildingsresult-source"></a> `source` | `readonly` | `string` | Which source answered: a city overlay key, or `"overture"`. |
| <a id="directbuildingsresult-warnings"></a> `warnings` | `readonly` | readonly `string`\[\] | Degradations the caller should surface, such as an unavailable city overlay. |

***

<a id="dotbimmesh"></a>

## DotBimMesh

Import from `@infrared-city/infrared-sdk-ts`.

One building mesh in dotbim form: flat vertex coordinates plus triangle indices.

Coordinates are in metres in the frame returned as `AreaBuildings.origin`.

### Extends

- `Readonly`&lt;`Record`&lt;`string`, `unknown`&gt;&gt;

### Indexable

> \[`key`: `string`\]: `unknown`

### Properties

| Property | Modifier | Type | Description |
| ------ | ------ | ------ | ------ |
| <a id="dotbimmesh-coordinates"></a> `coordinates` | `readonly` | readonly `number`\[\] | Flat vertex coordinates `[x, y, z, ...]`, in metres. |
| <a id="dotbimmesh-indices"></a> `indices?` | `readonly` | readonly `number`\[\] | Flat triangle vertex indices. |
| <a id="dotbimmesh-mesh_id"></a> `mesh_id` | `readonly` | `number` | Identifier of the mesh within its building. |

***

<a id="meshcleanreport"></a>

## MeshCleanReport

Import from `@infrared-city/infrared-sdk-ts`.

What `cleanMesh` did to one mesh.

### Properties

| Property | Modifier | Type | Description |
| ------ | ------ | ------ | ------ |
| <a id="meshcleanreport-closedcomponents"></a> `closedComponents` | `readonly` | `number` | Closed parts (watertight pieces, turned outward). |
| <a id="meshcleanreport-degeneratefacesremoved"></a> `degenerateFacesRemoved` | `readonly` | `number` | Triangles removed as degenerate (a repeated corner, or zero area). |
| <a id="meshcleanreport-duplicatefacesremoved"></a> `duplicateFacesRemoved` | `readonly` | `number` | Triangles removed as exact duplicates of an earlier one. |
| <a id="meshcleanreport-facesflipped"></a> `facesFlipped` | `readonly` | `number` | Kept triangles whose winding is the reverse of their input winding. |
| <a id="meshcleanreport-nonmanifoldedges"></a> `nonManifoldEdges` | `readonly` | `number` | Edges shared by three or more triangles. |
| <a id="meshcleanreport-opencomponents"></a> `openComponents` | `readonly` | `number` | Open parts (kept at their authored majority direction). |
| <a id="meshcleanreport-verticeswelded"></a> `verticesWelded` | `readonly` | `number` | Input vertices joined into an earlier one by the exact weld. |

***

<a id="meshnotrepresentable"></a>

## MeshNotRepresentable

Import from `@infrared-city/infrared-sdk-ts`.

Returned instead of a `PackedMesh` when the mesh cannot be expressed in the
compact form.

### Properties

| Property | Modifier | Type | Description |
| ------ | ------ | ------ | ------ |
| <a id="meshnotrepresentable-not_representable"></a> `not_representable` | `readonly` | `string` | Why the mesh cannot be packed. |

***

<a id="meshpackverdict"></a>

## MeshPackVerdict

Import from `@infrared-city/infrared-sdk-ts`.

> **MeshPackVerdict** = [`PackedMesh`](buildings.md#packedmesh) \| [`MeshNotRepresentable`](buildings.md#meshnotrepresentable)

The outcome of `packMesh`: either a `PackedMesh` or a `MeshNotRepresentable`.

***

<a id="packedmesh"></a>

## PackedMesh

Import from `@infrared-city/infrared-sdk-ts`.

A mesh packed into the compact transfer form.

### Properties

| Property | Modifier | Type | Description |
| ------ | ------ | ------ | ------ |
| <a id="packedmesh-coordinates_bin"></a> `coordinates_bin` | `readonly` | `string` | The vertex coordinates, packed and base64-encoded. |
| <a id="packedmesh-indices_bin"></a> `indices_bin` | `readonly` | `string` | The triangle indices, packed and base64-encoded. |

***

<a id="packmesh"></a>

## packMesh

Import from `@infrared-city/infrared-sdk-ts`.

> **packMesh**(`coordinates`, `indices`): [`MeshPackVerdict`](buildings.md#meshpackverdict)

Pack a triangle mesh into the compact form used for request bodies.

`initializeCore()` must have completed. Check the result for a
`not_representable` field before using it as a `PackedMesh`.

### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `coordinates` | `Float64Array`&lt;`ArrayBufferLike`&gt; \| readonly `number`\[\] | Flat vertex coordinates (`x, y, z, x, y, z, ...`). |
| `indices` | readonly `number`\[\] | Flat triangle vertex indices, three per triangle. |

### Returns

[`MeshPackVerdict`](buildings.md#meshpackverdict)

The packed mesh, or a verdict saying why the mesh cannot be packed.

### Throws

when `coordinates` or `indices` contains a non-finite number.

***
