Skip to content

autk-map


autk-map / TriangulatorBuildings

Class: TriangulatorBuildings

Defined in: triangulator-buildings.ts:11

Class for triangulating buildings from GeoJSON features. It provides methods to convert different geometry types into building meshes.

Constructors

Constructor

new TriangulatorBuildings(): TriangulatorBuildings

Returns

TriangulatorBuildings

Methods

buildMesh()

static buildMesh(geojson, origin): [ILayerGeometry[], ILayerComponent[]]

Defined in: triangulator-buildings.ts:18

Builds a mesh from GeoJSON features representing buildings.

Parameters

geojson

FeatureCollection

The GeoJSON feature collection

origin

number[]

The origin point for translation

Returns

[ILayerGeometry[], ILayerComponent[]]

An array of geometries and components


lineStringToBuildingMesh()

static lineStringToBuildingMesh(feature, heightInfo, origin): object[]

Defined in: triangulator-buildings.ts:149

Converts a LineString feature to a border representation.

Parameters

feature

Feature

The GeoJSON feature representing a LineString

heightInfo

number[]

origin

number[]

The origin point for translation

Returns

object[]

An array of borders


multiLineStringToBuilding()

static multiLineStringToBuilding(feature, heightInfo, origin): object[]

Defined in: triangulator-buildings.ts:170

Converts a LineString feature to a border representation.

Parameters

feature

Feature

The GeoJSON feature representing a LineString

heightInfo

number[]

origin

number[]

The origin point for translation

Returns

object[]

An array of borders


multiPolygonToBuilding()

static multiPolygonToBuilding(feature, heightInfo, origin): object[]

Defined in: triangulator-buildings.ts:222

Converts a LineString feature to a border representation.

Parameters

feature

Feature

The GeoJSON feature representing a LineString

heightInfo

number[]

origin

number[]

The origin point for translation

Returns

object[]

An array of borders


polygonToBuilding()

static polygonToBuilding(feature, heightInfo, origin): object[]

Defined in: triangulator-buildings.ts:196

Converts a LineString feature to a border representation.

Parameters

feature

Feature

The GeoJSON feature representing a LineString

heightInfo

number[]

origin

number[]

The origin point for translation

Returns

object[]

An array of borders

Released under the MIT License.