<?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: Geometry vs Geography in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/geometry-vs-geography/m-p/142491#M5577</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have no idea, but sharing to &lt;A href="https://community.esri.com/space/2087"&gt;Geoprocessing&lt;/A&gt;‌ &lt;A href="https://community.esri.com/group/2232"&gt;ArcGIS Open Data community&lt;/A&gt;‌ since &lt;A href="https://community.esri.com/community/help-and-feedback?sr=search&amp;amp;searchId=147cf339-2c78-4f91-b8f1-2b1339c8d7db&amp;amp;searchIndex=0"&gt;https://community.esri.com/community/help-and-feedback?sr=search&amp;amp;searchId=147cf339-2c78-4f91-b8f1-2b1339c8d7db&amp;amp;searchIndex=0&lt;/A&gt;‌ is about using GeoNet, not technical questions&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Nov 2016 05:23:35 GMT</pubDate>
    <dc:creator>curtvprice</dc:creator>
    <dc:date>2016-11-25T05:23:35Z</dc:date>
    <item>
      <title>Geometry vs Geography</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geometry-vs-geography/m-p/142490#M5576</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV class="" style="color: #000000; font-size: 12px;"&gt;Hi,&lt;/DIV&gt;&lt;DIV class="" style="color: #000000; font-size: 12px;"&gt;Currently I'm doing a conversion from&amp;nbsp;MSSQL to Spark/SparkSQL. &amp;nbsp;I’m using the esri-geometry-api and spatial-sdk-hadoop packages from esri which are mostly fine. &amp;nbsp;Except the data in sql server is of geography data type, with the smaller polygon conversions all was well but with the bigger ones where the earths curvature has some impact I am getting differing results. &amp;nbsp;The MS SQL sample code below examines the differences between the two types where the Geography ones is the one being using in the source system I am porting the functionality from, the MS-SQL-Geometry example matches the same as I am getting from the ESRI hadoop kit also.&lt;/DIV&gt;&lt;DIV class="" style="color: #000000; font-size: 12px;"&gt;If anyone could assist in helping find equivalent functionality in either the ESRI libraries (or another libraries) it would be much appreciated.&lt;/DIV&gt;&lt;DIV class="" style="color: #000000; font-size: 12px;"&gt; &lt;/DIV&gt;&lt;DIV class="" style="color: #000000; font-size: 12px;"&gt;&lt;STRONG class=""&gt;MS SQL - Geography - Correctly identifies the point as belonging to the RegionA&amp;nbsp;- This is what I want to end up with.&lt;/STRONG&gt;&lt;DIV class=""&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;DECLARE&lt;SPAN class="" style="color: #000000;"&gt;&amp;nbsp;@polyA&amp;nbsp;&lt;/SPAN&gt;geography
DECLARE&lt;SPAN class="" style="color: #000000;"&gt;&amp;nbsp;@polyB&amp;nbsp;&lt;/SPAN&gt;geography
DECLARE&lt;SPAN class="" style="color: #000000;"&gt;&amp;nbsp;@point&amp;nbsp;&lt;/SPAN&gt;geography
&lt;SPAN class="" style="color: #0433ff;"&gt;SET&lt;/SPAN&gt;&lt;SPAN class="" style="color: #000000;"&gt;&amp;nbsp;@point&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #929292;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #000000;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #0433ff;"&gt;geography&lt;/SPAN&gt;&lt;SPAN class="" style="color: #929292;"&gt;::&lt;/SPAN&gt;&lt;SPAN class="" style="color: #000000;"&gt;STGeomFromText&lt;/SPAN&gt;&lt;SPAN class="" style="color: #929292;"&gt;(&lt;/SPAN&gt;'POINT(-1.5667444464495464 55.07067670927046)'&lt;SPAN class="" style="color: #929292;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="" style="color: #000000;"&gt;4326&lt;/SPAN&gt;&lt;SPAN class="" style="color: #929292;"&gt;);&lt;/SPAN&gt;
&lt;SPAN class="" style="color: #0433ff;"&gt;SET&lt;/SPAN&gt;&lt;SPAN class="" style="color: #000000;"&gt;&amp;nbsp;@polyA&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #929292;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #000000;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #0433ff;"&gt;geography&lt;/SPAN&gt;&lt;SPAN class="" style="color: #929292;"&gt;::&lt;/SPAN&gt;&lt;SPAN class="" style="color: #000000;"&gt;STGeomFromText&lt;/SPAN&gt;&lt;SPAN class="" style="color: #929292;"&gt;(&lt;/SPAN&gt;'POLYGON ((-8 48.83305556, -2 50, -0.25 50, 1.466666667 50.66666667, 1.466666667 51, 2 51.11638889, 2 51.5, 5 55, -5.5 55, -5.5 52.33305556, -8 51, -8 48.83305556))'&lt;SPAN class="" style="color: #929292;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="" style="color: #000000;"&gt;4326&lt;/SPAN&gt;&lt;SPAN class="" style="color: #929292;"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="" style="color: #0433ff;"&gt;SET&lt;/SPAN&gt;&lt;SPAN class="" style="color: #000000;"&gt;&amp;nbsp;@ployB&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #929292;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #000000;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #0433ff;"&gt;geography&lt;/SPAN&gt;&lt;SPAN class="" style="color: #929292;"&gt;::&lt;/SPAN&gt;&lt;SPAN class="" style="color: #000000;"&gt;STGeomFromText&lt;/SPAN&gt;&lt;SPAN class="" style="color: #929292;"&gt;(&lt;/SPAN&gt;'POLYGON ((-10 54.5663888888889, -9 54.75, -8.25 55.3330555555556, -7.33305555555556 55.4166666666667, -6.91666666666667 55.3330555555556, -8.16666666666667 54.4166666666667, -5.5 53.9166666666667, -5.5 55, 5 55, 5 57, 0 60, 0 61, -10 61, -10 54.5663888888889))'&lt;SPAN class="" style="color: #929292;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="" style="color: #000000;"&gt;4326&lt;/SPAN&gt;&lt;SPAN class="" style="color: #929292;"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="" style="color: #0433ff;"&gt;SELECT&lt;/SPAN&gt;&amp;nbsp;@polyA&lt;SPAN class="" style="color: #929292;"&gt;.&lt;/SPAN&gt;STContains&lt;SPAN class="" style="color: #929292;"&gt;(&lt;/SPAN&gt;@point&lt;SPAN class="" style="color: #929292;"&gt;)&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class="" style="color: #0433ff;"&gt;as&lt;/SPAN&gt;&amp;nbsp;inRegionA&lt;SPAN class="" style="color: #929292;"&gt;,&lt;/SPAN&gt;&amp;nbsp;@polyB&lt;SPAN class="" style="color: #929292;"&gt;.&lt;/SPAN&gt;STContains&lt;SPAN class="" style="color: #929292;"&gt;(&lt;/SPAN&gt;@point&lt;SPAN class="" style="color: #929292;"&gt;)&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class="" style="color: #0433ff;"&gt;as&lt;/SPAN&gt;&amp;nbsp;inRegionB&lt;SPAN class="" style="color: #929292;"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="" style="font-size: 12px;"&gt;Results&lt;/SPAN&gt;&lt;/PRE&gt;&lt;DIV class="" style="font-size: 9.5px;"&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;inRegionA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; inRegionB
-------------- ----------------
1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&lt;/PRE&gt;&lt;DIV class=""&gt; &lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="" style="font-size: 9.5px;"&gt; &lt;/DIV&gt;&lt;DIV class="" style="font-size: 9.5px;"&gt; &lt;/DIV&gt;&lt;DIV class="" style="font-size: 9.5px;"&gt;&lt;SPAN class="" style="font-size: 12px;"&gt;&lt;STRONG class=""&gt;MS SQL - Geometry - Incorrectly identifies the point as belonging to the RegionB&amp;nbsp;- This matches the ESRI Hadoop library results&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;DECLARE&lt;SPAN class="" style="color: #000000;"&gt;&amp;nbsp;@polyA2&amp;nbsp;&lt;/SPAN&gt;geometry
&lt;SPAN class="" style="color: #0433ff;"&gt;DECLARE&lt;/SPAN&gt;&amp;nbsp;@polyB2&amp;nbsp;&lt;SPAN class="" style="color: #0433ff;"&gt;geometry&lt;/SPAN&gt;
DECLARE&lt;SPAN class="" style="color: #000000;"&gt;&amp;nbsp;@point2&amp;nbsp;&lt;/SPAN&gt;geometry
&lt;SPAN class="" style="color: #0433ff;"&gt;SET&lt;/SPAN&gt;&lt;SPAN class="" style="color: #000000;"&gt;&amp;nbsp;@point2&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #929292;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #000000;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #0433ff;"&gt;geometry&lt;/SPAN&gt;&lt;SPAN class="" style="color: #929292;"&gt;::&lt;/SPAN&gt;&lt;SPAN class="" style="color: #000000;"&gt;STGeomFromText&lt;/SPAN&gt;&lt;SPAN class="" style="color: #929292;"&gt;(&lt;/SPAN&gt;'POINT(-1.5667444464495464 55.07067670927046)'&lt;SPAN class="" style="color: #929292;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="" style="color: #000000;"&gt;4326&lt;/SPAN&gt;&lt;SPAN class="" style="color: #929292;"&gt;);&lt;/SPAN&gt;
&lt;SPAN class="" style="color: #0433ff;"&gt;SET&lt;/SPAN&gt;&lt;SPAN class="" style="color: #000000;"&gt;&amp;nbsp;@polyA2&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #929292;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #000000;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #0433ff;"&gt;geometry&lt;/SPAN&gt;&lt;SPAN class="" style="color: #929292;"&gt;::&lt;/SPAN&gt;&lt;SPAN class="" style="color: #000000;"&gt;STGeomFromText&lt;/SPAN&gt;&lt;SPAN class="" style="color: #929292;"&gt;(&lt;/SPAN&gt;'POLYGON ((-8 48.83305556, -2 50, -0.25 50, 1.466666667 50.66666667, 1.466666667 51, 2 51.11638889, 2 51.5, 5 55, -5.5 55, -5.5 52.33305556, -8 51, -8 48.83305556))'&lt;SPAN class="" style="color: #929292;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="" style="color: #000000;"&gt;4326&lt;/SPAN&gt;&lt;SPAN class="" style="color: #929292;"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="" style="color: #0433ff;"&gt;SET&lt;/SPAN&gt;&lt;SPAN class="" style="color: #000000;"&gt;&amp;nbsp;@polyB2&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #929292;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #000000;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #0433ff;"&gt;geometry&lt;/SPAN&gt;&lt;SPAN class="" style="color: #929292;"&gt;::&lt;/SPAN&gt;&lt;SPAN class="" style="color: #000000;"&gt;STGeomFromText&lt;/SPAN&gt;&lt;SPAN class="" style="color: #929292;"&gt;(&lt;/SPAN&gt;'POLYGON ((-10 54.5663888888889, -9 54.75, -8.25 55.3330555555556, -7.33305555555556 55.4166666666667, -6.91666666666667 55.3330555555556, -8.16666666666667 54.4166666666667, -5.5 53.9166666666667, -5.5 55, 5 55, 5 57, 0 60, 0 61, -10 61, -10 54.5663888888889))'&lt;SPAN class="" style="color: #929292;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="" style="color: #000000;"&gt;4326&lt;/SPAN&gt;&lt;SPAN class="" style="color: #929292;"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="" style="color: #0433ff;"&gt;SELECT&lt;/SPAN&gt;&amp;nbsp;@polyA2&lt;SPAN class="" style="color: #929292;"&gt;.&lt;/SPAN&gt;STContains&lt;SPAN class="" style="color: #929292;"&gt;(&lt;/SPAN&gt;@point2&lt;SPAN class="" style="color: #929292;"&gt;)&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class="" style="color: #0433ff;"&gt;as&lt;/SPAN&gt;&amp;nbsp;inRegionA&lt;SPAN class="" style="color: #929292;"&gt;,&lt;/SPAN&gt;&amp;nbsp;@polyB2&lt;SPAN class="" style="color: #929292;"&gt;.&lt;/SPAN&gt;STContains&lt;SPAN class="" style="color: #929292;"&gt;(&lt;/SPAN&gt;@point2&lt;SPAN class="" style="color: #929292;"&gt;)&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class="" style="color: #0433ff;"&gt;as&lt;/SPAN&gt;&amp;nbsp;inRegionB&lt;SPAN class="" style="color: #929292;"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="" style="font-size: 12px;"&gt;Results&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;inRegionA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; inRegionB
-------------- ----------------
0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1

&lt;/PRE&gt;&lt;/PRE&gt;&lt;DIV class="" style="font-size: 12px;"&gt;&lt;DIV class="" style="margin: 0px;"&gt;&lt;DIV class=""&gt;&lt;STRONG class=""&gt;Geography vs Geometry Plotted Information&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV class="" style="font-size: 9.5px;"&gt;&lt;IMG alt="Plots" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/270891_PastedGraphic-1.jpg" style="height: auto;" /&gt;&lt;/DIV&gt;&lt;DIV class="" style="font-size: 9.5px;"&gt; &lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="" style="font-size: 12px;"&gt; &lt;/DIV&gt;&lt;DIV class="" style="font-size: 12px;"&gt;&lt;STRONG class=""&gt;Hive/SparkSQL - ESRI Geometry - Correctly identifies the point as belonging to the RegionB because it's using geometry but I want to use Geography types - is there a way?&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV class="" style="font-size: 12px;"&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="font-family: 'Courier New';"&gt;add jar esri-geometry-api.jar;&lt;/SPAN&gt;
&lt;SPAN&gt;a&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New';"&gt;dd jar spatial-sdk-hadoop.jar;&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'Courier New';"&gt;create function ST_GeomFromText as 'com.esri.hadoop.hive.ST_GeomFromText';&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'Courier New';"&gt;create function ST_Contains as 'com.esri.hadoop.hive.ST_Contains';&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'Courier New';"&gt;SELECT
ST_Contains(&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'Courier New';"&gt;ST_GeomFromText('POLYGON ((-8 48.83305556, -2 50, -0.25 50, 1.466666667 50.66666667, 1.466666667 51, 2 51.11638889, 2 51.5, 5 55, -5.5 55, -5.5 52.33305556, -8 51, -8 48.83305556))', 4326),&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'Courier New';"&gt;ST_GeomFromText('POINT(-1.5667444464495464 55.07067670927046)',4326)&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'Courier New';"&gt;) AS inRegionA,&amp;nbsp;&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'Courier New';"&gt;ST_Contains(&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'Courier New';"&gt;ST_GeomFromText('POLYGON ((-10 54.5663888888889, -9 54.75, -8.25 55.3330555555556, -7.33305555555556 55.4166666666667, -6.91666666666667 55.3330555555556, -8.16666666666667 54.4166666666667, -5.5 53.9166666666667, -5.5 55, 5 55, 5 57, 0 60, 0 61, -10 61, -10 54.5663888888889))', 4326),&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'Courier New';"&gt;ST_GeomFromText('POINT(-1.5667444464495464 55.07067670927046)',4326)&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'Courier New';"&gt;) AS inRegionB;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;DIV class="" style="font-size: 12px;"&gt; &lt;/DIV&gt;&lt;DIV class="" style="font-size: 12px;"&gt;Results&lt;/DIV&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="font-family: 'Courier New';"&gt;&lt;SPAN&gt;inRegionA &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt; &lt;SPAN&gt;inRegionB&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'Courier New';"&gt;-------------- &amp;nbsp;----------------&lt;/SPAN&gt;
&lt;SPAN style="font-family: 'Courier New';"&gt;false&lt;SPAN class=""&gt; &lt;/SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; true&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:50:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geometry-vs-geography/m-p/142490#M5576</guid>
      <dc:creator>JohnEdwards2</dc:creator>
      <dc:date>2021-12-11T07:50:51Z</dc:date>
    </item>
    <item>
      <title>Re: Geometry vs Geography</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geometry-vs-geography/m-p/142491#M5577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have no idea, but sharing to &lt;A href="https://community.esri.com/space/2087"&gt;Geoprocessing&lt;/A&gt;‌ &lt;A href="https://community.esri.com/group/2232"&gt;ArcGIS Open Data community&lt;/A&gt;‌ since &lt;A href="https://community.esri.com/community/help-and-feedback?sr=search&amp;amp;searchId=147cf339-2c78-4f91-b8f1-2b1339c8d7db&amp;amp;searchIndex=0"&gt;https://community.esri.com/community/help-and-feedback?sr=search&amp;amp;searchId=147cf339-2c78-4f91-b8f1-2b1339c8d7db&amp;amp;searchIndex=0&lt;/A&gt;‌ is about using GeoNet, not technical questions&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Nov 2016 05:23:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geometry-vs-geography/m-p/142491#M5577</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2016-11-25T05:23:35Z</dc:date>
    </item>
    <item>
      <title>Re: Geometry vs Geography</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geometry-vs-geography/m-p/142492#M5578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks, much appreciated.&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;John.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Nov 2016 05:27:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geometry-vs-geography/m-p/142492#M5578</guid>
      <dc:creator>JohnEdwards2</dc:creator>
      <dc:date>2016-11-25T05:27:41Z</dc:date>
    </item>
    <item>
      <title>Re: Geometry vs Geography</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geometry-vs-geography/m-p/142493#M5579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Regarding Hive/SparkSQL and Esri Geometry, i.e., the last part of your question, I will post a separate response after I gather my thoughts a bit more.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding MS SQL Geometry and Geography, both results are correct given what you have asked.&amp;nbsp; The Geometry and Geography examples are not the same example, so the results won't necessarily be the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The &lt;A href="https://msdn.microsoft.com/en-us/library/bb933790.aspx" rel="nofollow noopener noreferrer" target="_blank"&gt;Spatial Data (SQL Server)&lt;/A&gt; documentation states:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P style="color: #2a2a2a; text-transform: none; line-height: 18px; text-indent: 0px; letter-spacing: normal; padding-bottom: 15px; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 13px; font-style: normal; font-weight: normal; margin-top: 0px; margin-bottom: 0px; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px;"&gt;SQL Server supports two spatial data types: the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;geometry&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;data type and the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;geography&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;data type.&lt;/P&gt;&lt;UL style="color: #000000; text-transform: none; text-indent: 0px; letter-spacing: normal; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 13px; font-style: normal; font-weight: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px;"&gt;&lt;LI style="list-style-image: none;"&gt;&lt;P style="color: #2a2a2a; line-height: 18px; padding-bottom: 15px; margin-top: 0px; margin-bottom: 0px;"&gt;The&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;geometry&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;type represents data in a Euclidean (flat) coordinate system.&lt;/P&gt;&lt;/LI&gt;&lt;LI style="list-style-image: none;"&gt;&lt;P style="color: #2a2a2a; line-height: 18px; padding-bottom: 15px; margin-top: 0px; margin-bottom: 0px;"&gt;The&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;geography&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;type represents data in a round-earth coordinate system.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The &lt;A href="https://msdn.microsoft.com/en-us/library/bb964711.aspx#Anchor_1" rel="nofollow noopener noreferrer" target="_blank"&gt;Differences Between the geometry and geography Data Types &lt;/A&gt;section of &lt;A href="https://msdn.microsoft.com/en-us/library/bb964711.aspx" rel="nofollow noopener noreferrer" target="_blank"&gt;Spatial Data Types Overview &lt;/A&gt;states:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P style="color: #2a2a2a; text-transform: none; line-height: 18px; text-indent: 0px; letter-spacing: normal; padding-bottom: 15px; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 13px; font-style: normal; font-weight: normal; margin-top: 0px; margin-bottom: 0px; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px;"&gt;The two types of spatial data often behave quite similarly, but there are some key differences in how the data is stored and manipulated.&lt;/P&gt;&lt;H3 style="margin: 0px; color: #000000; text-transform: none; text-indent: 0px; letter-spacing: normal; padding-top: 5px; padding-bottom: 5px; font-family: 'Segoe UI Semibold', 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 1.23em; font-style: normal; font-weight: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px;" id="toc-hId-1423196286"&gt;&lt;A style="color: #0072c6; text-decoration: none;" target="_blank"&gt;&lt;/A&gt;How connecting edges are defined&lt;/H3&gt;&lt;P style="color: #2a2a2a; text-transform: none; line-height: 18px; text-indent: 0px; letter-spacing: normal; padding-bottom: 15px; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 13px; font-style: normal; font-weight: normal; margin-top: 0px; margin-bottom: 0px; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px;"&gt;The defining data for&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;LineString&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Polygon&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;types are vertices only. The connecting edge between two vertices in a geometry type is a straight line. However, the connecting edge between two vertices in a geography type is a short great elliptic arc between the two vertices. A great ellipse is the intersection of the ellipsoid with a plane through its center and a great elliptic arc is an arc segment on the great ellipse.&lt;/P&gt;&lt;H3 style="margin: 0px; color: #000000; text-transform: none; text-indent: 0px; letter-spacing: normal; padding-top: 5px; padding-bottom: 5px; font-family: 'Segoe UI Semibold', 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 1.23em; font-style: normal; font-weight: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px;" id="toc-hId--1128960675"&gt;&lt;A style="color: #0072c6; text-decoration: none;" target="_blank"&gt;&lt;/A&gt;How circular arc segments are defined&lt;/H3&gt;&lt;P style="color: #2a2a2a; text-transform: none; line-height: 18px; text-indent: 0px; letter-spacing: normal; padding-bottom: 15px; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 13px; font-style: normal; font-weight: normal; margin-top: 0px; margin-bottom: 0px; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px;"&gt;Circular arc segments for geometry types are defined on the XY Cartesian coordinate plane (Z values are ignored). Circular arc segments for geography types are defined by curve segments on a reference sphere. Any parallel on the reference sphere can be defined by two complementary circular arcs where the points for both arcs have a constant latitude angle.&lt;/P&gt;&lt;H3 style="margin: 0px; color: #000000; text-transform: none; text-indent: 0px; letter-spacing: normal; padding-top: 5px; padding-bottom: 5px; font-family: 'Segoe UI Semibold', 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 1.23em; font-style: normal; font-weight: normal; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px;" id="toc-hId-613849660"&gt;&lt;A style="color: #0072c6; text-decoration: none;" target="_blank"&gt;&lt;/A&gt;Measurements in spatial data types&lt;/H3&gt;&lt;P style="color: #2a2a2a; text-transform: none; line-height: 18px; text-indent: 0px; letter-spacing: normal; padding-bottom: 15px; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 13px; font-style: normal; font-weight: normal; margin-top: 0px; margin-bottom: 0px; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px;"&gt;In the planar, or flat-earth, system, measurements of distances and areas are given in the same unit of measurement as coordinates. Using the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;geometry&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;data type, the distance between (2, 2) and (5, 6) is 5 units, regardless of the units used.&lt;/P&gt;&lt;P style="color: #2a2a2a; text-transform: none; line-height: 18px; text-indent: 0px; letter-spacing: normal; padding-bottom: 15px; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 13px; font-style: normal; font-weight: normal; margin-top: 0px; margin-bottom: 0px; word-spacing: 0px; white-space: normal; orphans: 2; widows: 2; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px;"&gt;In the ellipsoidal, or round-earth system, coordinates are given in degrees of latitude and longitude. However, lengths and areas are usually measured in meters and square meters, though the measurement may depend on the spatial reference identifier (SRID) of the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;geography&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;instance. The most common unit of measurement for the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;geography&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;data type is meters.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the example(s) provided, geographic coordinate &lt;SPAN style="text-decoration: underline;"&gt;values&lt;/SPAN&gt; are being used as geometric coordinate &lt;SPAN style="text-decoration: underline;"&gt;values&lt;/SPAN&gt; with no transformations or projections taking place.&amp;nbsp; If you look at the area of just one of the polygons, you can see the polygons are substantially different:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;DECLARE&lt;/SPAN&gt; &lt;SPAN class="variable token"&gt;@polyA&lt;/SPAN&gt; geography
&lt;SPAN class="keyword token"&gt;SET&lt;/SPAN&gt; &lt;SPAN class="variable token"&gt;@polyA&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; geography::STGeomFromText&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'POLYGON ((-8 48.83305556, -2 50, -0.25 50, 1.466666667 50.66666667, 1.466666667 51, 2 51.11638889, 2 51.5, 5 55, -5.5 55, -5.5 52.33305556, -8 51, -8 48.83305556))'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;4326&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;DECLARE&lt;/SPAN&gt; &lt;SPAN class="variable token"&gt;@polyA2&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;geometry&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;SET&lt;/SPAN&gt; &lt;SPAN class="variable token"&gt;@polyA2&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;geometry&lt;/SPAN&gt;::STGeomFromText&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'POLYGON ((-8 48.83305556, -2 50, -0.25 50, 1.466666667 50.66666667, 1.466666667 51, 2 51.11638889, 2 51.5, 5 55, -5.5 55, -5.5 52.33305556, -8 51, -8 48.83305556))'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;4326&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;select&lt;/SPAN&gt; &lt;SPAN class="variable token"&gt;@polyA.STArea&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;AS&lt;/SPAN&gt; polyA_Area&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="variable token"&gt;@polyA2.STArea&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;AS&lt;/SPAN&gt; polyA2_Area

polyA_Area&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; polyA2_Area
&lt;SPAN class="comment token"&gt;---------------------- ----------------------&lt;/SPAN&gt;
&lt;SPAN class="number token"&gt;376605844086.007&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="number token"&gt;49.2805601744916&lt;/SPAN&gt;

&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;row&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;s&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; affected&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For SQL Server Geometry types, the SRID doesn't mean much to the DBMS itself.&amp;nbsp; The SRIDs of the geometry objects must match, which guarantees the same projection and units of measure, but then simple planar math is applied.&amp;nbsp; Passing geographic coordinate values and a geographic coordinate system to the geometry constructor does not apply any transformations or projections of any type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want an apples to apples comparison, you would need to project the geographic coordinates before building the geometry example.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:50:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geometry-vs-geography/m-p/142493#M5579</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2021-12-11T07:50:54Z</dc:date>
    </item>
    <item>
      <title>Re: Geometry vs Geography</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geometry-vs-geography/m-p/142494#M5580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A clarifying question.&amp;nbsp; You state that Example 1 (MS SQL - Geography) "correctly identifies the point as belonging to the RegionA" and Example 2 (MS SQL - Geometry) "incorrectly identifies the point as belonging to the RegionB", but Example 3 (Hive/SparkSQL - ESRI Geometry) "correctly identifies the point as belonging to the RegionB because it's using geometry."&amp;nbsp; For me, the statements around Example 2 and 3 contradict each other.&amp;nbsp; Although it is acknowledged that Example 2 &amp;amp; 3 provide the same result, I am uncertain whether that result is "correct."&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Nov 2016 20:31:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geometry-vs-geography/m-p/142494#M5580</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2016-11-28T20:31:24Z</dc:date>
    </item>
    <item>
      <title>Re: Geometry vs Geography</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geometry-vs-geography/m-p/142495#M5581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the help, I have probably not been clear in what I am trying to achieve. All are producing the correct results with respect to the data types but what I am wanting to replicate is the geography based calculated results from MS SQL in Hive/Spark. So far I have not been able to find a library to do so or (more likely) have in sufficient experience with the esri libraries available to be able to convert between geography and geometry.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&amp;nbsp;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Nov 2016 20:41:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geometry-vs-geography/m-p/142495#M5581</guid>
      <dc:creator>JohnEdwards2</dc:creator>
      <dc:date>2016-11-28T20:41:43Z</dc:date>
    </item>
    <item>
      <title>Re: Geometry vs Geography</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geometry-vs-geography/m-p/142496#M5582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks for the help, that gets me a little further. &amp;nbsp;This is probably something that is quite easy for those that work in this space but how do you convert/project a geography coordinate based polygon definition like:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="border: 0px;"&gt;POLYGON ((-8 48.83305556, -2 50, -0.25 50, 1.466666667 50.66666667, 1.466666667 51, 2 51.11638889, 2 51.5, 5 55, -5.5 55, -5.5 52.33305556, -8 51, -8 48.83305556))

&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;to a geometry polygon definition using the ESRI BigData API's?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;john.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:50:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geometry-vs-geography/m-p/142496#M5582</guid>
      <dc:creator>JohnEdwards2</dc:creator>
      <dc:date>2021-12-11T07:50:57Z</dc:date>
    </item>
    <item>
      <title>Re: Geometry vs Geography</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geometry-vs-geography/m-p/142497#M5583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you were working in ArcGIS Desktop (ArcMap or Pro), then one option would be the &lt;A href="http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/geodetic-densify.htm"&gt;Geodetic Densify&lt;/A&gt;, but that has always seemed kludgy to me.&amp;nbsp; In terms of native ST_Geometry, I am drawing a blank at the moment, and I haven't worked with Esri's big data APIs.&amp;nbsp; I will have to mull it over some more.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Nov 2016 18:45:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geometry-vs-geography/m-p/142497#M5583</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2016-11-30T18:45:17Z</dc:date>
    </item>
  </channel>
</rss>

