[Geoserver-users] Jittering to anonymize data

I have survey point data (soil geochemistry) that is representative for an area but on display, I need to jitter the point location so the actual location cannot be discovered. For users point of view, you can click on points and view data, but every time you refresh (or preferably every time zoom) the point location will change within a certain parameters.

An example https://iupui-earth-science.shinyapps.io/MME_Global/

Any idea of how I might achieve this with geoserver? Anyone done similar??

All I can think of is to draw from a very custom WFS source that is doing the jitter.

I would create a materialized view in PostGIS that randomizes the locations a bit - and then publish that.

There are some geoserver functions for generating attract fill patterns Fills with randomized symbols — GeoServer 2.24.x User Manual and then make a circle in the area, and let the random fill drop in a symbol or two as appropriate. Turn off GetFeatureInfo or folks can just query to get the raw original data anyways.

You could also do something fun like make a GeoServer SQL View (pretty much a query)…

But it would be hard to keep the result stable as users pan and zoom around; or during tile generation.
I would make a table of random values; and then index into the table based on the FID of the row in order to get some offsets to apply to the point locations.

Materialized view in PostGIS would be easiest.

···


Jody Garnett

I wouldn’t do it that way if the data is at all sensitive, an attacker can simply request the data a lot of times to average out your jitter, Much better to add a random offset and/or a truncation of precision once in the database and then always provide the same answer

Ian

···

Ian Turton