Installation
npm install --save @types/terraformer__spatial
Summary
This package contains type definitions for @terraformer/spatial (https://github.com/terraformer-js/terraformer).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/terraformer__spatial.
index.d.ts
import * as GeoJSON from "geojson";
export const MercatorCRS: { type: string; properties: { href: string; type: string } };
export const GeographicCRS: { type: string; properties: { href: string; type: string } };
export function calculateBounds(geojson: GeoJSON.GeoJSON): GeoJSON.BBox;
export function calculateEnvelope(geojson: GeoJSON.GeoJSON): { x: number; y: number; w: number; h: number };
export function positionToGeographic(position: GeoJSON.Position): GeoJSON.Position;
export function positionToMercator(position: GeoJSON.Position): GeoJSON.Position;
export function toGeographic<T extends GeoJSON.GeoJSON>(geojson: T): T;
export function toMercator<T extends GeoJSON.GeoJSON>(geojson: T): T;
export function convexHull(geojson: GeoJSON.GeoJSON): GeoJSON.Polygon;
export function isConvex(geojson: GeoJSON.GeoJSON): boolean;
export function polygonContainsPoint(polygon: GeoJSON.Position[][], point: GeoJSON.Position): boolean;
export function within(geojson: GeoJSON.GeoJSON, comparisonGeojson: GeoJSON.GeoJSON): boolean;
export function contains(geojson: GeoJSON.GeoJSON, comparisonGeojson: GeoJSON.GeoJSON): boolean;
export function intersects(geojson: GeoJSON.GeoJSON, comparisonGeojson: GeoJSON.GeoJSON): boolean;
export function toCircle(
center: GeoJSON.Position,
radius: number,
interpolate?: number,
): GeoJSON.Feature<GeoJSON.Polygon>;
Additional Details
- Last updated: Tue, 07 Nov 2023 15:11:36 GMT
- Dependencies: @types/geojson
Credits
These definitions were written by Jan Zak.