Hello everyone,
In the exemple below, i can create another point with the Z coordinate of the field "Z_OUV" in stead of the original Z coordinate. But is it possible to modify the current point and not create another one?
if ($feature.Z_OUV == Geometry($feature).z) {
return
};
var newGeom = Point({
hasZ: true,
x: Geometry($feature).x,
y: Geometry($feature).y,
z: $feature.Z_OUV,
spatialReference: { wkid: 4326 }
});
var featureID = $feature.OBJECTID;
var f = filter(FeatureSetByName($datastore, "WaterDevice"), "OBJECTID = @featureID");
if (count(f) == 0) return $feature.Z_OUV;
var featureAct = first(f);
return {
"result": $feature.Z_OUV,
"edit": [{
"className" : "WaterDevice",
"updates" : [
{
"OBJECTID": featureAct.OBJECTID,
"geometry": newGeom
}
]}
]}I tried to just update the "z" in the geometry section, but was met with an error. Is there a way to just modify one coordinate?
"geometry": {"z": $feature.Z_OUV}