glavenuesrifrance-fr-esridist

How Arcade can access Z coordinates when calculating field values

Discussion created by glavenuesrifrance-fr-esridist Employee on Dec 26, 2018
Latest reply on Dec 27, 2018 by xander_bakker

Hi,

 

I try to calculate de mean of Z coordinates of my polylines using Arcade expression. I use the expression below on a feature layer of Polylines (with not null Z coordinates) but the Z values of each vertices returned by the Arcade expression is always "null". The "IsEmpty" console message return "true" for each vertices. Is there a way to get the Z coordinates with the "calculate field" Arcade profile ?

 

var myPaths = Geometry($feature).paths;
var points_Z = [];

for (var i=0;i<Count(myPaths);i++){
   var myPath = myPaths[i];
   for (var j=0;j<Count(myPath);j++){
     Console(IsEmpty(myPath[j].z));
      points_Z[Count(points_Z)] = myPath[j].z;
      }
   }

return Mean(points_Z);

 

Regards,

 

Gaëtan Lavenu

Esri France

Outcomes