Skip to main content

LayerGeometry

The geometry of a decoded feature: the GeoJSON types a layer can draw. Positions keep longitude first and drop any third value (depth is mapped into a field instead).

This is a type alias exported by @mapcairn/core, checked against version 0.2.0.

Signature​

import type { LayerGeometry } from "@mapcairn/core";

type LayerGeometry = {
readonly type: "Point";
readonly coordinates: Position;
} | {
readonly type: "LineString";
readonly coordinates: readonly Position[];
} | {
readonly type: "MultiLineString";
readonly coordinates: readonly (readonly Position[])[];
} | {
readonly type: "Polygon";
readonly coordinates: readonly (readonly Position[])[];
} | {
readonly type: "MultiPolygon";
readonly coordinates: readonly (readonly (readonly Position[])[])[];
};

See also​

Source: packages/core/src/ports/layers.ts:20