> 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/geometry/buildings.md).

# Buildings

Geometry Type:  <mark style="color:blue;">`meshes`</mark>&#x20;

```javascript
{
     "type": "buildings",
     "geometryType": "meshes",
     "meshes": Mesh[]
},
```

What does a Mesh element contain? This is the example:

```javascript
{
     // The most important element of any meshed geometry for visualization
     "vertices": [x1, y1, z1, x2, y2, z2, ...],
     "descriptor": {
          source: "osm",
          hasDefaultHeight: Boolean,
          hasDefaultRoof: Boolean
     }
},
```

\
An example of how to render meshed geometry in Three.js (more info[Three.js Quick Guide](/docs/getting-started/three-quick-guide.md))

```javascript
const geometry = new THREE.BufferGeometry();
const verticesArray = new Float32Array(mesh.vertices);
geometry.setAttribute( 'position', new THREE.BufferAttribute( verticesArray, 3 ) );
geometry.computeVertexNormals();
```

{% hint style="info" %}
We combine building data from multiple sources. You can use the `source` parameter to identify the specific source of each building.
{% endhint %}

<figure><img src="/files/Yz4V1Yfm5TLRQIaXeH15" alt=""><figcaption><p>Different colours for different data sources</p></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://cityweft.gitbook.io/docs/geometry/buildings.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
