UNPKG

flatgeobuf

Version:

A performant binary encoding for geographic data

18 lines (17 loc) 1.09 kB
import type { ColumnMeta } from '../column-meta.js'; import { Feature } from '../flat-geobuf/feature.js'; import type { HeaderMeta } from '../header-meta.js'; import { type ICreateGeometry, type IParsedGeometry, type ISimpleGeometry } from './geometry.js'; export interface IProperties { [key: string]: boolean | number | string | Uint8Array | undefined; } export interface IFeature { getGeometry?(): ISimpleGeometry; getId?(): number; getProperties?(): IProperties; setProperties?(properties: IProperties): void; } export type ICreateFeature = (id: number, geometry?: ISimpleGeometry, properties?: Record<string, string | number | boolean | Uint8Array | undefined>) => IFeature; export declare function fromFeature(id: number, feature: Feature, header: HeaderMeta, createGeometry: ICreateGeometry, createFeature: ICreateFeature): IFeature; export declare function buildFeature(geometry: IParsedGeometry, properties: IProperties, header: HeaderMeta): Uint8Array; export declare function parseProperties(feature: Feature, columns?: ColumnMeta[] | null): IProperties;