0

I have 180+ Landsat Raster Layers open. Part of the layer names in the TOC include the date the image was taken.

Landsat Raster Layers

I'm trying to get weighted average NDVI for each layer in one summary table. This is the output of my model currently:

model output attribute table.

I can't figure out how to get the names of the rasters into a new field. Here's my process so far...

  1. Add Landsat NDVI layers from ArcGIS online
  2. Select by location to only include rasters in my polygon
  3. Add selected rasters to map, creating what you see there in TOC
  4. Run batch extract by mask tool. Here I can't customize names of output. The batch tool is awful. However, in ModelBuilder I can't iterate through these rasters because they aren't in a Raster Catalog, yet. There doesn't seem to be a way to export these directly to a Catalog without first running a tool, probably because they are huge files and from ArcGIS online?
  5. Save each extracted raster in a Raster Catalog
  6. Run the model which iterates through this new Raster Catalog, runs a series of calculations and gives me the output table you see.

I can very painstakingly manually add dates to the summary table. Obviously not scalable and that's why I'm here. Seems that I can't use ModelBuilder to fix the issue due to what I described above.

What can I do to get the raster names reflecting what you see in the TOC when I run the Extract by Mask tool?

I don't know any Python yet.

PolyGeo
65.5k29 gold badges115 silver badges349 bronze badges
asked Feb 23, 2021 at 20:21
3
  • Are you using ArcGIS Pro or ArcMap? Commented Feb 23, 2021 at 20:31
  • ArcMap. I have both though so if you think this is more easily accomplished in Pro I'm all ears. Commented Feb 25, 2021 at 14:51
  • 1
    I think it would be easier to achieve using ArcPy but if I was attempting to do it using ModelBuilder then my choice would be to use ArcGIS Pro. Whichever you decide to ask about I think you should include a test model that illustrates what you have tried and where you are stuck. Commented Feb 25, 2021 at 19:45

1 Answer 1

1

I agree with @PolyGeo, this type of processing tends to be much easier if scripted in Python, as you are now discovering the limitations of ModelBuilder, not particularly great for looping type workflows.

That said if you have the very latest version of ArcGIS Pro (2.7) then you can use the new Iterate Layers iterator which can step through layers in a map document. I've not had cause to use it yet so can't comment on usability but it appears to behave like the other model iterators. This can provide you an opportunity for a non-coding route if you are not familiar with Python.

PolyGeo
65.5k29 gold badges115 silver badges349 bronze badges
answered Feb 26, 2021 at 17:51
1
  • Thanks, I just discovered the existence of this iterator but for some reason it doesn't show up in my university's version of ArcPro. Probably a licensing issue. I'll start learning python I suppose... Commented Mar 5, 2021 at 22:21

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.