Skip to content

@urban-toolkit/autk-core


@urban-toolkit/autk-core / PolylineBuilder

Class: PolylineBuilder ​

Defined in: polyline-builder.ts:13

Builds centerline topology without buffering polygons or resolving visual widths.

Constructors ​

Constructor ​

new PolylineBuilder(): PolylineBuilder

Returns ​

PolylineBuilder

Methods ​

build() ​

static build(geojson, origin): PolylineData

Defined in: polyline-builder.ts:20

Builds local XY centerlines for LineString, MultiLineString and nested GeometryCollection. Consecutive duplicate vertices are removed after float32 conversion. Invalid paths and paths with fewer than two distinct points are skipped. Components retain source IDs. Five vertices per node support segment quads and width-independent join triangles.

Parameters ​

geojson ​

FeatureCollection

origin ​

number[]

Returns ​

PolylineData

Released under the MIT License.