I see Geometry Functions | ArcGIS for Developers exists but how would one call that to populate separate lat and lon fields with an attribute rule?
Solved! Go to Solution.
You can access the lat/long individually by adding ".X" or ".Y" to the end of Geometry($feature), so your attribute rule would be:
return Geometry($feature).Y
for Latitude, and
return Geometry($feature).X
for Longitude.
You can access the lat/long individually by adding ".X" or ".Y" to the end of Geometry($feature), so your attribute rule would be:
return Geometry($feature).Y
for Latitude, and
return Geometry($feature).X
for Longitude.
Attribute rules are so cool.
Totally agree. They're like magic!
Is there a way to return the geometry in a different coordinate system? For example, my layer is in NAD83 but I would like for the WGS 84 coordinates to auto-populate in the attribute table.
Has anyone been able to figure out if it is possible to populate an x,y or for that matter any geometry field (extents for example) in a coordinate system other than the one the feature class is project in?
return Geometry($feature).Y
will only work on point features. Try this instead:
return Centroid(Geometry($feature)).Y
Is it possible to convert the result? I am working in WGS 1984 UTM Zone 6N and would like the final result in lat/long decimal degrees rather than Northing and Easting.