PointSymbolizer: Gradient / interpolation fill colour based on age of timestamp?

Hi all,

I cannot seem to work this out myself, so hopefully no one minds if I ask here :sweat_smile:

I have a layer that retrieves latitude and longitude recorded over the last 3 days and converts them into points. Can a SLD styling fill in the points using a colour between red and green, depending on how long ago the point’s timestamp was?

Adding an ‘age’ column into the SQL view should be no problem, but I don’t quite know how to work that into the styling.

A colourmap will be a suitable alternative if true interpolation is impossible, assuming if even that is possible with points.

Hi,

try using the interpolate function in the fill of your mark… or one of the other functions in that same documentation page if you want a different progression (by steps, by unique values).

If you need a good looking GetLegendGraphic result for that legend, make sure you’re on a recent release.

Hope this helps

Cheers
Andrea