diff options
author | Marcin Zelent <marcin@zelent.net> | 2022-11-16 15:16:38 +0100 |
---|---|---|
committer | Marcin Zelent <marcin@zelent.net> | 2022-11-16 15:16:38 +0100 |
commit | f2ecc1803f3ea294a0c6b7915b61348ed0395b26 (patch) | |
tree | e8c6fb1350ae4f659b3f9ef8d17157158b974b16 /src/types/geojson-bounds.d.ts | |
parent | efb64f24d6200a39870c0e8966ab4f87e07c93a9 (diff) |
Remade and extended the app using React
Diffstat (limited to 'src/types/geojson-bounds.d.ts')
-rw-r--r-- | src/types/geojson-bounds.d.ts | 33 |
1 files changed, 33 insertions, 0 deletions
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<geojson.Polygon>;
+
+ /**
+ * 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;
+}
|