geopackage-ts
    Preparing search index...

    Interface Polygon

    Represents a polygon geometry defined by one exterior ring and zero or more interior rings (holes).

    Each ring is a flat array of coordinates with the same stride convention as LineString. The first ring is the exterior ring; subsequent rings are interior rings (holes).

    const polygon: Polygon = {
    type: 'Polygon',
    hasZ: false,
    hasM: false,
    rings: [
    [0, 0, 4, 0, 4, 4, 0, 4, 0, 0], // exterior ring (closed)
    ],
    };
    interface Polygon {
        hasM: boolean;
        hasZ: boolean;
        rings: number[][];
        type: "Polygon";
    }
    Index

    Properties

    Properties

    hasM: boolean

    Whether the geometry includes M (measure) values.

    hasZ: boolean

    Whether the geometry includes Z (elevation/altitude) values.

    rings: number[][]

    Array of rings, where each ring is a flat coordinate array.

    The first element is the exterior ring; any additional elements are interior rings (holes). Each ring follows the flat-coordinate layout with stride = 2 + Z + M.

    type: "Polygon"

    Discriminant literal identifying this geometry as a Polygon.