From f2ecc1803f3ea294a0c6b7915b61348ed0395b26 Mon Sep 17 00:00:00 2001 From: Marcin Zelent Date: Wed, 16 Nov 2022 15:16:38 +0100 Subject: Remade and extended the app using React --- src/types/geojson-bounds.d.ts | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 src/types/geojson-bounds.d.ts (limited to 'src/types/geojson-bounds.d.ts') diff --git a/src/types/geojson-bounds.d.ts b/src/types/geojson-bounds.d.ts new file mode 100644 index 0000000..99eb4a0 --- /dev/null +++ b/src/types/geojson-bounds.d.ts @@ -0,0 +1,33 @@ +declare module 'geojson-bounds' { + import geojson from 'geojson'; + + /** + * Returns an array of coordinates in the order [West, South, East, North] that represents the extent of the provided feature or geometry + */ + export function extent(geojson: geojson.GeoJSON): [number, number, number, number]; + + /** + * Returns a GeoJSON Feature polygon that repesents the bounding box of the provided feature or geometry + */ + export function envelope(geojson: geojson.GeoJSON): geojson.Feature; + + /** + * Returns the western-most longitude of the provided feature or geometry + */ + export function xMin(geojson: geojson.GeoJSON): number; + + /** + * Returns the eastern-most longitude of the provided feature or geometry + */ + export function xMax(geojson: geojson.GeoJSON): number; + + /** + * Returns the southern-most latitude of the provided feature or geometry + */ + export function yMin(geojson: geojson.GeoJSON): number; + + /** + * Returns the northern-most latitude of the provided feature or geometry + */ + export function yMax(geojson: geojson.GeoJSON): number; +} -- cgit v1.2.3