0

I have 2 datasets of raster footprints (Luc_1,  Luc_2, Luc_3……. L_250) and (Dir_1, Dir_2, Dir_3 …. Dir_250). I need to combine Luc_1 with Dir_1, Luc_2 with Dir_2, Luc_3 with Dir_3, and so on. I have created a Model (using the Iterate Raster function) combining Luc_1 with all Dir rasters, Luc_2 with all Dir rasters, Luc_3 with all Dir rasters. It's a bit more time-consuming and in the end I have to delete the 249 rasters not needed. Is there any way I can specifically pair only the rasters I am after?

  • 2
    What do you mean by "Combine", merge, intersect or dissolve? Also it's good practise to upload an image of your model along with your textual description. Also an example of what you inputs and expected outputs are. With this information can we help you. I suspect it is just a refactoring of your model to obtain the correct pairing (luc_1-Dir_1, luc_2-dir_2, etc...) – Hornbydd Jan 21 '18 at 19:15
  • Hi Hornbydd, by saying "combine" I wanted to run "times" function, but I guess it could be pretty much anything. What I am actually after is finding a way how to tell the iterating model to specifically target particular raster. Inputs (Luc_x are reclassified rasters showing visibility; with only value of 1 showing theoretical visibility - generated by using Viewshed tool; Dir_x are rasters showing 0-360 direction. Outputs are same as Luc_x, but with values between 0 to 360. – user113001 Jan 23 '18 at 13:47
  • As they have paired names I would use the FOR iterator from 1 to x and use inline substitution to build the full path names to the rasters. – Hornbydd Jan 23 '18 at 14:22
  • thanks for getting back to me. sorry I am not sure I completely follow what you meant. I tried to do it now, but still struggling to match respective pairs. – user113001 Jan 25 '18 at 16:32
0

To Iterate over paired rasters with simple names such as LUC_1 and DIR_1 and times them together the model need only be this:

Model

  • For is from 1 to 3 in steps of 1.
  • The MODEL ONLY calculate Value tool is simply building the full file path based upon the output of the iterator. Note the inline substitution %ID% and that output is a Raster Dataset type. This allows them to feed into the Times tool.
  • Times tool is outputting a file using the ID.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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