On this page

# GeoDataSet

### new GeoDataSet(width, height, bbox, data)

Mostly the same a DataSet except it has bounds. A few methods, like slope, dzdx, dzdy, and aspect are different because they take into account the size of the bbox in meters

Parameters:

Name | Type | Description
--- | --- | ---
`width` | Number | width of the DataSet in pixels
`height` | Number | height of the DataSet in pixels
`bbox` | Array | [west, south, east, north]
`data` | TypedArray |

Source
  - GeoDataSet.js, line 14

## Methods

### (static) viewFromDataSet(dataSet, bbox) → {GeoDataSet}

Create a view of a Dataset including the bounds.

Parameters:

Name | Type | Description
--- | --- | ---
`dataSet` | DataSet |
`bbox` | Array | [west, south, east, north]

Source
  - GeoDataSet.js, line 27

Returns:

GeoDataSet view of the dataset data. It is a view not a copy.

Type:
  GeoDataSet

### sampleGeo(geoX, geoY, useNearest) → {Number}

Samples a pixel at a given latitude and longitude

Parameters:

Name | Type | Default | Description
--- | --- | --- | ---
`geoX` | Number |  | longitude
`geoY` | Number |  | latitude
`useNearest` | Boolean | true |

Source
  - GeoDataSet.js, line 70

Throws:

Out Of Range Error - when it is outside of the bbox

Returns:

Type:
  Number

### dzdx() → {GeoDataset}

Change in z value in terms of x. Finite difference.

Source
  - GeoDataSet.js, line 80

Returns:

Type:
  GeoDataset

### dzdy() → {GeoDataSet}

Change in z value in terms of y. Finite difference.

Source
  - GeoDataSet.js, line 93

Returns:

Type:
  GeoDataSet

### slopeAndAspect() → {SlopeAndAspect}

Create dzdx, dzdy, slope, and aspect in one function.

Source
  - GeoDataSet.js, line 106

Returns:

{dzdx, dzdy, slope, aspect}

Type:
  SlopeAndAspect

### aspect(dzdx, dzdy) → {GeoDataSet}

The aspect of each pixel in radians.

Parameters:

Name | Type | Description
--- | --- | ---
`dzdx` | GeoDataset |
`dzdy` | GeoDataSet |

Source
  - GeoDataSet.js, line 121

Returns:

Aspect in radians.

Type:
  GeoDataSet

### slope(dzdx, dzdy) → {GeoDataset}

Returns the slope in radians

Parameters:

Name | Type | Description
--- | --- | ---
`dzdx` | GeoDataset |
`dzdy` | GeoDataset |

Source
  - GeoDataSet.js, line 137

Returns:

Type:
  GeoDataset

Type anything to view search result