<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Adding Z values to Geometry in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/adding-z-values-to-geometry/m-p/749794#M9373</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using ArcGIS Runtime for .NET 100.0 and WPF. I have a geometry created using the sketch editor ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN style="font-family: andale mono,monospace;"&gt;_traceGeometry = await Mapview.SketchEditor.StartAsync(SketchCreationMode.Polyline, true);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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 ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN style="font-family: andale mono,monospace;"&gt;&amp;nbsp;await table.AddFeaturesAsync(features);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get an exception: "The shape must have a Z value."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternatively, will the sketch editor create a z-enabled geometry if there is underlying elevation data included as a map layer?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Jan 2017 14:56:26 GMT</pubDate>
    <dc:creator>KeithGemeinhart1</dc:creator>
    <dc:date>2017-01-13T14:56:26Z</dc:date>
    <item>
      <title>Adding Z values to Geometry</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/adding-z-values-to-geometry/m-p/749794#M9373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using ArcGIS Runtime for .NET 100.0 and WPF. I have a geometry created using the sketch editor ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN style="font-family: andale mono,monospace;"&gt;_traceGeometry = await Mapview.SketchEditor.StartAsync(SketchCreationMode.Polyline, true);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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 ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN style="font-family: andale mono,monospace;"&gt;&amp;nbsp;await table.AddFeaturesAsync(features);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get an exception: "The shape must have a Z value."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternatively, will the sketch editor create a z-enabled geometry if there is underlying elevation data included as a map layer?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jan 2017 14:56:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/adding-z-values-to-geometry/m-p/749794#M9373</guid>
      <dc:creator>KeithGemeinhart1</dc:creator>
      <dc:date>2017-01-13T14:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Z values to Geometry</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/adding-z-values-to-geometry/m-p/749795#M9374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, you would have to go through the geometry in a builder and assign appropriate Z values to the vertices.&amp;nbsp;The editor doesn't try and "guess" a Z value automatically, but forces the developer to make an informed decision about what Z values are correct, rather than risk&amp;nbsp;inserting invalid geometry into your database. We are looking at making this easier (like for instance allowing you to set a default Z and/or M value)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MapView doesn't have an elevation source, and thus can't derive it from there either (and that would&amp;nbsp;still mean making an assumption about what you're sketching that might be wrong).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jan 2017 21:46:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/adding-z-values-to-geometry/m-p/749795#M9374</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2017-01-13T21:46:56Z</dc:date>
    </item>
  </channel>
</rss>

