<?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 Re: Strange geometry numbers after geodetic offset in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/strange-geometry-numbers-after-geodetic-offset/m-p/273830#M2497</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think maybe the point you're getting back after applying an offset does not have a spatial reference set on it. So when you go to project it you get weird values, but&amp;nbsp; when you try to save that geometry to the database, the database notices there isn't a spatial reference so it assumes it is in the native spatial reference of the data and assigns it that in the database. When next time you refetch the feature it has the correct spatial reference which projects nicely.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Boy, that was a mouthful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bottom line, just make sure all your geometries have the right spatial reference along each step, and see if that solves anything&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Feb 2016 22:08:54 GMT</pubDate>
    <dc:creator>DiveshGoyal</dc:creator>
    <dc:date>2016-02-19T22:08:54Z</dc:date>
    <item>
      <title>Strange geometry numbers after geodetic offset</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/strange-geometry-numbers-after-geodetic-offset/m-p/273829#M2496</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using the geodetic move function to calculate the location of marine mammal sightings based on the current vessel location and various bearing and distance values from different field gear (theodolite, Big Eyes, reticle binoculars, etc...)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="color: #703daa;"&gt;NSArray&lt;/SPAN&gt;&lt;SPAN style="color: #4f8187;"&gt; *movedPoints = [pointEngine &lt;/SPAN&gt;&lt;SPAN style="color: #31595d;"&gt;geodesicMovePoints&lt;/SPAN&gt;&lt;SPAN style="color: #4f8187;"&gt;:pointArray &lt;/SPAN&gt;&lt;SPAN style="color: #31595d;"&gt;byDistance&lt;/SPAN&gt;&lt;SPAN style="color: #4f8187;"&gt;:distance &lt;/SPAN&gt;&lt;SPAN style="color: #31595d;"&gt;inUnit&lt;/SPAN&gt;&lt;SPAN style="color: #4f8187;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="color: #31595d;"&gt;AGSSRUnitMeter&lt;/SPAN&gt;&lt;SPAN style="color: #4f8187;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #31595d;"&gt;azimuth&lt;/SPAN&gt;&lt;SPAN style="color: #4f8187;"&gt;:bearing];&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I first display the attributes things look fine:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Simulator Screen Shot Feb 19, 2016, 10.12.23 AM.png" class="image-1 jive-image" src="/legacyfs/online/185453_Simulator Screen Shot Feb 19, 2016, 10.12.23 AM.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;As you can see the "Sighting Location" attribute is displayed as valid lat/long values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That table row is displayed using the following logic:&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Menlo;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="color: #4f8187;"&gt;AGSGeometryEngine&lt;/SPAN&gt; *sightingEngine = [[&lt;SPAN style="color: #4f8187;"&gt;AGSGeometryEngine&lt;/SPAN&gt; &lt;SPAN style="color: #3d1d81;"&gt;alloc&lt;/SPAN&gt;]&lt;SPAN style="color: #3d1d81;"&gt;init&lt;/SPAN&gt;];&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Menlo;"&gt;&lt;SPAN style="color: #4f8187;"&gt;AGSGeometry&lt;/SPAN&gt;* sightingGeometry = [sightingEngine &lt;SPAN style="color: #31595d;"&gt;projectGeometry&lt;/SPAN&gt;:[&lt;SPAN style="color: #bb2ca2;"&gt;self&lt;/SPAN&gt;.&lt;SPAN style="color: #4f8187;"&gt;feature&lt;/SPAN&gt; &lt;SPAN style="color: #31595d;"&gt;geometry&lt;/SPAN&gt;] &lt;SPAN style="color: #31595d;"&gt;toSpatialReference&lt;/SPAN&gt;:[&lt;SPAN style="color: #4f8187;"&gt;AGSSpatialReference&lt;/SPAN&gt; &lt;SPAN style="color: #31595d;"&gt;wgs84SpatialReference&lt;/SPAN&gt;]];&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Menlo;"&gt;cell.&lt;SPAN style="color: #703daa;"&gt;detailTextLabel&lt;/SPAN&gt;.&lt;SPAN style="color: #703daa;"&gt;text&lt;/SPAN&gt; = [&lt;SPAN style="color: #703daa;"&gt;NSString&lt;/SPAN&gt; &lt;SPAN style="color: #3d1d81;"&gt;stringWithFormat&lt;/SPAN&gt;:&lt;SPAN style="color: #d12f1b;"&gt;@"%f, %f"&lt;/SPAN&gt;, [sightingGeometry.&lt;SPAN style="color: #4f8187;"&gt;envelope&lt;/SPAN&gt;.&lt;SPAN style="color: #4f8187;"&gt;center&lt;/SPAN&gt; &lt;SPAN style="color: #31595d;"&gt;x&lt;/SPAN&gt;], [sightingGeometry.&lt;SPAN style="color: #4f8187;"&gt;envelope&lt;/SPAN&gt;.&lt;SPAN style="color: #4f8187;"&gt;center&lt;/SPAN&gt; &lt;SPAN style="color: #31595d;"&gt;y&lt;/SPAN&gt;]];&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Menlo;"&gt;&lt;/P&gt;&lt;P&gt;If we perform the offset calculation again (say someone edits the reticle count and re-saves the record) the attributes displayed by the same cell logic produce this result:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Simulator Screen Shot Feb 19, 2016, 10.12.33 AM.png" class="image-2 jive-image" src="/legacyfs/online/185454_Simulator Screen Shot Feb 19, 2016, 10.12.33 AM.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;As you can see the values for Sighting Location are now displaying a very small number for Lat/Long based on the same attributes (feature.envelope.center).&amp;nbsp; This value appears to be the offset applied to the feature, not the actual Lat/Long of the geometry.&amp;nbsp; If I close down the view and reload (which re-selects the feature from the geodatabase) the table appears as expected, with the correct Lat/Long values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone explain what I'm seeing here?&amp;nbsp; Is the geodetic offset being stored in a business table somewhere in the geodatabase until the AGSGDBFeature variable is de-allocated or something?&amp;nbsp; If that is the case, is there some way I can force the database to apply waiting edits to the feature besides saving it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Feb 2016 19:35:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/strange-geometry-numbers-after-geodetic-offset/m-p/273829#M2496</guid>
      <dc:creator>MichaelDavis3</dc:creator>
      <dc:date>2016-02-19T19:35:51Z</dc:date>
    </item>
    <item>
      <title>Re: Strange geometry numbers after geodetic offset</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/strange-geometry-numbers-after-geodetic-offset/m-p/273830#M2497</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think maybe the point you're getting back after applying an offset does not have a spatial reference set on it. So when you go to project it you get weird values, but&amp;nbsp; when you try to save that geometry to the database, the database notices there isn't a spatial reference so it assumes it is in the native spatial reference of the data and assigns it that in the database. When next time you refetch the feature it has the correct spatial reference which projects nicely.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Boy, that was a mouthful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bottom line, just make sure all your geometries have the right spatial reference along each step, and see if that solves anything&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Feb 2016 22:08:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/strange-geometry-numbers-after-geodetic-offset/m-p/273830#M2497</guid>
      <dc:creator>DiveshGoyal</dc:creator>
      <dc:date>2016-02-19T22:08:54Z</dc:date>
    </item>
  </channel>
</rss>

