Skip to content

API / geotoolkit / contour / grid / GridRange / GridRange

Class: GridRange

grid.GridRange.GridRange

Stores the x,y grid extents for a contour grid object.

Table of contents

Constructors
[new GridRange()](/solutions/geotoolkit/GeoToolkit_JS/apis/classes/geotoolkit.contour.grid.gridrange.gridrange.md#new gridrange())[new GridRange(left, bottom, right, top)](/solutions/geotoolkit/GeoToolkit_JS/apis/classes/geotoolkit.contour.grid.gridrange.gridrange.md#new gridrange(left, bottom, right, top))[new GridRange(range)](/solutions/geotoolkit/GeoToolkit_JS/apis/classes/geotoolkit.contour.grid.gridrange.gridrange.md#new gridrange(range))
Methods

Contents

Constructors

new GridRange()

• new GridRange()


new GridRange(left, bottom, right, top)

• new GridRange(left?, bottom?, right?, top?)

Parameters

Name Type Description
Optional leftnumberstart index for coordinates arrays.
Optional bottomnumberstart index for coordinates arrays.
Optional rightnumberstart index for coordinates arrays.
Optional topnumberstart index for coordinates arrays.

new GridRange(range)

• new GridRange(range)

Parameters

Name Type
rangeGridRange
Methods

contains

▸ contains(x, y): boolean

Checks if the supplied point or range is contained within this one.

Parameters

Name Type Description
xnumberX-coordinate
ynumberY-coordinate

Returns

boolean

▸ contains(range): boolean

Parameters

Name Type
rangeGridRange

Returns

boolean


getBottom

▸ getBottom(): number

The bottom extent of this grid range

Returns

number

bottom


getClassName

▸ getClassName(): string

Returns

string


getHeight

▸ getHeight(): number

The height of this grid range

Returns

number

height


getLeft

▸ getLeft(): number

The left extent of this grid range

Returns

number

left


getRect

▸ getRect(): Rect

Grid Range as a Rect object

Returns

Rect

rect The range as a Rect.


getRight

▸ getRight(): number

The right extent of this grid range

Returns

number

right


getTop

▸ getTop(): number

The top extent of this grid range

Returns

number

top


getWidth

▸ getWidth(): number

The width of this grid range

Returns

number

width


intersection

▸ intersection(range): GridRange

Computes the intersection between this grid range and the specified grid range.

Parameters

Name Type Description
rangeGridRangeThe grid range

Returns

GridRange

intersection The intersected grid range.


intersects

▸ intersects(range): boolean

Determines whether this grid range intersects with the supplied grid range.

Parameters

Name Type Description
rangeGridRangeThe grid range to check against

Returns

boolean

intesects True if the two grid ranges intersect


isEmpty

▸ isEmpty(): boolean

Determines if this range is empty

Returns

boolean

empty True if the grid range is empty


reset

▸ reset(): void

Resets this grid range to be empty: Sets the size to zero, and the position to (0,0)

Returns

void


setGridRange

▸ setGridRange(left, bottom, right, top): GridRange

Sets the range for this grid

Parameters

Name Type Description
leftnumberGridRange
bottomnumberBottom range extent
rightnumberRight range extent
topnumberTop range extent

Returns

GridRange

this

▸ setGridRange(range): GridRange

Sets the range for this grid

Parameters

Name Type Description
rangeGridRangeGridRange

Returns

GridRange

this


getClassName

▸ Static getClassName(): string

Returns

string