public class BarnesSurfaceProcess extends Object implements VectorProcess
BarnesSurfaceInterpolatorto compute an interpolated surface over a set of irregular data points as a
The implementation allows limiting the radius of influence of observations, in order to prevent extrapolation into unsupported areas, and to increase performance (by reducing the number of observations considered).
To improve performance, the surface grid can be computed at a lower resolution than the requested output image. The grid is upsampled to match the required image size. Upsampling uses Bilinear Interpolation to maintain visual quality. This gives a large improvement in performance, with minimal impact on visual quality for small cell sizes (for instance, 10 pixels or less).
To ensure that the computed surface is stable (i.e. does not display obvious edge artifacts during zooming, panning and tiling), the data query extent should be expanded to be larger than the specified output extent. This includes "nearby" points which may affect the value of the surface. The expansion distance depends on the length scale, convergence factor, and data spacing in a complex way, so must be manually determined. It does NOT depend on the output window extent. (A good heuristic is to set it to expand by at least the size of the length scale.)
To prevent excessive CPU consumption, the process allows limiting the number of data points to process. If the limit is exceeded the output is computed consuming and using only the maximum number of points specified.
Computation of the surface takes places in the CRS of the output. If the data CRS is geodetic
and the output CRS is planar, or vice-versa, the input points are transformed into the output
CRS. A simple technique is used to convert the surface distance parameters
maxObservationDistance into the output CRS units.
When used as an Rendering Transformation the process rewrites data query to expand the query
BBOX. This includes "nearby" data points to make the computed surface stable under panning and
zooming. To support this the
queryBuffer parameter should be specified to expand the
query extent appropriately.
The output raster parameters can be determined from the request extents, using the following SLD environment variables:
|Constructor and Description|
|Modifier and Type||Method and Description|
Given a target query and a target grid geometry returns the query to be used to read the input data of the process involved in rendering.
public GridCoverage2D execute(SimpleFeatureCollection obsFeatures, String valueAttr, Integer argDataLimit, Double argScale, Double argConvergence, Integer argPasses, Integer argMinObsCount, Double argMaxObsDistance, Double argNoDataValue, Integer argPixelsPerCell, Double argQueryBuffer, ReferencedEnvelope outputEnv, Integer outputWidth, Integer outputHeight, ProgressListener monitor) throws ProcessException
public Query invertQuery(Double argQueryBuffer, Query targetQuery, GridGeometry targetGridGeometry) throws ProcessException
argQueryBuffer- the distance by which to expand the query window
targetQuery- the query used against the data source
targetGridGeometry- the grid geometry of the destination image
Copyright © 1996–2021 Geotools. All rights reserved.