well-known-parser
Version:
A WKT/WKB/EWKT/EWKB/TWKB/GeoJSON parser and serializer
31 lines (30 loc) • 1.19 kB
TypeScript
import { GeometryCollection as GeoJSONGeometryCollection, LineString as GeoJSONLineString, MultiLineString as GeoJSONMultiLineString, MultiPoint as GeoJSONMultiPoint, MultiPolygon as GeoJSONMultiPolygon, Point as GeoJSONPoint, Polygon as GeoJSONPolygon } from 'geojson';
export interface GeometryOptions {
srid?: number;
hasZ?: boolean;
hasM?: boolean;
hasSrid?: boolean;
isEwkb?: boolean;
isEmpty?: boolean;
precision?: number;
precisionFactor?: number;
hasBoundingBox?: boolean;
hasSizeAttribute?: boolean;
hasIdList?: boolean;
hasExtendedPrecision?: boolean;
zPrecision?: number;
zPrecisionFactor?: number;
mPrecision?: number;
mPrecisionFactor?: number;
}
export interface TwkbPrecision {
xy: number;
z: number;
m: number;
xyFactor: number;
zFactor: number;
mFactor: number;
}
export type GeoJSONGeometry = GeoJSONPoint | GeoJSONMultiPoint | GeoJSONLineString | GeoJSONMultiLineString | GeoJSONPolygon | GeoJSONMultiPolygon | GeoJSONGeometryCollection;
export type Coordinates<T extends Exclude<GeoJSONGeometry, GeoJSONGeometryCollection>> = T['coordinates'];
//# sourceMappingURL=types.d.ts.map