# ArcPy Calculate Field how to convert distances from decimal degree to meters

How do I use `arcpy.CalculateField_management()` to convert a column with distances in degrees to meters? I don't see this specific example in the docs. This post, answer by "dlee-esristaff" implies it can be done in two steps but I am having trouble implementing it.

Specifically, I don't see how to specify my source field (`DISTANCE`) and target field (`dist_m`) in the `arcpy.CalculateField_management()` inputs. Do I need to write a short function to do this, and then call the function? (If so, I am not sure how to write the function, I think `!shape.geodesicLength@meters!` is used but I am not sure how.)

Also, please note that everything is done in WGS84, instead of UTM (hence distances in degrees) because the source SHPs are from all over the world and we don't have local UTM EPSGs. The input SHP here is a point SHP which is output from the Point Distance tool.

``````arcpy.AddField_management(myshp, 'dist_m', "FLOAT")

# expression = ??? somehow get !shape.geodesicLength@meters! from ['DISTANCE'] into ['dist_m']
# codeblock = ??? somehow get !shape.geodesicLength@meters! from ['DISTANCE'] into ['dist_m']
# ??? arcpy.CalculateField_management(myshp, ['dist_m'], expression, "PYTHON3", codeblock)
``````
• You can calculate distance between two geometries, but you can't convert Cartesian degrees to ground units. There are many examples of how to do the former in the documentation (none of which mix the several different options of token parsing in the example you have given). – Vince Aug 14 '20 at 1:05
• @Vince, this post (community.esri.com/thread/7181), answer by "dlee-esristaff" steps 1 & 2 suggests this can be done, or am I misreading? thx – a11 Aug 14 '20 at 1:10
• You can't mix-n-match the syntaxes of `CalculateField`, `PointDistance` and DA Cursors. You must start with two shapes. Please Edit the question to ask something that is ppssible (converting Cartesian degrees obtained elsewhere is not possible) – Vince Aug 14 '20 at 1:16
• @Vince the fact that it's not possible is an answer, no? And someone else could have this question and benefit from knowing it's not possible? – a11 Aug 14 '20 at 1:21