<?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: ESRI and Microsoft SQL disagreeing on what is a valid shape in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/esri-and-microsoft-sql-disagreeing-on-what-is-a/m-p/566183#M32115</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;Dan, SQL is using vanilla SQL provided spatial facilities (SQL 2012). I do not know how to check whether it is using float or double (or how to change it).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;If your question relates to the code that is generating the coordinates then this is irrelevant. The fact is that I have a shape that SQL considers valid and ESRI considers invalid&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just read the interchange between Dan and Vince&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Jun 2016 01:02:54 GMT</pubDate>
    <dc:creator>JohnCuthbertson</dc:creator>
    <dc:date>2016-06-20T01:02:54Z</dc:date>
    <item>
      <title>ESRI and Microsoft SQL disagreeing on what is a valid shape</title>
      <link>https://community.esri.com/t5/data-management-questions/esri-and-microsoft-sql-disagreeing-on-what-is-a/m-p/566176#M32108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We are using Microsoft SQL Server 2012 and ESRI 10.2 in a Windows environment, shapes are stored in Geometry format.&lt;/P&gt;&lt;P&gt;We are trying to programmatically add shapes directly to an ESRI Geodatabase (IE via SQL, not ESRI routines).&lt;/P&gt;&lt;P&gt;Some of the shapes have suspect self-intersections and we need to either make them valid, or reject them.&lt;/P&gt;&lt;P&gt;This issue we are having is that raw SQL environment considers the shapes valid, but when they are read by ESRI products some are considered invalid.&lt;/P&gt;&lt;P&gt;This issue seems to be related to the number of decimal places used by SQL versus that used by ESRI.&lt;/P&gt;&lt;P&gt;The attached SQL code demonstrates the issue..&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The initial shape is considered by SQL to be valid, but when inserted into an ESRI layer, ESRI considers it self-intersecting.&lt;/LI&gt;&lt;LI&gt;By reducing the number of decimal places, (7 for Lng and 8 for Lat), we can get ESRI to agree with SQL that the shape is ‘valid’&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;My question is have I detected a solution that is applicable to all cases (IE ESRI and SQL will always both agree on validity or otherwise).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Feedback from anyone with knowledge in this area would be appreciated&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Jun 2016 02:13:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/esri-and-microsoft-sql-disagreeing-on-what-is-a/m-p/566176#M32108</guid>
      <dc:creator>JohnCuthbertson</dc:creator>
      <dc:date>2016-06-19T02:13:35Z</dc:date>
    </item>
    <item>
      <title>Re: ESRI and Microsoft SQL disagreeing on what is a valid shape</title>
      <link>https://community.esri.com/t5/data-management-questions/esri-and-microsoft-sql-disagreeing-on-what-is-a/m-p/566177#M32109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A couple of questions:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;What are the XY Resolution and Tolerance of the feature class you are working with?&lt;/LI&gt;&lt;LI&gt;You appear to be using a geographic (not projected) spatial reference, but you are working with SQL Server's GEOMETRY data type instead of GEOGRAPHY data type.&amp;nbsp; Why not use GEOGRAPHY data type since you are using a geographic spatial reference?&lt;/LI&gt;&lt;/OL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Jun 2016 04:42:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/esri-and-microsoft-sql-disagreeing-on-what-is-a/m-p/566177#M32109</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2016-06-19T04:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: ESRI and Microsoft SQL disagreeing on what is a valid shape</title>
      <link>https://community.esri.com/t5/data-management-questions/esri-and-microsoft-sql-disagreeing-on-what-is-a/m-p/566178#M32110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think part of the problem is the way you are defining the issue.&amp;nbsp; ArcGIS has always allowed users to define the precision at which coordinates are captured.&amp;nbsp; SQL-Server has hard-coded internal limits which have evolved over time, and which are significantly smaller than the precision permitted by Esri.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you wish to reduce the default XY Tolerance of a feature class in an enterprise feature class, all you need to do is&lt;A href="http://gis.stackexchange.com/questions/195920/appending-polygon-feature-classes-with-already-repaired-geometry-warning-0004/195928#195928"&gt; specify it during feature class creation&lt;/A&gt;.&amp;nbsp; Of course, this is more often the &lt;EM&gt;cause&lt;/EM&gt; of geometry corruption issues than it is the solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the end, what Microsoft considers "close enough" isn't good enough for a data model that can process 54 significant bits. If you want to load geometries outside of ArcGIS, you need to be prepared to repair improper geometries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- V&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Jun 2016 20:34:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/esri-and-microsoft-sql-disagreeing-on-what-is-a/m-p/566178#M32110</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2016-06-19T20:34:53Z</dc:date>
    </item>
    <item>
      <title>Re: ESRI and Microsoft SQL disagreeing on what is a valid shape</title>
      <link>https://community.esri.com/t5/data-management-questions/esri-and-microsoft-sql-disagreeing-on-what-is-a/m-p/566179#M32111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;XY Resolution is 0.000000016065314&lt;/P&gt;&lt;P&gt;Tolerance is 0.000000032130629&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Geography vs Geometry question response could fill a book, but I do not think it is relevant to this subject (or is it?)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jun 2016 00:35:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/esri-and-microsoft-sql-disagreeing-on-what-is-a/m-p/566179#M32111</guid>
      <dc:creator>JohnCuthbertson</dc:creator>
      <dc:date>2016-06-20T00:35:00Z</dc:date>
    </item>
    <item>
      <title>Re: ESRI and Microsoft SQL disagreeing on what is a valid shape</title>
      <link>https://community.esri.com/t5/data-management-questions/esri-and-microsoft-sql-disagreeing-on-what-is-a/m-p/566180#M32112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;is sql using float or double?&amp;nbsp; (ie single precision or double precision IEEE 754 spec)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jun 2016 00:40:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/esri-and-microsoft-sql-disagreeing-on-what-is-a/m-p/566180#M32112</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-06-20T00:40:58Z</dc:date>
    </item>
    <item>
      <title>Re: ESRI and Microsoft SQL disagreeing on what is a valid shape</title>
      <link>https://community.esri.com/t5/data-management-questions/esri-and-microsoft-sql-disagreeing-on-what-is-a/m-p/566181#M32113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe they pack the bits themselves, but it's a lot closer to the old BASIC precision limitations of pre-9.2 ArcSDE (and not even the full 31 bits of BASIC in the 2008 R1 implementation).&amp;nbsp; The part that peeves me is the WKT generated has twelve and fourteen digits, even though only the first four to six are stored.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- V&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jun 2016 00:55:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/esri-and-microsoft-sql-disagreeing-on-what-is-a/m-p/566181#M32113</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2016-06-20T00:55:59Z</dc:date>
    </item>
    <item>
      <title>Re: ESRI and Microsoft SQL disagreeing on what is a valid shape</title>
      <link>https://community.esri.com/t5/data-management-questions/esri-and-microsoft-sql-disagreeing-on-what-is-a/m-p/566182#M32114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Vince... It was kind of reminding me of the geometry errors introduced when the spatial reference wasn't specified and the default for geometry calculations went to single precision versus double.&amp;nbsp; I just wanted to rule that out as a possibility, at least for the esri files/queries/calculations.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jun 2016 00:58:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/esri-and-microsoft-sql-disagreeing-on-what-is-a/m-p/566182#M32114</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-06-20T00:58:44Z</dc:date>
    </item>
    <item>
      <title>Re: ESRI and Microsoft SQL disagreeing on what is a valid shape</title>
      <link>https://community.esri.com/t5/data-management-questions/esri-and-microsoft-sql-disagreeing-on-what-is-a/m-p/566183#M32115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;Dan, SQL is using vanilla SQL provided spatial facilities (SQL 2012). I do not know how to check whether it is using float or double (or how to change it).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;If your question relates to the code that is generating the coordinates then this is irrelevant. The fact is that I have a shape that SQL considers valid and ESRI considers invalid&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just read the interchange between Dan and Vince&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jun 2016 01:02:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/esri-and-microsoft-sql-disagreeing-on-what-is-a/m-p/566183#M32115</guid>
      <dc:creator>JohnCuthbertson</dc:creator>
      <dc:date>2016-06-20T01:02:54Z</dc:date>
    </item>
    <item>
      <title>Re: ESRI and Microsoft SQL disagreeing on what is a valid shape</title>
      <link>https://community.esri.com/t5/data-management-questions/esri-and-microsoft-sql-disagreeing-on-what-is-a/m-p/566184#M32116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There's certainly a noise-to-signal issue when the topology is evaluated at a resolution which is coarser than the coordinates are expressed.&amp;nbsp; Data quality is an issue -- I've seen SQL-Server shift coordinates a dozen Angstroms and be happy with the new geometry, where even the insanely precise default coordinate reference found intersection (all for coordinates which were originally recorded at five decimal places).&amp;nbsp; The geometries really need to cleaned with respect to the native data precision (be it decimeter, centimeter, or meter).&amp;nbsp; It's rare that WGS84 data is accurate to under a meter, so thrashing around in sub-millimeter is just a distraction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- V&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jun 2016 01:16:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/esri-and-microsoft-sql-disagreeing-on-what-is-a/m-p/566184#M32116</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2016-06-20T01:16:09Z</dc:date>
    </item>
    <item>
      <title>Re: ESRI and Microsoft SQL disagreeing on what is a valid shape</title>
      <link>https://community.esri.com/t5/data-management-questions/esri-and-microsoft-sql-disagreeing-on-what-is-a/m-p/566185#M32117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Vince, If I understand&amp;nbsp; what you are saying (and what you said in the comments above) then Microsoft Geometry only uses 31 bits to store the individual coordinates, even though WKT may display more. Accordingly, if we are storing ESRI SHAPES using the default storage of GEOMETRY then our precision is limited to 31 bits (does this change if we use GEOGRAPHY?)&amp;nbsp; no matter how we insert the data (using native SQL or ESRI APIs). My question then becomes what is the resultant accuracy (and then what is an appropriate maximum 'XY Tolerance' that reflects this accuracy). I am going away now to experiment with raw SQL Spatial code to verify this understanding.&lt;/P&gt;&lt;P&gt;Please stop me if I am going down the wrong track&lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/silly.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jun 2016 01:38:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/esri-and-microsoft-sql-disagreeing-on-what-is-a/m-p/566185#M32117</guid>
      <dc:creator>JohnCuthbertson</dc:creator>
      <dc:date>2016-06-20T01:38:48Z</dc:date>
    </item>
    <item>
      <title>Re: ESRI and Microsoft SQL disagreeing on what is a valid shape</title>
      <link>https://community.esri.com/t5/data-management-questions/esri-and-microsoft-sql-disagreeing-on-what-is-a/m-p/566186#M32118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM&gt;Older&lt;/EM&gt; Microsoft releases used less than the 31-bits originally used by Esri.&amp;nbsp; I don't think that's the case now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Esri uses encoded long integers (long long -- 64-bits), but since the mantissa of a IEEE double is 52, the effective width is 54.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Accuracy isn't really on the table here.&amp;nbsp; We're just talking about precision.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The whitepaper referenced in my GIS SE answer explains&lt;STRONG&gt; exactly &lt;/STRONG&gt;how Esri coordinate references operate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- V&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jun 2016 02:34:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/esri-and-microsoft-sql-disagreeing-on-what-is-a/m-p/566186#M32118</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2016-06-20T02:34:44Z</dc:date>
    </item>
    <item>
      <title>Re: ESRI and Microsoft SQL disagreeing on what is a valid shape</title>
      <link>https://community.esri.com/t5/data-management-questions/esri-and-microsoft-sql-disagreeing-on-what-is-a/m-p/566187#M32119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry Vince, I am having trouble locating '&lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;The whitepaper referenced in my GIS SE answer'&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jun 2016 03:03:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/esri-and-microsoft-sql-disagreeing-on-what-is-a/m-p/566187#M32119</guid>
      <dc:creator>JohnCuthbertson</dc:creator>
      <dc:date>2016-06-20T03:03:33Z</dc:date>
    </item>
    <item>
      <title>Re: ESRI and Microsoft SQL disagreeing on what is a valid shape</title>
      <link>https://community.esri.com/t5/data-management-questions/esri-and-microsoft-sql-disagreeing-on-what-is-a/m-p/566188#M32120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's linked to in a post above - &lt;A href="http://gis.stackexchange.com/questions/195920/appending-polygon-feature-classes-with-already-repaired-geometry-warning-0004/195928#195928" title="http://gis.stackexchange.com/questions/195920/appending-polygon-feature-classes-with-already-repaired-geometry-warning-0004/195928#195928"&gt;arcgis desktop - Appending polygon feature classes with already repaired geometry =&amp;gt; WARNING 000442: self intersections …&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jun 2016 03:16:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/esri-and-microsoft-sql-disagreeing-on-what-is-a/m-p/566188#M32120</guid>
      <dc:creator>Luke_Pinner</dc:creator>
      <dc:date>2016-06-20T03:16:09Z</dc:date>
    </item>
  </channel>
</rss>

