Class: Extent

og/Extent~Extent

new Extent(sw, ne)

Represents geographical coordinates extent.
Name Type Description
sw og.LonLat optional South West extent corner coordiantes.
ne og.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){og.Extent}

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

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

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

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

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

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

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

clone(){og.Extent}

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

equals(extent){boolean}

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

forwardMercator(){og.Extent}

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

getCartesianBounds(ellipsoid){Array.<number, number, number, number, number, number>}

Gets cartesian bounding bounds of the current ellipsoid.
Name Type Description
ellipsoid og.Ellipsoid Ellipsoid.
Returns:
Type Description
Array.<number, number, number, number, number, number> Cartesian 3d coordinate array.

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(){og.Extent}

Converts extent coordinates from mercator projection to degrees.
Returns:
Type Description
og.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){og.Extent}

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