Quickstart
Cityweft API is designed to be user-friendly and provides a single endpoint to retrieve comprehensive 3D urban data.
Retrieve geometry
POST https://api.cityweft.com/v1/context
Headers
Content-Type
application/json
Authorization
Bearer <token>
Body
The polygon is the only required parameter in this API request.
Make sure to include it in the body to successfully retrieve the geometry
polygon
array of coordinates [lat,lon][]
Represents the user's area on the map
Yes
origin
coortinate [lat,lon]
Optional if you want to directly set the origin
No
Example API Request
Here is an example of a complete API request to retrieve a model in London using the polygon parameter:
{
"polygon": [
[51.5074, -0.1278],
[51.5075, -0.1279],
[51.5076, -0.1280],
[51.5074, -0.1278]
],
"settings": {
"defaultRoofType": "flat",
"defaultLevels": 2,
"defaultLevelHeight": 4,
"topographyModel": false,
"geometry": ["buildings", "surface"]
}
}
Response Example
The response includes:
geometry: An array containing different geometric elements. The currently supportedgeometryTypevalues aremeshes,elevationMaps, andnodes. Each geometry type is associated with specific data fields and descriptors detailing its characteristics.spacialReference: Depends on the selected CRS. More info at Coordinate Systems (CRS)
Cropping Scene
We provide an optional parameter to slice the model according to a polygon. By default, the returned geometry includes everything within the polygon and some extra geometry that may extend beyond its boundaries. Using the cropScene parameter, you can obtain a perfectly sliced model that matches your polygon precisely.

Types of geometry
⚠ When working with 3D visualization libraries, you may need to transform the coordinates to match your rendering engine's coordinate system. For example, some engines use Y-up instead of Z-up.
Last updated




