AnsweredAssumed Answered

How to Automate "Calculate Geometry" Degrees Minutes Seconds within ModelBuilder?

Question asked by jsmith331 on May 8, 2019
Latest reply on May 9, 2019 by balke13

Does anyone know how I can add the functionality of "Calculate Geometry" (Units: Degrees Minutes Seconds (DDD MM' SS.sss" [W|E]) and Degrees Minutes Seconds (DDD MM' SS.sss" [N|S])) within ModelBuilder? I figured out how to automate the calculation of both decimal degrees and State Plane coordinates using the "Calculate Field" tool (see below):

 

Decimal Degrees (using Python 9.3):

arcpy.PointGeometry(!Shape!.firstPoint,!Shape!.spatialReference).projectAs(arcpy.SpatialReference(4326)).firstPoint.X

arcpy.PointGeometry(!Shape!.firstPoint,!Shape!.spatialReference).projectAs(arcpy.SpatialReference(4326)).firstPoint.Y

 

State Plane Coordinates (using Python 9.3):

!SHAPE!.firstPoint.X

!SHAPE!.firstPoint.Y

 

Thanks for your time.

Outcomes