<?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 Point Coordinates Not Showing Properly in the AGOL Map Viewer in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/point-coordinates-not-showing-properly-in-the-agol/m-p/859057#M4137</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm loading data from a GeoJSON object in python. I'm sure I am properly assigning my point coordinates in "geometry" key like this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" height="54" src="https://community.esri.com/legacyfs/online/489276_pastedImage_2.png" width="313" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and creating a featureSet from the cases dict (GeoJSON)&amp;nbsp; and load it to my hosted feature layer in AGOL.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-3 jive-image" height="7" src="https://community.esri.com/legacyfs/online/489277_pastedImage_3.png" width="389" /&gt;&lt;/P&gt;&lt;P&gt;But in my AGOL's map viewer, all points are concentrated in [0,0] coordinates. Checking the service URL, whenever I query the features and return them in HTML or in JSON format, it shows the correct (x,y) geometry. But when I return them in geojson, it shows wrong (x,y) values. Any idea how this is even possible? Thank you!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;JSON:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;IMG class="jive-image image-4" height="65" src="https://community.esri.com/legacyfs/online/489279_pastedImage_6.png" width="217" /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;HTML:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;IMG class="image-5 jive-image" height="72" src="https://community.esri.com/legacyfs/online/489280_pastedImage_7.png" width="209" /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;GeoJSON:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;IMG class="image-6 jive-image" height="45" src="https://community.esri.com/legacyfs/online/489281_pastedImage_8.png" width="269" /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Apr 2020 09:19:09 GMT</pubDate>
    <dc:creator>AldwinGregorio</dc:creator>
    <dc:date>2020-04-20T09:19:09Z</dc:date>
    <item>
      <title>Point Coordinates Not Showing Properly in the AGOL Map Viewer</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/point-coordinates-not-showing-properly-in-the-agol/m-p/859057#M4137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm loading data from a GeoJSON object in python. I'm sure I am properly assigning my point coordinates in "geometry" key like this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" height="54" src="https://community.esri.com/legacyfs/online/489276_pastedImage_2.png" width="313" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and creating a featureSet from the cases dict (GeoJSON)&amp;nbsp; and load it to my hosted feature layer in AGOL.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-3 jive-image" height="7" src="https://community.esri.com/legacyfs/online/489277_pastedImage_3.png" width="389" /&gt;&lt;/P&gt;&lt;P&gt;But in my AGOL's map viewer, all points are concentrated in [0,0] coordinates. Checking the service URL, whenever I query the features and return them in HTML or in JSON format, it shows the correct (x,y) geometry. But when I return them in geojson, it shows wrong (x,y) values. Any idea how this is even possible? Thank you!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;JSON:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;IMG class="jive-image image-4" height="65" src="https://community.esri.com/legacyfs/online/489279_pastedImage_6.png" width="217" /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;HTML:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;IMG class="image-5 jive-image" height="72" src="https://community.esri.com/legacyfs/online/489280_pastedImage_7.png" width="209" /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;GeoJSON:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;IMG class="image-6 jive-image" height="45" src="https://community.esri.com/legacyfs/online/489281_pastedImage_8.png" width="269" /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Apr 2020 09:19:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/point-coordinates-not-showing-properly-in-the-agol/m-p/859057#M4137</guid>
      <dc:creator>AldwinGregorio</dc:creator>
      <dc:date>2020-04-20T09:19:09Z</dc:date>
    </item>
    <item>
      <title>Re: Point Coordinates Not Showing Properly in the AGOL Map Viewer</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/point-coordinates-not-showing-properly-in-the-agol/m-p/859058#M4138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/251794"&gt;Aldwin Gregorio&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess the CRS (&lt;SPAN class=""&gt;Coordinate Reference System&lt;/SPAN&gt;) of your featureSet is something like 102100 or 3857 (most probably both), which is Web Mercator, while the CRS of your input data is not...&lt;/P&gt;&lt;P&gt;You can check this by asking for it's &lt;SPAN class="" style="font-family: andale mono, monospace;"&gt;spatial_reference &lt;/SPAN&gt;like this:&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;In&amp;nbsp;[28]:&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;fs&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;spatial_reference&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;Out[28]:&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;PRE&gt;{'wkid': 102100, 'latestWkid': 3857}&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;So, you will have to convert your input data to Web Mercator during the import process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Egge-Jan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Apr 2020 12:17:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/point-coordinates-not-showing-properly-in-the-agol/m-p/859058#M4138</guid>
      <dc:creator>Egge-Jan_Pollé</dc:creator>
      <dc:date>2020-04-20T12:17:05Z</dc:date>
    </item>
    <item>
      <title>Re: Point Coordinates Not Showing Properly in the AGOL Map Viewer</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/point-coordinates-not-showing-properly-in-the-agol/m-p/859059#M4139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/331608"&gt;Egge-Jan Pollé&lt;/A&gt;‌,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your reply. I checked the spatial_reference of my featureset and saw that the CRS is in&amp;nbsp;&lt;STRONG&gt;{'wkid': 4326}&lt;/STRONG&gt;. So I explicitly changed the CRS by overriding the spatial_reference property of my FeatureSet to&amp;nbsp;&lt;STRONG&gt;{'wkid': 102100, 'latestWkid': 3857}&lt;/STRONG&gt;. However, my points are still displayed in the wrong locations.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="489413" class="image-1 jive-image" height="210" src="https://community.esri.com/legacyfs/online/489413_pastedImage_3.png" width="350" /&gt;&lt;IMG __jive_id="489414" class="image-2 jive-image" height="195" src="https://community.esri.com/legacyfs/online/489414_pastedImage_4.png" width="339" /&gt;&lt;BR /&gt;I am looking into this module (&lt;A class="link-titled" href="https://developers.arcgis.com/python/api-reference/arcgis.features.toc.html" title="https://developers.arcgis.com/python/api-reference/arcgis.features.toc.html"&gt;arcgis.features module — arcgis 1.8.0 documentation&lt;/A&gt;&amp;nbsp;) and trying to look for a function that can convert the spatial reference of my input featureset, but spatial_reference is the only available one from the list. I tried including the datum_transformation when I'm calling the edit_features() but getting this error instead.&lt;BR /&gt;&lt;IMG __jive_id="489415" class="image-3 jive-image" height="20" src="https://community.esri.com/legacyfs/online/489415_pastedImage_5.png" width="583" /&gt;&lt;/P&gt;&lt;P&gt;Checking the module show me this in the layer.py&amp;nbsp;&lt;BR /&gt;&lt;IMG __jive_id="489416" class="jive-image image-4" height="130" src="https://community.esri.com/legacyfs/online/489416_pastedImage_6.png" width="293" /&gt;`&lt;/P&gt;&lt;P&gt;Checking the from_geojson method in feature.py show me this.&amp;nbsp;&lt;BR /&gt;&lt;IMG __jive_id="489417" class="image-5 jive-image" height="245" src="https://community.esri.com/legacyfs/online/489417_pastedImage_7.png" width="427" /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Is there an available method/function that will transform my featureset to the&amp;nbsp;&lt;STRONG&gt;3857&lt;/STRONG&gt;?&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Apr 2020 02:47:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/point-coordinates-not-showing-properly-in-the-agol/m-p/859059#M4139</guid>
      <dc:creator>AldwinGregorio</dc:creator>
      <dc:date>2020-04-21T02:47:44Z</dc:date>
    </item>
    <item>
      <title>Re: Point Coordinates Not Showing Properly in the AGOL Map Viewer</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/point-coordinates-not-showing-properly-in-the-agol/m-p/859060#M4140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This works fine now. I just reprojecting the coordinates I'm getting from geocoding addresses. Geocoding returns coords value in 4326 so I just convert those values to 3857 in my code. Thank you &lt;A href="https://community.esri.com/migrated-users/331608" target="_blank"&gt;Egge-Jan Pollé&lt;/A&gt;‌ for the idea. &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;from &lt;/SPAN&gt;arcgis &lt;SPAN style="color: #000080; font-weight: bold;"&gt;import &lt;/SPAN&gt;geometry
&lt;SPAN style="color: #000080; font-weight: bold;"&gt;def &lt;/SPAN&gt;reproject_coords(coords):
    input_geom = [{&lt;SPAN style="color: #008080; font-weight: bold;"&gt;'x'&lt;/SPAN&gt;: coords[&lt;SPAN style="color: #0000ff;"&gt;0&lt;/SPAN&gt;], &lt;SPAN style="color: #008080; font-weight: bold;"&gt;'y'&lt;/SPAN&gt;: coords[&lt;SPAN style="color: #0000ff;"&gt;1&lt;/SPAN&gt;]}]
    result = geometry.project(&lt;SPAN style="color: #660099;"&gt;geometries&lt;/SPAN&gt;=input_geom, &lt;SPAN style="color: #660099;"&gt;in_sr&lt;/SPAN&gt;=&lt;SPAN style="color: #0000ff;"&gt;4326&lt;/SPAN&gt;, &lt;SPAN style="color: #660099;"&gt;out_sr&lt;/SPAN&gt;=&lt;SPAN style="color: #0000ff;"&gt;3857&lt;/SPAN&gt;)
    &lt;SPAN style="color: #000080; font-weight: bold;"&gt;return &lt;/SPAN&gt;[result[&lt;SPAN style="color: #0000ff;"&gt;0&lt;/SPAN&gt;][&lt;SPAN style="color: #008080; font-weight: bold;"&gt;'x'&lt;/SPAN&gt;], result[&lt;SPAN style="color: #0000ff;"&gt;0&lt;/SPAN&gt;][&lt;SPAN style="color: #008080; font-weight: bold;"&gt;'y'&lt;/SPAN&gt;]]&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:38:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/point-coordinates-not-showing-properly-in-the-agol/m-p/859060#M4140</guid>
      <dc:creator>AldwinGregorio</dc:creator>
      <dc:date>2021-12-12T10:38:12Z</dc:date>
    </item>
    <item>
      <title>Re: Point Coordinates Not Showing Properly in the AGOL Map Viewer</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/point-coordinates-not-showing-properly-in-the-agol/m-p/859061#M4141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/251794"&gt;Aldwin Gregorio&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good to hear that my suggestion was useful and good to see that you managed to get the conversion right &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Egge-Jan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Apr 2020 11:02:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/point-coordinates-not-showing-properly-in-the-agol/m-p/859061#M4141</guid>
      <dc:creator>Egge-Jan_Pollé</dc:creator>
      <dc:date>2020-04-21T11:02:24Z</dc:date>
    </item>
  </channel>
</rss>

