Select to view content in your preferred language

setting variables within Model Builder

1702
10
11-05-2010 11:22 AM
TimothyHandley
Emerging Contributor
I'm using the Rotate (raster) tool in Model Builder. One of the parameters for this tool is the pivot point. I'd like to have my tool calculate the centroid of the raster, and then pass the coordinates of the centroid to the Rotate tool to use as the pivot point.

Using a short string of tools, I can create a point shapefile with a single point located at the centroid of the original raster. I can also add the x/y coordinates of this point to the attribute table of the point. Unfortunately, I don't know how to get the Rotate tool to use this information.

As a start, I tried right-click-on-Rotate > make variable from parameter > pivot point. While I can type coordinates into this variable, I can't find a way to connect the centroid point to this variable.

Any other ideas? Am I on the right track?
0 Kudos
10 Replies
WhereMatters
Frequent Contributor
Thank you Shitij!

Returning the point in the required format as illustrated in your sample code solved my problem.
Now the rotate tool is able to read the PivotPoint
0 Kudos