Greetings Dev Community-
I need help with an arcade expression. I am trying to generate x,y pairs from a tax lot polygon feature service. In my "custom" field I have used the following expression:
var pnt= Centroid(Geometry($feature));
return Text(pnt);
RESULT...
{"x":-13649119.198784793,"y":5696311.278630899,"spatialReference":{"latestWkid":3857,"wkid":102100}}
but, I need the x and y to be returned in dec degrees, and my results appear to be on UTM northing/easting
I also tried to call a member method X and Y but I am getting the following error...
Thanks!
Solved! Go to Solution.
Awesome example -- do you know how I would go about finding the mathematics to convert 2857 (Web Mercator Auxiliary Sphere) to 2264 (NC State Plane). I've been looking for the equations for the transformation and haven't had any luck
Sorry, I don't know that, but perhaps Melita Kennedy can help, since she is an expert in this field.
Unfortunately, I know nothing about Arcade except that it's an expression language. I just looked through our Arcade website and some references to Arcade on the Javascript API pages. It doesn't look like the functions/methods are there to take apart a feature or even to change the coordinate system/projection engine.
Does the feature service support only 2264?
2264, NAD83 NC State Plane (US survey feet), uses Lambert conformal conic (LCC) with these parameters:
False Easting:2000000.002616666 (odd number due to being converted from a truncated value in meters)
False Northing:0.0
Central Meridian:-79.0
Standard Parallel 1:34.33333333333333
Standard Parallel 2:36.16666666666667
Latitude of Origin:33.75
It's on the GRS80 ellipsoid:
semimajor axis: 6378137.0
flattening: 1.0/298.257222101
LCC is not an easy projection to implement. You need the ellipsoidal version of the equations. One place to find them is John P. Snyder's Map Projections: A Working Manual, available in PDF form from this USGS site: Map projections: A working manual
Thanks for your feedback -- unfortunately our data is stored in 2264, so when I try to pass coordinate values through to a C# application that executes spatial SQL queries it fails as you can't use two different projections when executing native SQL spatial
Alas, I'll keep looking for a solution!
Thanks for sharing Melita Kennedy , indeed that sounds pretty complex. Great resource you shared (I only I had the time to read those ±400 pages).
96213@charlottenc.gov_charlotte , wouldn't you be able to use PROJ — PROJ.4 5.0.0 documentation in C#: Coordinate Transformation Using Proj4 in .NET - CodeProject ?
Understood. Thanks again!