Is there a way to convert spatial reference of label in Arcade Expressions?

411
1
03-21-2018 07:31 AM
by Anonymous User
Not applicable

Howdy! 

So long story short, I'm looking to pass X & Y information in a URL pop-up for a polygon layer.

I've been able to configure Arcade Expressions to return the centroid of a polygon layer using the below snippet:

var poly = Geometry($feature);

var result = "";
if (!IsEmpty(poly)) {
var pnt_centr = Centroid(poly);
Console(pnt_centr);
result = Round(pnt_centr.X, 0);
}

return result

However, my service is NC State Plane Nad 83 (NAD83 / North Carolina (ftUS): EPSG Projection -- Spatial Reference) and the output of the parsed centroid is in WGS 84 Auxiliary Sphere. 

There aren't any explicit references to the whole of geometry expression being limited to WGS 84, so I imagine it is possible to work with other projections, but not sure how I'd go about it. Any and all help would be welcome!

1 Reply
AlcoGISUser
New Contributor III

I'm looking to do something similar. Did you ever figure it out?

0 Kudos