I have a table with multilinestring geometries that can be updated or inserted by external users, and a raster table with elevation values.
I want to write a trigger that sets the z value of each point in the line from the DEM.
Probably I can write a function that iterates over the linestring points with
ST_DumpPoints. Gets the elevation from the raster with
ST_Value. And recreates the point with
But, is there any easier way to to this?