I have been using ArcGIS Modelbuilder on 16 years of MODIS LST 8 day data, ie. quite a few files. I want to use the QC pixel data at error <=1, 2, and 3K to overlay on the base LST data so I can determine the amount of pixels this knocks out. I'm aiming to get the "best" pixels to use for some research (without losing too many).

I have used the iterator with raster calculator (rescale), extract by attributes (Value) and reclassification (0 and 1) tools without issues apart from some data stat problems. The final bit will be overlaying the reclassified quality pixels (0 and 1) of the various K error ranges on the original LST data. I was going to use the Con tool which works fine manually however am thinking maybe this won't be able to do the job as I need to actually iterate through 2 raster sets - the reclassified into K error ranges LST (conditional) and the original LST. Only one iterator can be used it seems?

Anybody able to provide any insight on possibility of use of the Con tool using an iterator in ModelBuilder?

I have the final K to C conversion and reprojection models developed.

A little bit more explanation as the concept is not that straightforward and model attached. I have 92 LST 8day rasters for the year which will be iterated through using %NAME% as the inline variable to select the pixels of value based on 3 error values (<= 1, 2 and 3 Kelvin). I won’t go into detail as to how these are calculated by MODIS suffice to say that there needs to be some manual binary value interpretation done from the values in the QC file to get the pixel error values. I use the iterator with 1) Extract Values to get the 3 error ranges, and 2) Raster Calculator to classify these errors. For example an error <= 1K uses attributes of 0, 17 and 33 so only those are classified as 1, with all others 0. <= 2 uses values of 0, 17, 33, 65, 81 and 97; <=3 uses 0, 17, 33, 65, 81, 97, 129, 145. The QC quality spreadsheet which comes with the downloaded data flags what all the values are and what error they belong to. No issues with the first part (apart from a problem with occasional files with no value, and hence no statistics, crashing the model which I will post about separately).

Anyway, given I can overcome the last issue, the final step is that original 92 LST rasters need to have the pixels selected based on whether the specific conditional raster is 1 (true) or 0 (false), previously done in the reclassification stage. This is basically overlaying the error pixels on the originals and only pulling out those pixels which are true for the reclassified data. I will then have 3 separate folders with 92 files each containing only pixels related to the specific error value. This will be used to make a judgement on what error value is acceptable. Note that the same original file name is used for all the calc’s, just coming from different folders. Eg. MOD11A2.006_LST_Day_1km_doy2010001_aid0001.tif, etc.

Of course the attached model will only work for the first conditional raster as it cannot iterate through them in concert with the original iteration which is what I do with the original 2 processes. Just started using ModelBuilder so maybe there is an easier way (probably using Python)!

enter image description here


1 Answer 1


When asking a modelbuilder question, which is a very visual way of processing data, it would help if you include an image of what you had done so far as wordy text is hard to follow. You can always amend your question to improve.

So you want to reference two datasets in one tool (the Con tool) over some time period? Well that's how I read your question.

A method is that when you build those paired datasets be very strict in naming them such as errors_1 & LST_1, errors_2 & LST_2, errors_3 & LST_3....etc...

You can then use the For iterator to control the loop from 1 to X and that will spit out numbers 1,2,3...X which you could then use to build the raster dataset names using inline substitution. Such as errors_%Value% & LST_%Value% where %Value% is the name of the For output.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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