@loaders.gl/wkt
Version:
Loader and Writer for the WKT (Well Known Text) Format
33 lines • 902 B
TypeScript
import type { Feature, Geometry } from '@loaders.gl/schema';
/**
* Integer code for geometry type
* Reference: https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry#Well-known_binary
*/
export declare enum WKB {
Point = 1,
LineString = 2,
Polygon = 3,
MultiPoint = 4,
MultiLineString = 5,
MultiPolygon = 6,
GeometryCollection = 7
}
/**
* Options for encodeWKB
*/
type WKBOptions = {
/** Does the GeoJSON input have Z values? */
hasZ?: boolean;
/** Does the GeoJSON input have M values? */
hasM?: boolean;
/** Spatial reference for input GeoJSON */
srid?: any;
};
/**
* Encodes a GeoJSON object into WKB
* @param geojson A GeoJSON Feature or Geometry
* @returns string
*/
export declare function encodeWKB(geometry: Geometry | Feature, options?: WKBOptions): ArrayBuffer;
export {};
//# sourceMappingURL=encode-wkb.d.ts.map