AnsweredAssumed Answered

Adding Z values to Geometry

Question asked by keith.gemeinhart on Jan 13, 2017
Latest reply on Jan 13, 2017 by mnielsen-esristaff

Using ArcGIS Runtime for .NET 100.0 and WPF. I have a geometry created using the sketch editor ...

       _traceGeometry = await Mapview.SketchEditor.StartAsync(SketchCreationMode.Polyline, true);


Then later I want to create a feature using this geometry. However, the feature class has z values. So when I try to save it via ...

      await table.AddFeaturesAsync(features);


I get an exception: "The shape must have a Z value."


My question is how can I add z values to this geometry? Do I need to recreate a new geometry using PolylineBuilder and adding a z-value for each point?


Initially all points can (and should) have 0 for a z-value, but eventually, we will run a calculation that adds z-values based on underlying elevation.


Alternatively, will the sketch editor create a z-enabled geometry if there is underlying elevation data included as a map layer?