Thank you for your answer. I followed your idea, however I stocked in the last step - stretching the data. Below is my workflow which I implemented in model builder:
1. Iterate feature selection of my polygons using their ID
2. Clip the raster DEM using selected polygons
3. Get raster properties from my clipped DEM (minimum and maximum values)
4. Stretch the data using raster calculator expression: (("%DEM_%Value%.tif%"-(%Property%))*1)/(%Property (2)%-(%Property%))
where:
%DEM_%Value%.tif% - input DEM and %Value% is the polygon ID
%Property% - minimum
%Property (2)% - maximum
After running my model I have the error (attached below) and I do not know why it does not work, because when I try to run it manually it works. Any ideas?
Start Time: Fri Dec 16 08:12:01 2016
(("%DEM_%Value%.tif%"-(1403.25))*1)/(3229.6999511719-(1403.25))
ERROR 000539: Error running expression: rcexec()
Traceback (most recent call last):
File "<expression>", line 1, in <module>
File "<string>", line 5, in rcexec
TypeError: unsupported operand type(s) for -: 'str' and 'float'
Failed to execute (Raster Calculator (2)).
Failed at Fri Dec 16 08:12:01 2016 (Elapsed Time: 0.28 seconds)