I'm trying to figure out why I can't point to a raster as input (for pan sharpening) using inline variable substitution? I have no problem using inline variable sub as part of the output raster name.
I'm using ModelBuilder to iterating over a collection of multispectral rasters to be fed into the pansharpen tool. I'm using inline variable sub for the pan image input (actually as input into Make Raster Layer first):
\SomePath\%PanImageName%.tif
where %PanImageName% is the name of the Pan image that matches the current Multispectral image being processed by the Iterate Raster tool.
To hopefully be more clear, the Name variable coming off the Iterate Raster tool is passed through the Calculate Value tool with this expression... "%Name%".replace("m20","p10_1"), giving me the value PanImageName used to identify the matching pan image.
I have added preconditions where the seemed necessary, but I just can't figure this one out.
I get the following error:
ERROR 000732
Panchromatic Image: Dataset
\SomePath\%PanImageName%.tif does not exist or is not supported.
Hoping somebody can help, thanks!