Greetings Attribute Rules community.
Though a long-time GIS user, I am new to both Attribute Rules and Arcade.
I have what I believe to be a fairly simply problem and hope someone can help.
I have a colleague who would like me to develop a field map for her that includes a linear feature called transects. She then needs to derive the starting vertex X,Y, centroid X,Y, and ending vertex X,Y of the newly created feature. I figured that an attribute rule that automatically calculates it would be great.
The centroid rule seemed pretty easy--Round(Centroid($feature).X, 6) and Round(Centroid($feature).Y, 6) to calculate the X and Y centroids, respectively. Hurray. Well, no.
It works, but it appears to be calculating the centroid for the boundary geometry of the feature rather than the actual centroid of the linear feature (i.e. actually a point ON the line). Suggestions?
As for the beginning and ending vertices X,Y, I am at a loss. I can use something like Round(Geometry($feature).Y, 6) to find the coordinate of a point, but how can I implement this for a vertex in a line or polygon?
Lastly, and this is more philosophical, I suppose. Is there a way to calculate a spatial relationship with Arcade? (Again, being new to this, this may be a no brainer). For instance, if I plot a point that is within the geometry of a polygon, I would like to do some equivalent of a spatial join to assign the point attribute(s) from the polygon.
Thanks in advance.