+ Reply to Thread
Results 1 to 7 of 7

Thread: Batch raster calculator?

  1. #1
    Ahmed El-Gabbas
    Join Date
    Apr 2012
    Posts
    4
    Points
    0
    Answers Provided
    0


    0

    Default Batch raster calculator?

    Hello,

    I have around 1000 raster image files (.img) and I need to use some map algebra functions with them (mainly repetitively adding some of these layers together) and need to use the model builder to make it easier for me to run it. Is it available to use raster calculator functions in model builder and use a pre-prepared input functions and output destinations (using concatenate functions in exel). I am using ArcMAP 10.

    That is a samples of what I need:
    "J:\sp1\sp1_Thresholded_0_3.img" + "J:\sp1\sp1_A2a_2020_Thresholded.img" ==> J:\sp1\sp1_CCCMA_A2a_2020_GainLoss.img

    I will repeat the previous steps more than 1000 times and it will take me huge time to run them individulaly.

    Any help will be appreciated,
    Ahmed
    Last edited by elgabbas; 04-17-2012 at 02:52 PM.

  2. #2
    Curtis Price

    Join Date
    Oct 2009
    Posts
    1,798
    Points
    874
    Answers Provided
    127


    1

    Default Re: Batch raster calculator?

    Quote Originally Posted by elgabbas View Post
    That is a samples of what I need:
    "J:\sp1\sp1_Thresholded_0_3.img" + "J:\sp1\sp1_A2a_2020_Thresholded.img" ==> J:\sp1\sp1_CCCMA_A2a_2020_GainLoss.img

    I will repeat the previous steps more than 1000 times and it will take me huge time to run them individulaly.
    A modelbuilder iterator should do this nicely for you. Just set up raster calculator tool and pipe the output of your iterator into it. You may have to use the Calculate Value tool to generate the input and output pathnames you need on each iteration using a python expression. (See this thread.)

  3. #3
    Jerry Garcia
    Join Date
    Dec 2010
    Posts
    66
    Points
    3
    Answers Provided
    0


    1

    Default Re: Batch raster calculator?

    I had to do similar analysis and the iterator worked great.

  4. #4
    Ahmed El-Gabbas
    Join Date
    Apr 2012
    Posts
    4
    Points
    0
    Answers Provided
    0


    0

    Default Re: Batch raster calculator?

    Quote Originally Posted by Jerry_G View Post
    I had to do similar analysis and the iterator worked great.
    Thanks a lot curtvprice and Jerry,
    I am new to model builder and never use iterations. Could you please give me a brief explanation of which iteration method I should use and how to code the inputs (the addition of different input layers) and the output filenames and directories. I have prepared in exel a series of inputs and output destinations and filenames and need to run them not one by one.

    It would be great if you could send me a link to a simple tutorial or so discussing that.

    Thanks a lot,
    Ahmed
    Last edited by elgabbas; 04-18-2012 at 11:53 AM.

  5. #5
    Jerry Garcia
    Join Date
    Dec 2010
    Posts
    66
    Points
    3
    Answers Provided
    0


    1

    Default Re: Batch raster calculator?

    http://video.esri.com/watch/91/model...d-technologies

    This video does a pretty good job at explaining some of the advanced modelbuilder tools.

  6. #6
    Ahmed El-Gabbas
    Join Date
    Apr 2012
    Posts
    4
    Points
    0
    Answers Provided
    0


    0

    Default Re: Batch raster calculator?

    Quote Originally Posted by Jerry_G View Post
    http://video.esri.com/watch/91/model...d-technologies

    This video does a pretty good job at explaining some of the advanced modelbuilder tools.
    Thanks a lot Jerry_G, but it seems to be not that easy for me. Could you please explain for me which iteration method is best useful in my case and how to use the Calculate Value tool to generate the input and output pathnames...

    Thanks a lot,
    Ahmed

  7. #7
    Curtis Price

    Join Date
    Oct 2009
    Posts
    1,798
    Points
    874
    Answers Provided
    127


    0

    Default Re: Batch raster calculator?

    Quote Originally Posted by elgabbas View Post
    please explain for me which iteration method is best useful in my case and how to use the Calculate Value tool to generate the input and output pathnames...
    Ahmed -

    • Since you're iterating on rasters, it seems to me Iterate Rasters would worth a try.
    • see the Callculate Value tool help and that other thread for some examples. Parse Path is also a handy tool in MB 10.0 for manipulating pathnames

    Good luck!

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts