I am trying to convert a table of MultipolygonZ geometries to a floating point raster where the pixel values of the output raster will be derived from the Z values of the MultipolygonZ geometries. The ultimate goal is to perform map algebra between the resultant floating point raster and a DEM (already loaded in PostGIS). I have already tried to perform the analysis directly between the MultipolygonZ geometries and the DEM without success - see PostGIS: intersection of a MultipolygonZ and a floating point raster.
Here is an example of one of the geometries that I am working with - it is essentially an inclined plane that represents water levels of a flood plain interpolated between two cross sections:
SELECT ST_GeomFromText('MULTIPOLYGON Z (((277378.7412 5048118.3481 22.46,278037.7398 5047686.44410001 22.46,277929.677100001 5047698.6316 22.46,277380.212900001 5048034.458 22.46,277105.837500883 5048202.1531993 22.46,277167.5633 5048248.2075 22.46,277173.661101116 5048252.75649908 22.46,277378.7412 5048118.3481 22.46)))')
Is this possible using the ST_AsRaster(), ST_ExtractToRaster() or any other functions/methods within PostGIS? I am able to create a raster using ST_AsRaster(), but I can't get the output raster to contain the interpolated Z values.