Bug
| Bug ID Number | BUG-000152518 |
|---|---|
| Submitted | September 22, 2022 |
| Last Modified | June 23, 2025 |
| Applies to | ArcGIS Pro |
| Version found | 3.0 |
| Operating System | N/A |
| Operating System Version | N/A |
| Status | As Designed |
// Correct any input longitude values that extend beyond the date line
function Mod(value, range, upperEnd)
{
while (value > upperEnd)
value -= range;
var lowerEnd = upperEnd - range;
while (value <= lowerEnd)
value += range;
return value;
}
function LatLongToDMS(lat, lon)
{
lon = Mod(lon, 360, 180);
var dmsLat = ConvertDirection(abs(lat), {"directionType":"north", "angleType":"degrees"},
{"directionType":"north", "angleType":"dms", "outputType":"text", "format":'d[°] mm[\'] ss.ssss["] '})
+ iif( lat >= 0, "N", "S");
var dmsLon = ConvertDirection(abs(lon), {"directionType":"north", "angleType":"degrees"},
{"directionType":"north", "angleType":"dms", "outputType":"text", "format":'d[°] mm[\'] ss.ssss["] '})
+ iif( lon >= 0, "E", "W");
return dmsLat + ", " + dmsLon;
}
return LatLongToDMS(Geometry($feature).y, Geometry($feature).x);
Use the calculate geometry attributes tool or write an arcade expression to convert decimal degrees to Degree Minute Seconds (DMS) notation by referring to https://support.esri.com/en/technical-article/000008758.
Bug ID: BUG-000152518
Software:
Get help from ArcGIS experts
Download the Esri Support App