iterate through shapefiles, raster with same names and perform extract multivalue to points using model builder

418
1
09-15-2022 07:15 AM
VasudhaChaturvedi
New Contributor II

Refering to the post https://community.esri.com/t5/geoprocessing-questions/extract-values-to-points-multiple-raster-and-s....

My model does not seem to work for all the shapefiles and raster images, it just stores raster value for one of the matching shapefile. Am I going wrong with the calculate value tool placement or the expression?

 Iterating through shapefiles and apply the calculate value tool

VasudhaChaturvedi_0-1663252172818.png

 

Calculate value tool and expression

VasudhaChaturvedi_1-1663252215123.png

Extract multi value to points model

VasudhaChaturvedi_2-1663252251205.png

 

 

Thank you in advance for all suggestions.

 

0 Kudos
1 Reply
DuncanHornby
MVP Notable Contributor

Your model logic is flawed. Your sub-model with the iterator will loop as many times the iterator needs to loop, but the looping is occurring within the sub-model. Lets say there are 10 feature classes it loops 10 times and passes out the final shapefile to the master model which is feeding the shapefile into the Extract Values to Points tool.

Typically sub-models would pass out a list of values using the collects value tool but the Extract Values to Points only takes a single layer as input. Therefore this tool needs to be directly connected to your iterator, i.e. your workflow does not require a sub-model.

0 Kudos