Hello,
I am trying to create an attribute rule to automatically calculate the centroid x and y coordinates of polygons from one layer. I managed to add the x and y centroid coordinates in decimal degrees using the "Calculate Feature Geometry" tool, then "centroid x/y-coordinates".
Since this layer is populated by my colleagues, I want to create an attribute rule that will do this automatically when a new feature is added or an existing one is edited. I already created 2 specific fields "X" and "Y" in which I added the centroid coordinates using the geoprocessing tool.
Can someone explain to me how I can create an Arcade expression that will calculate the centroid x/y coordinates of the polygons? Also, I would like to be stored in my X and Y fields.
P.S. I don't want to create any centroid point, I just want the centroid coordinates as the geoprocessing tool does.
Thanks!