Can I use an inline variable in Output Coordinate System in Project tool?

743
5
02-02-2017 01:20 PM
Highlighted
New Contributor

I have features that are spread across several UTM zones that I would like to produce maps for automatically. I would like to iterate through the zones:  have a model select features by UTM zone (eg 18N), project the features appropriately, then export a map of each feature. If I type NAD_1983_UTM_Zone_%variableUTMZone% into the output coordinate system box in the project tool, the box empties as soon as I leave it. Although I can see how this could be done with if else statements, I would like to avoid a Python script with a large if elif else statement cluster if I can.

Reply
0 Kudos
5 Replies
Highlighted
MVP Esteemed Contributor

so you have exposed the output coordinate system as an input to the Project tool in the model?  Do you have a screen of part of that model? As for iterating that portion, you iterating the Project tools itself. which may mean you need some sort of key/value pair to associate things with the different zones.  It does seem however that you are traversing into areas best handled by python, even if it is a submodel within the workflow

Highlighted
New Contributor

It doesn't matter if I expose the output coord system parameter or not: either way, it seems only able to accept something from a drop down menu, although the dialog box permits me to change the text. I was hoping to do something like NAD_1983_UTM_%UTM_ZONE% and have UTM_ZONE update. Note there is no iterator here...it would be right before the select bed features by utm zone.



Here is part of the model I

Reply
0 Kudos
Highlighted
Regular Contributor II

I don't know what you want to do well, but I think this tool (below) may be help you.

Calculate UTM Zone—Help | ArcGIS Desktop 

Highlighted
New Contributor

That would probably work - but I don't need a custom zone for each of thousands of features. Projecting for each of these features would be very time consuming.

Reply
0 Kudos
Highlighted
Occasional Contributor III

Abdullah Anter is correct. If you use that tool instead of using your UTM grid and spatial join you can then iterate through the UTM field to select features with the same calculated UTM zone and then get the field value for the UTM zone to input into your projection tool.

Reply
0 Kudos