I'm having some problems with a model i'm attempting to make.
I have a folder of jpgs that i need to rotate.
I have also created a shp file that contains the jpg name / path and the angle to rotate by.
I'm hoping to use an iterator to select each row of the table, extract the file path / name and rotate the appropriate raster.
The tool i'm attempting to use is the rotate raster tool
Toolbox > Data Management Tools > Projections and transformations > raster > rotate
however i can't seem to get the rotate tool to accept the input raster (using get field value tool)
Is there any way i can make this work?
Using ArcView 10 sp5
Solved! Go to Solution.
As per documentation the tool takes raster layer and mosaic layer. Hence, I believe, it is giving the above error.
Set data type to Raster layer and see if it works.
Also you can create an in_memory raster layer using Make raster layer tool (Data Management) after Get Value in model builder and provide it to Rotate tool. Here set the data type to Raster dataset in Get Value tool
Hope this helps
Kishor.
Hi Jamie,
What does the red X report the error is when you click on it?
Thank you both for your answers.
i've attached a screenshot of the error. The problem seems to be that the rotate tool doesn't seem to want to accept an in-line variable as its input to the rotate tool.
The file ie. G:\Hotlinking_Images\P1010471.JPG already exists so its not an error because the file doesn't exist / hasn't been created yet.
For the Get Field Value for the "Img_Path" i have tried setting the Data Type to string and raster dataset and it doesn't seem to make any difference.
I've also attached a screenshot of the data type for the FPath column (this is the value collected for the input .jpg)
I've changed it to "G:\Hotlinking_Images" and it doesn't make any difference.
Something to try - put an underscore in the folder name if it currently has a space.
Hotlinking_Images
Chris Donohue, GISP
As per documentation the tool takes raster layer and mosaic layer. Hence, I believe, it is giving the above error.
Set data type to Raster layer and see if it works.
Also you can create an in_memory raster layer using Make raster layer tool (Data Management) after Get Value in model builder and provide it to Rotate tool. Here set the data type to Raster dataset in Get Value tool
Hope this helps
Kishor.
Thank you so much for this, its been driving me nuts.
solution was similar to your suggestion i set Img_path field to "Raster Dataset" type then as you suggested used the make raster tool.
thanks everyone