Class: Extent

og/Extent.Extent

Represents geographical coordinates extent.

new module:og/Extent.Extent(sw, ne)

Name Type Description
sw LonLat optional South West extent corner coordiantes.
ne LonLat optional North East extent corner coordiantes.

Members

static,constantmodule:og/Extent.Extent.FULL_MERC

Whole mercator extent.

static,constantmodule:og/Extent.Extent.NORTH_POLE_DEG

Degrees extent from north mercator limit to north pole.

static,constantmodule:og/Extent.Extent.SOUTH_POLE_DEG

Degrees extent from south pole to south mercator limit.

northEast

southWest

Methods

staticmodule:og/Extent.Extent.createByCoordinates(arr){Extent}

Creates bound extent instance by coordinate array.
Name Type Description
arr Array.<LonLat> Coordinate array.
Returns:
Type Description
Extent Extent object.

staticmodule:og/Extent.Extent.createByCoordinatesArr(arr){Extent}

Creates bound extent instance by coordinate array.
Name Type Description
arr Array.<Array.<number>> Coordinate array. (exactly 2 entries)
Returns:
Type Description
Extent Extent object.

staticmodule:og/Extent.Extent.createFromArray(arr){Extent}

Creates extent instance from values in array.
Name Type Description
arr Array.<number> South west and north east longitude and latidudes packed in array. (exactly 4 entries)
Returns:
Type Description
Extent Extent object.

staticmodule:og/Extent.Extent.fromTile(x, y, z, width, height){Extent}

Creates extent by meractor grid tile coordinates.
Name Type Description
x number -
y number -
z number -
width number -
height number -
Returns:
Type Description
Extent -

clone(){Extent}

Creates clone instance of the current extent.
Returns:
Type Description
Extent Extent clone.

equals(extent){boolean}

Returns extents are equals.
Name Type Description
extent Extent Extent.
Returns:
Type Description
boolean -

forwardMercator(){Extent}

Converts extent coordinates to mercator projection coordinates.
Returns:
Type Description
Extent New instance of the current extent.

getCartesianBounds(ellipsoid){Array.<number>}

Gets cartesian bounding bounds of the current ellipsoid.
Name Type Description
ellipsoid Ellipsoid Ellipsoid.
Returns:
Type Description
Array.<number> Cartesian 3d coordinate array. (exactly 6 entries)

getCenter(){number}

Gets the center coordinate of the extent.
Returns:
Type Description
number Center coordinate.

getHeight(){number}

Gets extent height.
Returns:
Type Description
number Extent height.

getNorth()

getNorthEast()

getNorthWest()

getSouth()

getSouthEast()

getWest()

getWidth(){number}

Gets extent width.
Returns:
Type Description
number Extent width.

inverseMercator(){Extent}

Converts extent coordinates from mercator projection to degrees.
Returns:
Type Description
Extent New instance of the current extent.

isInside(lonlat){boolean}

Determines if point inside extent.
Name Type Description
lonlat LonLat Coordinate point.
Returns:
Type Description
boolean Returns true if point inside extent.

overlaps(e){boolean}

Returns true if two extent overlap each other.
Name Type Description
e Extent Another extent.
Returns:
Type Description
boolean -

setByCoordinates(arr){Extent}

Sets current bounding extent object by coordinate array.
Name Type Description
arr Array.<LonLat> Coordinate array.
Returns:
Type Description
Extent Current extent.