Raster Intersection

Hi anyone could help me with this?
I have two layers that represent the terrain data and water level of an inundation map.
(A) is grid (GEOTIFF) with terrain data from SRTM Nasa.
(B) is shapefile with multipolygon where each shape represents the surface of water level above terrain where each shape have Z data that represents the water level.

I’d like to get a new raster grid (C) which is part of (A) below (B), and then create a new polygon that represents the border/outline of (C) like polygonize GDAL function.

Is there a way to do this using Mapwindow OCX GDAL functions ? I didn’t find a function for this. Any help would be great.

Is the end goal a polygon shapefile (C) with the values of the terrain data raster (A)?
Or do you also need the intermediate raster (B)?

When you just need to add the terrain value from (A) to your shapefile (B) you can use Utils.GridStatisticsToShapefile()

Hi Pmeems, thank you for your time and help.
After looking at the function Utils.GridStatisticsToShapefile() I realized that it calculates statistics for grid cells within the polygon of the specified shapefile and writes results to attribute table of shapefile. But I don’t need this statistic for the area inside polygon.

My end goal is obtain shapefile of polygon (C) with the points of terrain grid (A) that intercept the 3D polygon (XY and Z mensure) of water surface (B). The Z values of the polygon C are obtain from terrain data raster (A). I don’t need the intermediate raster (B).
image