Identify UTM Zone and Project Raster (arcpy)

392
2
08-18-2020 01:13 PM
MichaelJust
New Contributor

I have many rasters currently projected in NAD_1983_Albers. I would like to project each into the appropriate UTM zone (NAD 1983). I am trying to do this with a stand alone python script in ArcGIS Pro.

Since the rasters are in NAD_1983_Albers currently, I can't (or do not know how) to extract latitude and longitude of a point within the raster to use something like the python script found here to determine UTM Zone. I could project into an intermediary projection and then do something like Raster To Point and then find the UTM zone with a script. Then I'll need to link to this Spatial Reference Object when I project the rasters again. This seems cumbersome.

Or, I could create a feature from the raster and then use arcpy.CalculateUTMZone_cartography and use the Spatial Reference Object stored as a field value to project each raster. (However, separate issue, arcpy.CalculateUTMZone_cartography calculates the UTM for the features I've tested as "Southern Zones" and in WGS 84, though all of the locations are in the Northern Hemisphere). Or, using this feature, I could use arcpy.CalculateField_management to find the coordinates of the centroid, and follow as above. Though this 'feature' approach also seems cumbersome.


Basically, am I missing something? Or, is this task going to be rightfully cumbersome?

0 Kudos
2 Replies
DanPatterson
MVP Esteemed Contributor

If you know where the raster are located, wouldn't it be simpler to provide a list of possible UTM zones and then select the appropriate one based on the extent of the rasters?


... sort of retired...
0 Kudos
MichaelJust
New Contributor

Yeah, there are a couple hundred of them, but I could make a key using a feature of the zones and then use that key in python. That seems less cumbersome. I just wanted to make sure that I wasn't missing some function, because it didn't seem like an esoteric task to me, but maybe it is. Thanks.

0 Kudos