Skip to main content

Class: Contour<ArrayType, GridType, MapType>

Defined in: Contour.ts:95

A field of contoured data.

Grid Compatibility​

  • ✅ PlateCarreeGrid
  • ✅ PlateCarreeRotatedGrid
  • ✅ LambertGrid
  • ❌ UnstructuredGrid
  • ✅ RadarSweepGrid
  • ✅ Geostationary

Example​

// Create a contoured height field, with black contours every 30 m (assuming the height field is in 
// meters).
const contours = new Contour(height_field, {color: '#000000', interval: 30});

Extends​

Type Parameters​

Type Parameter
ArrayType extends TypedArray
GridType extends StructuredGrid
MapType extends MapLikeType

Constructors​

Constructor​

new Contour<ArrayType, GridType, MapType>(field, opts): Contour<ArrayType, GridType, MapType>

Defined in: Contour.ts:107

Create a contoured field

Parameters​

ParameterTypeDescription
fieldRawScalarField<ArrayType, GridType>The field to contour
optsContourOptionsOptions for creating the contours

Returns​

Contour<ArrayType, GridType, MapType>

Overrides​

PlotComponent.constructor

Properties​

PropertyModifierTypeDefined in
optsreadonlyRequired<ContourOptions>Contour.ts:97

Methods​

getContours()​

getContours(): Promise<ContourData>

Defined in: Contour.ts:180

Returns​

Promise<ContourData>


updateField()​

updateField(field): Promise<void>

Defined in: Contour.ts:121

Update the data displayed as contours

Parameters​

ParameterTypeDescription
fieldRawScalarField<ArrayType, GridType>The new field to contour

Returns​

Promise<void>