Processing — vector → raster interpolation and in-house WPS¶
Goal: turn point observations into continuous fields. Two very different situations, two answers:
- dense networks (SYNOP, METAR): an in-house IDW process, exposed both as a WPS process and as an SLD rendering transformation (colored surface computed on the fly from the observation layer);
- sparse, badly distributed networks (TEMP, AMDAR — a handful of stations, one vertical level at a time): a comparative study on a known synthetic field, concluded by ADR-0013.
Artifacts: poc/08-processing/ (study, tests) and
poc/02-geoserver-image/meteo-wps/ (process module).
In-house process module (meteo-wps)¶
meteo:IDWInterpolation— Inverse Distance Weighting of a point attribute onto a grid (data,valueAttr,power, plus the rendering-transformation contractoutputBBOX/outputWidth/outputHeight).- Registered through the standard GeoTools SPI
(
META-INF/services/org.geotools.process.ProcessFactory→ a factory extendingAnnotatedBeanProcessFactoryunder themeteonamespace). - The style
obs-idw-temperature(managed as code, like every style) invokes the process as a<Transformation>and paints the result with a kelvin color ramp; it is attached as an additional style ofobs_latest_air_temperature(EXTRA_LAYER_STYLES).
GetMap …&layers=meteo:obs_latest_air_temperature&styles=obs-idw-temperature
Sparse-network study (TEMP/AMDAR case)¶
Protocol (study/compare.py, runnable in a plain Python container): a known
synthetic truth field is sampled at 5 stations clustered in one corner;
four reconstructions are scored against the truth (RMSE, same color scale):
| Method | RMSE (K) |
|---|---|
| IDW p=2 | 4.40 |
| Barnes 2-pass | 4.93 |
| RBF thin-plate | 6.77 |
| model first guess + corrections | 1.36 |
| (raw first guess, for reference) | 2.37 |
Readings: pure spatial methods hallucinate everywhere the stations are not — and RBF, often praised for sparse data, extrapolates worst with clustered stations. Starting from an (imperfect) model field and correcting it with the observed innovations beats everything by a wide margin — and even improves on the raw model. Hence ADR-0013.
Verification (tests poc/08-processing/tests/)¶
01 The process is described and listed by WPS:
02 The rendering transformation produces the colored surface on two pods
(and the point rendering stays available as the default style):
03 Process, style and attachment survive a pod replacement:
Deviations and pitfalls observed (rendering transformations)¶
- Process factories are discovered through the GeoTools SPI, not through
Spring beans: ship a
META-INF/services/org.geotools.process.ProcessFactoryentry (a bean alone is silently ignored). AnnotatedBeanProcessFactorynames processes after the class name minus "Process" (IDWInterpolationProcess→meteo:IDWInterpolation).- Implement
invertQuery— without it the renderer pushes an unbounded envelope down to PostGIS (POLYGON((-Infinity …parse error). - In
invertQuery, request all properties (setPropertyNames(null)): the renderer only fetches attributes referenced by symbolizers, and the process's value attribute is a literal it knows nothing about — the symptom is an empty collection while the plain layer renders fine. - IDW is global: the data query deliberately keeps all features (documented performance caveat for very large networks).








