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

1224
5
02-02-2017 01:20 PM
adamkorejwa
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.

0 Kudos
5 Replies
DanPatterson_Retired
MVP Emeritus

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

adamkorejwa
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

0 Kudos
AbdullahAnter
Occasional Contributor III

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 

adamkorejwa
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.

0 Kudos
LukeSturtevant
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.

0 Kudos