API / geotoolkit / controls / util / density / DensityGrid / DensityGrid
density.DensityGrid.DensityGrid
Computes contour polygons by applying marching squares to a rectangular array of numeric values. Each node contains a density value.
The grid coordinate system is orthogonal. The node indices may be only non-negative (starting from 0). You may think about grid data as of two-dimensional array.
↳
DensityGrid
Constructors
Methods
Css Properties
| Name | Type | Description |
|---|---|---|
bandwidth | number | Band width |
cellsize | number | Cell size |
dimension | Dimension | Virtual grid dimension |
dimension-height | number | Height of dimension |
dimension-width | number | Width of dimension or properties |
modellimits | Rect | Real model limits of X and Y values, by default it is calculated with using min and max values for specified data |
modellimits-height | number | Height |
modellimits-readonly | boolean | Readonly |
modellimits-width | number | Width |
modellimits-x | number | Left |
modellimits-y | number | Top |
thresholds | number | Thresholds |
Methods
▸ dispose(): void
Dispose.
void
▸ getAverageDistance(): number
Return average distance from center
number
average distance
▸ getBandwidth(): number
Return band width
number
band width
▸ getCellSize(): number
Return cell size
number
cell size
▸ getCenterX(): number
Return center of x values
number
center x
▸ getCenterY(): number
Return center of y values
number
center y
▸ getClassName(): string
string
▸ getContours(): { coordinates: number[][][][] ; value: number }[]
Return density contours coordinates
{ coordinates: number[][][][] ; value: number }[]
density contours objects
▸ getDensityValueAt(n, m): number
Return density grid value at specified n m grid indices
| Name | Type | Description |
|---|---|---|
n | number | n index, horizontal |
m | number | m index, vertical |
number
density value
▸ getDensityValues(): Float32Array
Return density values
Float32Array
packed density values
▸ getGridDimension(): Dimension
Return grid dimension
grid dimension
▸ getGridSize(): Dimension
Return grid size
grid size
▸ getGridToModelTransformation(): Transformation
Return grid to model transformation
grid to model transformation
▸ getModelLimits(): Rect
Return model limits
values model limits
▸ getProperties(): OptionsOut
Gets all the properties pertaining to this object
properties
▸ getThresholds(): number | number[] | (value: Float32Array) => number
Return thresholds
number | number[] | (value: Float32Array) => number
thresholds
▸ getX(): number[]
Return X values
number[]
x values
▸ getY(): number[]
Return Y values
number[]
y values
▸ hasEventListener(type, callback?): boolean
Check if a list of event listeners for this type contains this listener
| Name | Type | Description |
|---|---|---|
type | string | type of event or property |
Optional callback | Function | to be called, if null, check if any callback is registered |
boolean
EventDispatcher.hasEventListener
▸ isDisposed(): boolean
Returns whether this object has been disposed
boolean
▸ isSilent(): boolean
Return true if the event dispatcher doesn't notify any events
boolean
▸ notify(type, source, args?): DensityGrid
Notify listeners
| Name | Type | Description |
|---|---|---|
type | string | event types |
source | any | of the event |
Optional args | any | arguments of the event |
this
▸ off(type?, callback?): DensityGrid
Detach listener on event. Calling .off() with no arguments removes all attached listeners. Calling .off(type) with no callback removes all attached listeners for specific type.
| Name | Type | Description |
|---|---|---|
Optional type | string | type of the event |
Optional callback | EventListener | function to be called |
this
▸ off<E>(type, callback): DensityGrid
| Name | Type |
|---|---|
E | extends string |
| Name | Type |
|---|---|
type | E |
callback | (eventType: E, sender: DensityGrid, args: EventMap[E]) => void |
▸ on(type, callback, options?): DensityGrid
Attach listener on event that will be called whenever the specified event is delivered to the target
If the callback function is already in the list of event listeners for this target, the function is not added a second time.
If a particular anonymous function is in the list of event listeners registered for a certain target, and then later in the code, an identical anonymous function is given in an "on" call, the second function will also be added to the list of event listeners for that target.
| Name | Type | Description |
|---|---|---|
type | string | type of event or property |
callback | EventListener | to be called |
Optional options | Options | options of subscription |
this
▸ on<E>(type, callback, options?): DensityGrid
| Name | Type |
|---|---|
E | extends string |
| Name | Type |
|---|---|
type | E |
callback | (eventType: E, sender: DensityGrid, args: EventMap[E]) => void |
Optional options | Options |
▸ setBandwidth(bandwidth): DensityGrid
Set band width
Throws
Error if bandwidth < 0
| Name | Type | Description |
|---|---|---|
bandwidth | number | band width |
this
▸ setCellSize(cellSize): DensityGrid
Set cell size
| Name | Type | Description |
|---|---|---|
cellSize | number | cell size |
this
▸ setGridDimension(dimension): DensityGrid
Set grid dimension
Throws
Error if passed parameter is null
| Name | Type | Description |
|---|---|---|
dimension | Dimension | grid dimension |
this
▸ setModelLimits(modelLimits): DensityGrid
Set model limits
| Name | Type | Description |
|---|---|---|
modelLimits | Rect | values model limits |
this
▸ setProperties(properties?): DensityGrid
Sets all the properties pertaining to this object
| Name | Type | Description |
|---|---|---|
Optional properties | Options | An object containing the properties to set |
this
▸ setSilent(bool): DensityGrid
Set silent mode
| Name | Type | Description |
|---|---|---|
bool | boolean | flag to enable silent mode |
this
▸ setThresholds(thresholds): DensityGrid
Set thresholds
| Name | Type | Description |
|---|---|---|
thresholds | number | number[] | (value: Float32Array) => number | thresholds |
this
▸ setValues(x, y): DensityGrid
Set X Y values
| Name | Type | Description |
|---|---|---|
x | number[] | X values |
y | number[] | Y values |
this
▸ setX(x): DensityGrid
Set X values
| Name | Type | Description |
|---|---|---|
x | number[] | x values |
this
▸ setY(y): DensityGrid
Set Y values
| Name | Type | Description |
|---|---|---|
y | number[] | y values |
this
▸ Static getClassName(): string
string