<?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 GeometryEngine fails to project valid points, returning NaN in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/geometryengine-fails-to-project-valid-points/m-p/393124#M2671</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Steps to reproduce:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Load a world map with the following spatial reference:&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER["Standard_Parallel_1",0.0],PARAMETER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0]]&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;/LI&gt;&lt;LI&gt;Enable wrap-around at the 180 degree meridian&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Center the map on the 180 degree meridian at the equator (near baker island), c&lt;SPAN style="line-height: 1.5;"&gt;onfiguring the map extent so the bottom left and top right &lt;/SPAN&gt;corner are as follows:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;bottomLeft: Point [m_attributes=[1.9449581424337383E7, -626899.6119120895], m_description=com.esri.core.geometry.VertexDescription@7c5d0f85]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; topRight: Point [m_attributes=[2.0623654149388406E7, 706162.1279895945], m_description=com.esri.core.geometry.VertexDescription@7c5d0f85]&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;/LI&gt;&lt;LI&gt;Attempt to extract and convert these points to WGS84, using:&lt;/LI&gt;&lt;/OL&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Point bottomLeft = mMapView.toMapPoint(0, mMapView.getHeight());
Point topRight = mMapView.toMapPoint(mMapView.getWidth(), 0);
SpatialReference WGS84 = SpatialReference.create(SpatialReference.WKID_WGS84);
Point wgs84BottomLeft = (Point)GeometryEngine.project(bottomLeft, &lt;SPAN style="line-height: 1.5;"&gt;mMap.getSpatialReference(), WGS84);&lt;/SPAN&gt;
Point wgs84TopRight = (Point)GeometryEngine.project(topRight, &lt;SPAN style="line-height: 1.5;"&gt;mMap.getSpatialReference(), WGS84);&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expected result: &lt;SPAN style="line-height: 1.5;"&gt;Two valid WGS84 points&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;Actual result:&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;wgs84bottomLeft: Point [m_attributes=[174.71856263209403, -5.622489445477077], m_description=com.esri.core.geometry.VertexDescription@7c5d0f85]&lt;/P&gt;&lt;P&gt;wgs84topRight: Point [m_attributes=[NaN, NaN], m_description=com.esri.core.geometry.VertexDescription@7c5d0f85]&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This issue becomes even worse if you move the extent further east, and you can easily get into a situation where both points return NaN.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 18:01:09 GMT</pubDate>
    <dc:creator>RobertBares</dc:creator>
    <dc:date>2021-12-11T18:01:09Z</dc:date>
    <item>
      <title>GeometryEngine fails to project valid points, returning NaN</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/geometryengine-fails-to-project-valid-points/m-p/393124#M2671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Steps to reproduce:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Load a world map with the following spatial reference:&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER["Standard_Parallel_1",0.0],PARAMETER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0]]&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;/LI&gt;&lt;LI&gt;Enable wrap-around at the 180 degree meridian&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Center the map on the 180 degree meridian at the equator (near baker island), c&lt;SPAN style="line-height: 1.5;"&gt;onfiguring the map extent so the bottom left and top right &lt;/SPAN&gt;corner are as follows:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;bottomLeft: Point [m_attributes=[1.9449581424337383E7, -626899.6119120895], m_description=com.esri.core.geometry.VertexDescription@7c5d0f85]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; topRight: Point [m_attributes=[2.0623654149388406E7, 706162.1279895945], m_description=com.esri.core.geometry.VertexDescription@7c5d0f85]&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;/LI&gt;&lt;LI&gt;Attempt to extract and convert these points to WGS84, using:&lt;/LI&gt;&lt;/OL&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Point bottomLeft = mMapView.toMapPoint(0, mMapView.getHeight());
Point topRight = mMapView.toMapPoint(mMapView.getWidth(), 0);
SpatialReference WGS84 = SpatialReference.create(SpatialReference.WKID_WGS84);
Point wgs84BottomLeft = (Point)GeometryEngine.project(bottomLeft, &lt;SPAN style="line-height: 1.5;"&gt;mMap.getSpatialReference(), WGS84);&lt;/SPAN&gt;
Point wgs84TopRight = (Point)GeometryEngine.project(topRight, &lt;SPAN style="line-height: 1.5;"&gt;mMap.getSpatialReference(), WGS84);&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expected result: &lt;SPAN style="line-height: 1.5;"&gt;Two valid WGS84 points&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;Actual result:&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;wgs84bottomLeft: Point [m_attributes=[174.71856263209403, -5.622489445477077], m_description=com.esri.core.geometry.VertexDescription@7c5d0f85]&lt;/P&gt;&lt;P&gt;wgs84topRight: Point [m_attributes=[NaN, NaN], m_description=com.esri.core.geometry.VertexDescription@7c5d0f85]&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This issue becomes even worse if you move the extent further east, and you can easily get into a situation where both points return NaN.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:01:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/geometryengine-fails-to-project-valid-points/m-p/393124#M2671</guid>
      <dc:creator>RobertBares</dc:creator>
      <dc:date>2021-12-11T18:01:09Z</dc:date>
    </item>
    <item>
      <title>Re: GeometryEngine fails to project valid points, returning NaN</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/geometryengine-fails-to-project-valid-points/m-p/393125#M2672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Fixed using normalizeCentralMeridian from the latest version of the SDK. See bottom half of this page for more details: &lt;A href="https://developers.arcgis.com/android/guide/enable-wrap-around.htm" title="https://developers.arcgis.com/android/guide/enable-wrap-around.htm"&gt;Enable wrap around—ArcGIS Runtime SDK for Android | ArcGIS for Developers&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Mar 2015 11:35:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/geometryengine-fails-to-project-valid-points/m-p/393125#M2672</guid>
      <dc:creator>RobertBares</dc:creator>
      <dc:date>2015-03-24T11:35:54Z</dc:date>
    </item>
  </channel>
</rss>

