# 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-quick-guide](https://cityweft.gitbook.io/docs/getting-started/three-quick-guide "mention"))

```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="https://2449447963-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2ahel6HN9zgEzJ1vY9kr%2Fuploads%2FWnpQUEMYAz49ccTiyTRL%2Fscene-1748950382675%20(1).png?alt=media&#x26;token=8875b982-e68e-4fcd-8092-941fed65eb05" alt=""><figcaption><p>Different colours for different data sources</p></figcaption></figure>


---

# 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://cityweft.gitbook.io/docs/geometry/buildings.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.
