I have two set of raster layers, one for buildings (static) and one for depth of surface water due to pluvial flooding from simulation (dynamic, changes with each time step).

My aim is to generate an animation which shows buildings changing their color into red,yellow etc. as soon as water depth reach a certain value. For this purpose, I have to intersect building raster and water depth raster from different time instants.

I have tried it with CON() tool in spatial analyst but the problem with CON() tool is that only the cells where water depth is reached or exceeded in the building raster are changed and not the whole building cells.

Is there any way with which I can manage to change the color of the whole building (and not just the cells where water depth is exceeded) when even a single cell of that building reaches or exceeds a certain water depth?

1 Answer 1


If converting the raster to a polygon shapefile is an option, I would suggest doing that. That way you can easily select the "Buildings" when they intersect the polygons for water depth, and assign to them a value in their attribute table that indicate their "flooded" status (for example 0 if unaffected, 1 if affected).

In the end you convert your shapefile back to a raster and assign appropiate colors for the values.

  • thanks @Iridium for your reply. Actually, originally my building data is in polygon shape file which I converted to raster for intersection because converting water depth rasters to polygons will be lot of work as there are at least 300 of such rasters in a single simulation.
    – Brian
    Commented Feb 26, 2018 at 12:40
  • If by work you mean processing time, then I agree with you (depending of course on the size of the rasters). Converting all the rasters to shapefiles can be easily achieved by using the ModelBuilder, iterating through all the rasters in a folder. Moreover, I believe that all the work you´re trying to do can be executed with the ModelBuilder or using ArcPy. Would that be an option?
    – Iridium
    Commented Feb 26, 2018 at 12:56
  • I am aware of capabilities of ModelBuilder and python scripting. Converting depth rasters to polygon is not an option because for that the rasters need to be integer type which depth rasters defintely aren't.
    – Brian
    Commented Feb 26, 2018 at 13:14
  • But in theory you could convert the rasters to integer type using the raster calculator, and then convert it back to float if you need the depth in a specific unit
    – Iridium
    Commented Feb 26, 2018 at 13:25
  • when you convert depth raster to integer type with raster calculator, all the necessary depth information is lost (e.g., 1.47m becomes 1m). Have you converted a float into an integer and the same integer back into float and see how much of your information is lost in the conversion?
    – Brian
    Commented Feb 26, 2018 at 13:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.