<?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: REST API /updatefeatures geometry attribute (x, y) not displaying on map in ArcGIS REST APIs and Services Questions</title>
    <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/rest-api-updatefeatures-geometry-attribute-x-y-not/m-p/525340#M2506</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok it turns out there is another attribute you need to POST with the "geometery" attribute:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;{&lt;BR /&gt; "attributes":{&lt;BR /&gt; "device_id":1,&lt;BR /&gt; "objectid":17,&lt;BR /&gt;"longitude":&amp;lt;insert longitude here&amp;gt;,&lt;BR /&gt; "latitude":&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;lt;insert longitude here&amp;gt;&lt;/SPAN&gt;,&lt;BR /&gt; },&lt;BR /&gt; "geometry":{&lt;BR /&gt; "x":&amp;lt;insert utm converted coord here&amp;gt;,&lt;BR /&gt; "y":&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;lt;insert utm converted coord here&amp;gt;&lt;/SPAN&gt;,&lt;BR /&gt; &lt;STRONG&gt;"spatialReference":{&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; "wkid":&amp;lt;insert WKID here&amp;gt;&lt;/STRONG&gt;&lt;BR /&gt; &lt;STRONG&gt;}&lt;/STRONG&gt;&lt;BR /&gt; }&lt;BR /&gt;},&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;"attributes":{&lt;/SPAN&gt;&lt;BR style="background-color: #f6f6f6;" /&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;"device_id":&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;,&lt;/SPAN&gt;&lt;BR style="background-color: #f6f6f6;" /&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;"objectid":18,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Realising I needed a 'wkid' (well known ID) for the 'spatialReference' key, I did a google for &amp;lt;my city&amp;gt; WKID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using this &lt;A href="https://resources.arcgis.com/en/help/main/10.1/018z/pdf/projected_coordinate_systems.pdf"&gt;resource&lt;/A&gt;, I was able to find the corresponding WKID for&amp;nbsp;my city's&amp;nbsp;Coordinate Projection System, and send it in the POST request.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FYI, to convert lat long coordinates to X Y (UTM) coordinates, I used the Python "utm" module and the 'from_latlon' function, see:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;import&amp;nbsp;utm&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;#Here I loop through my "device list" and convert Lat/long to X/Y utm coords:&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;latitude,&amp;nbsp;longitude,&amp;nbsp;zone,&amp;nbsp;var&amp;nbsp;=&amp;nbsp;utm.from_latlon(float(&lt;STRONG&gt;&amp;lt;insert latitude&amp;gt;&lt;/STRONG&gt;),&amp;nbsp;float(&lt;STRONG&gt;&amp;lt;insert longitude&amp;gt;&lt;/STRONG&gt;))&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;#Insert the X Y coords into the /updateFeatures "data" (payload) string for the request&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just thought I would update my post for anyone that stumbles upon the same issue. This is the culmination of two days troubleshooting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 May 2020 06:44:17 GMT</pubDate>
    <dc:creator>JackSilburn</dc:creator>
    <dc:date>2020-05-21T06:44:17Z</dc:date>
    <item>
      <title>REST API /updatefeatures geometry attribute (x, y) not displaying in correct projection</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/rest-api-updatefeatures-geometry-attribute-x-y-not/m-p/525339#M2505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In attempting to dynamically move the location of points on a map, I am using the /updatefeatures endpoint of the arcGIS REST API.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My POST data looks like the following:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;[{&lt;/P&gt;&lt;P&gt;"geometry":{"x": 702078.1622769168, "y": 8625267.799537977},&lt;/P&gt;&lt;P&gt;"attributes":{\'device_id\': 1234, \'objectid\': 20...},&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;}]&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;STRONG&gt;The update works successfully&lt;/STRONG&gt;, when I use the /query endpoint, the data has changed as expected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However the map has &lt;STRONG&gt;no points visible&lt;/STRONG&gt; when I open the layer in Map viewer. They have disappeared.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am I mistaken? Does the "geometry" attribute in the request not influence where the point is located?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I even plugged the X and Y coordinate into an online converter and it finds the location successfully.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 May 2020 06:55:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/rest-api-updatefeatures-geometry-attribute-x-y-not/m-p/525339#M2505</guid>
      <dc:creator>JackSilburn</dc:creator>
      <dc:date>2020-05-19T06:55:26Z</dc:date>
    </item>
    <item>
      <title>Re: REST API /updatefeatures geometry attribute (x, y) not displaying on map</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/rest-api-updatefeatures-geometry-attribute-x-y-not/m-p/525340#M2506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok it turns out there is another attribute you need to POST with the "geometery" attribute:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;{&lt;BR /&gt; "attributes":{&lt;BR /&gt; "device_id":1,&lt;BR /&gt; "objectid":17,&lt;BR /&gt;"longitude":&amp;lt;insert longitude here&amp;gt;,&lt;BR /&gt; "latitude":&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;lt;insert longitude here&amp;gt;&lt;/SPAN&gt;,&lt;BR /&gt; },&lt;BR /&gt; "geometry":{&lt;BR /&gt; "x":&amp;lt;insert utm converted coord here&amp;gt;,&lt;BR /&gt; "y":&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;lt;insert utm converted coord here&amp;gt;&lt;/SPAN&gt;,&lt;BR /&gt; &lt;STRONG&gt;"spatialReference":{&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; "wkid":&amp;lt;insert WKID here&amp;gt;&lt;/STRONG&gt;&lt;BR /&gt; &lt;STRONG&gt;}&lt;/STRONG&gt;&lt;BR /&gt; }&lt;BR /&gt;},&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;"attributes":{&lt;/SPAN&gt;&lt;BR style="background-color: #f6f6f6;" /&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;"device_id":&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;,&lt;/SPAN&gt;&lt;BR style="background-color: #f6f6f6;" /&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;"objectid":18,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Realising I needed a 'wkid' (well known ID) for the 'spatialReference' key, I did a google for &amp;lt;my city&amp;gt; WKID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using this &lt;A href="https://resources.arcgis.com/en/help/main/10.1/018z/pdf/projected_coordinate_systems.pdf"&gt;resource&lt;/A&gt;, I was able to find the corresponding WKID for&amp;nbsp;my city's&amp;nbsp;Coordinate Projection System, and send it in the POST request.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FYI, to convert lat long coordinates to X Y (UTM) coordinates, I used the Python "utm" module and the 'from_latlon' function, see:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;import&amp;nbsp;utm&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;#Here I loop through my "device list" and convert Lat/long to X/Y utm coords:&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;latitude,&amp;nbsp;longitude,&amp;nbsp;zone,&amp;nbsp;var&amp;nbsp;=&amp;nbsp;utm.from_latlon(float(&lt;STRONG&gt;&amp;lt;insert latitude&amp;gt;&lt;/STRONG&gt;),&amp;nbsp;float(&lt;STRONG&gt;&amp;lt;insert longitude&amp;gt;&lt;/STRONG&gt;))&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;#Insert the X Y coords into the /updateFeatures "data" (payload) string for the request&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just thought I would update my post for anyone that stumbles upon the same issue. This is the culmination of two days troubleshooting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2020 06:44:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/rest-api-updatefeatures-geometry-attribute-x-y-not/m-p/525340#M2506</guid>
      <dc:creator>JackSilburn</dc:creator>
      <dc:date>2020-05-21T06:44:17Z</dc:date>
    </item>
  </channel>
</rss>

