aboutsummaryrefslogtreecommitdiff
blob: 99eb4a07c0b2d65a1bf60e4fe3acac19894bf274 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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;
}