I have an attribute table with the fields 'Latitude' and 'Longitude' and want to use Calculate Geometry to get the coordinates for these fields.
The Coordinate Format that I need is Degrees Decimal Minutes (<N|S|E|W> DDD° MM.mmm') which means I have to choose TEXT as Data Type. The problem is that I want to change the number of decimal places for my coordinates. This does not seem to be an option when Data Type is set to TEXT. By default it is set to 3 (DDD° MM.mmm'), but I would like to have 4 decimals (DDD° MM.mmmm').
What I am after is the similar solution as for ArcMap Setting the number of decimal places displayed for measurements—ArcMap | Documentation. However, this does not seem to be possible in ArcGIS Pro since it is not Numeric Format.
I am using ArcGIS Pro ver. 3.3.1.
Solved! Go to Solution.
If you have 2 XY fields prepopulated with decimal degrees, you add 2 new XY fields (TEXT) and use Arcade to calculate the DDM field for each using the following expression:
var decimalDegrees = $feature.YourDecimalDegreeField;
var degrees = Floor(decimalDegrees);
var minutes = (Abs(decimalDegrees - degrees)) * 60;
var decimalMinutes = Round(minutes, 6);
return degrees + "° " + decimalMinutes + "'";
For the $feature.YourDecimalDegreeField, you'd need to update this item for the X and Y DD fields.
Not as easy as clicking a button to go to 6 decimal places but it should work!
If you end up posting an idea for this, can you post the link to it in this thread?
The Idea is posted here!
If you have 2 XY fields prepopulated with decimal degrees, you add 2 new XY fields (TEXT) and use Arcade to calculate the DDM field for each using the following expression:
var decimalDegrees = $feature.YourDecimalDegreeField;
var degrees = Floor(decimalDegrees);
var minutes = (Abs(decimalDegrees - degrees)) * 60;
var decimalMinutes = Round(minutes, 6);
return degrees + "° " + decimalMinutes + "'";
For the $feature.YourDecimalDegreeField, you'd need to update this item for the X and Y DD fields.
Not as easy as clicking a button to go to 6 decimal places but it should work!
Thanks Robert! This worked.
I may create an 'Idea' for future development. Knowing the easy way in ArcMap makes me reluctant to comply with this solution 🙃
Yay! I'm glad it worked out for you @AnnaWall! If you feel my answer was the solution, please click the "Accept as Solution" button below my answer to close out this thread. Also, thank you for posting the idea as well! This will allow others to upvote the idea and get some traction with the ArcGIS Pro Dev Team!