I have two rasters representing travelling speed: one for road (with speed values for different types of roads and "0" values where there is no roads) and one for land-cover (with lower values, but no "0").
I would like to combine them in a single travelling speed raster this way: Keeping road values where there is a road (so where the road raster is not 0) and, elsewhere, having the value of land-cover.
I do it all the time with the raster calculator in ArcGIS with the following command: Con(roads > 0 , roads, landcover)
I'd like to insert it in an ArcPy script so I did it this way:
raster = arcpy.gp.RasterCalculator_sa("""Con(roads>landCover, roads, landCover)""", tmpPath + "/friction")
When I do it in ArcGIS, it works perfectly well but when I do it in my ArcPy code, it only gives me the roads value as a result but ignore the landcover values...
I can't find why.
What could cause this expression to work in ArcGIS but not in my ArcPy code?