public class HeatmapSurface extends Object
The Heatmap surface is computed as a grid (raster) of values representing the surface. For stability, the compute grid is expanded by the kernel radius on all four sides. This avoids "edge effects" from distorting the surface within the requested envelope.
The values in the output surface are normalized to lie in the range [0, 1].
Constructor and Description |
---|
HeatmapSurface(int kernelRadius,
Envelope srcEnv,
int xSize,
int ySize)
Creates a new heatmap surface.
|
Modifier and Type | Method and Description |
---|---|
void |
addPoint(double x,
double y,
double value)
Adds a new data point to the surface.
|
float[][] |
computeSurface()
Computes a grid representing the heatmap surface.
|
public HeatmapSurface(int kernelRadius, Envelope srcEnv, int xSize, int ySize)
kernelRadius
- the kernel radius, in grid unitssrcEnv
- the envelope defining the data spacexSize
- the width of the output gridySize
- the height of the output gridpublic void addPoint(double x, double y, double value)
x
- the X ordinate of the pointy
- the Y ordinate of the pointvalue
- the data value of the pointpublic float[][] computeSurface()
Copyright © 1996–2019 Geotools. All rights reserved.