Can I reproject the output of a raster function before saving it to a GIS?
For example, this code applies an agricultural mask to a burnt area.
burnt_areas_masked = colormap(set_null(rasters=[ag_mask, burnt_areas]),
colormap=[[4, 115, 76, 0],
[3, 168, 112, 0],
[2, 230, 152, 0],
[1, 255, 170, 0]])
The inputs 'ag_mask' and 'burnt_areas' are in-memory rasters generated by raster functions applied to imagery layer items in the GIS. The output 'burnt_areas_mask' inherits the spatial reference of 'ag_mask'. I guess this makes sense since 'ag_mask' is the first raster in the list of inputs. But 'ag_mask' is only a boolean layer and not actual the input data. So I need a way to set the spatial reference of the output 'burnt_areas_mask' to the spatial reference of 'burnt_areas'.
The "reproject" function looks like a possible solution.
https://developers.arcgis.com/python/api-reference/arcgis.raster.functions.html#reproject
But I get a "name error" when I try to call it.
Any suggestions?