UNPKG

@loaders.gl/geoarrow

Version:

GeoArrow columnar geometry encoding and decoding

30 lines 1.24 kB
import * as arrow from 'apache-arrow'; import type { GeoArrowEncoding } from "./metadata/geoarrow-metadata.js"; /** * @see https://geoarrow.org/format.html#memory-layouts */ export type GeoArrowGeometryInfo = { /** Geometry encodings that are compatible with this column (Field) */ compatibleEncodings: GeoArrowEncoding[]; /** How many levels of List<> nesting */ nesting: 0 | 1 | 2 | 3; /** How many values per coordinate */ dimension: number; /** * - 0: A point is just a Coordinate * - 1: A line string or a multipoint is a List<Coordinate> * - 2: A polygon or a multilinestring are List<List<Coordinate>> * - 3: multipolygons are List<List<List<Coordinate>>> */ /** Coordinate memory layout {x,y,...} vs [x,y,...] */ coordinates: 'separated' | 'interleaved'; /** Coordinate */ valueType: 'double'; }; /** * Examines a column containing GeoArrow formatted data and returns information about the geometry type * that can be useful during traversal * @see https://geoarrow.org/format.html#memory-layouts */ export declare function getGeoArrowGeometryInfo(arrowField: arrow.Field): GeoArrowGeometryInfo | null; //# sourceMappingURL=get-geoarrow-geometry-info.d.ts.map