<?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: SDE MSSQL SqlSpatial Geometry Self Intersects problem in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/sde-mssql-sqlspatial-geometry-self-intersects/m-p/131325#M7591</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;SQL-Server isn't handling the geometry right, but the root of the problem is your &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;GML source, which also has a topology bug.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I must admit that I also find the representation errors (two places in, twelve out) &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;disturbing as well -- it looks as though the values have been stored in single precision.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 Dec 2010 14:09:46 GMT</pubDate>
    <dc:creator>VinceAngelo</dc:creator>
    <dc:date>2010-12-30T14:09:46Z</dc:date>
    <item>
      <title>SDE MSSQL SqlSpatial Geometry Self Intersects problem</title>
      <link>https://community.esri.com/t5/data-management-questions/sde-mssql-sqlspatial-geometry-self-intersects/m-p/131319#M7585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have created a SqlGeometry using the Microsoft.SqlServer.Types SqlGeometryBuilder, the geometry IsValid and IsSimple but when trying to view it in ArcMap it wont draw, when trying to export to a non SqlSpatial SDE table it complains that the polygon is self intersecting. The geometry uses srid 27700 (BNG) and is viewable in SQL management Studio, I have tried various methods that are suggested to correct the geometry including MakeValid(), STUnion(STStartPoint()) on the SqlSpatial side but since it is valid and doesnt self intersect then it doesnt fix the issue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help is appreciated, Geometry details below&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;chris&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Geometry as Text...(after trying MakeValid()/StUnion(STStartPoint))&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;POLYGON ((531405.73999977112 104148.89000034332, 531414.71999979019 104179.65999984741, 531407.15999984741 104182.27999973297, 531406.94000005722 104182.35000038147, 531404.44000005722 104177.02000045776, 531401.59000015259 104168.47000026703, 531401.59999990463 104168.5, 531401.48999977112 104168.19999980927, 531395.61999988556 104152.19999980927, 531405.73999977112 104148.89000034332))&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Geometry as Gml...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;lt;Polygon xmlns="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.opengis.net/gml" rel="nofollow" target="_blank"&gt;http://www.opengis.net/gml&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;exterior&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;LinearRing&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;posList&amp;gt;531405.73999977112 104148.89000034332 531414.71999979019 104179.65999984741 531407.15999984741 104182.27999973297 531406.94000005722 104182.35000038147 531404.44000005722 104177.02000045776 531401.59000015259 104168.47000026703 531401.59999990463 104168.5 531401.48999977112 104168.19999980927 531395.61999988556 104152.19999980927 531405.73999977112 104148.89000034332&amp;lt;/posList&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/LinearRing&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;/exterior&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/Polygon&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Original gml entry from file I am importing...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;gml:Polygon srsName='osgb:BNG'&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;gml:outerBoundaryIs&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;gml:LinearRing&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;gml:coordinates&amp;gt;531406.94,104182.35 531404.44,104177.02 531401.59,104168.47 531401.60,104168.50 531401.49,104168.20 531395.62,104152.20 531405.74,104148.89 531414.72,104179.66 531407.16,104182.28 531406.94,104182.35&amp;lt;/gml:coordinates&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/gml:LinearRing&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/gml:outerBoundaryIs&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/gml:Polygon&amp;gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Dec 2010 08:13:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sde-mssql-sqlspatial-geometry-self-intersects/m-p/131319#M7585</guid>
      <dc:creator>ChrisSmith</dc:creator>
      <dc:date>2010-12-30T08:13:29Z</dc:date>
    </item>
    <item>
      <title>Re: SDE MSSQL SqlSpatial Geometry Self Intersects problem</title>
      <link>https://community.esri.com/t5/data-management-questions/sde-mssql-sqlspatial-geometry-self-intersects/m-p/131320#M7586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I should add that this table is registered with SDE and if I delete this polygon then all my other polygons in the same layer can display without problem in ArcMap.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Dec 2010 08:15:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sde-mssql-sqlspatial-geometry-self-intersects/m-p/131320#M7586</guid>
      <dc:creator>ChrisSmith</dc:creator>
      <dc:date>2010-12-30T08:15:24Z</dc:date>
    </item>
    <item>
      <title>Re: SDE MSSQL SqlSpatial Geometry Self Intersects problem</title>
      <link>https://community.esri.com/t5/data-management-questions/sde-mssql-sqlspatial-geometry-self-intersects/m-p/131321#M7587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I made a line out of polygon shell, and generated a shapefile from it, then inspected&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;the line.&amp;nbsp; That shape does self-intersect, in the vicinity of 531401.6,104168.5.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Dec 2010 11:00:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sde-mssql-sqlspatial-geometry-self-intersects/m-p/131321#M7587</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2010-12-30T11:00:10Z</dc:date>
    </item>
    <item>
      <title>Re: SDE MSSQL SqlSpatial Geometry Self Intersects problem</title>
      <link>https://community.esri.com/t5/data-management-questions/sde-mssql-sqlspatial-geometry-self-intersects/m-p/131322#M7588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Vince &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the post&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I posted the same on the SqlSpatial forums and Tanoshimi points out it doesn't self intersect,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;so have drawn it on a piece of squared paper and it doesn't appear to self intersect.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I also tried the same process as you have done i.e. created a polyline from the points loaded as an XY Event layer and it doesn't look like it crosses to me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Appreciate the help and I will have another look at it and see if I find anything different.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The post on the SqlSpatial forum if your interested &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://social.msdn.microsoft.com/Forums/en-US/sqlspatial/thread/d844071c-68b6-4ce8-bbda-05f19ac4b9e0"&gt;http://social.msdn.microsoft.com/Forums/en-US/sqlspatial/thread/d844071c-68b6-4ce8-bbda-05f19ac4b9e0&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;chris&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Dec 2010 11:14:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sde-mssql-sqlspatial-geometry-self-intersects/m-p/131322#M7588</guid>
      <dc:creator>ChrisSmith</dc:creator>
      <dc:date>2010-12-30T11:14:46Z</dc:date>
    </item>
    <item>
      <title>Re: SDE MSSQL SqlSpatial Geometry Self Intersects problem</title>
      <link>https://community.esri.com/t5/data-management-questions/sde-mssql-sqlspatial-geometry-self-intersects/m-p/131323#M7589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The ArcSDE topology engine is quite mature. It uses Clementini's topology rules, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;which includes the definition of a simple line. All polygon rings must adhere to &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;simple line restrictions, and this line overlaps itself (linear intersection, not point).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;C:\&amp;gt;sdequery -l testshape2,shape -F1 SM_II:line:531404.44,104177.02,531401.59,104168.47 -v
ArcSDE 9.3 Generic Query Tool&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thu Dec 30 08:53:42 2010
------------------------------------------------------------------------
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objectid: 5
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; shape: Line shape (1 part, 2 vertices)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp; 531404.440000, 104177.020000
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp; 531401.590000, 104168.470000
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objectid: 6
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; shape: Line shape (1 part, 2 vertices)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp; 531401.590000, 104168.470000
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp; 531401.600000, 104168.500000
2 rows found in 31.00 ms
 
C:\&amp;gt;sdequery -l testshape2,shape -F1 SM_II:line:531401.59,104168.47,531401.60,104168.50 -v
ArcSDE 9.3 Generic Query Tool&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thu Dec 30 08:53:42 2010
------------------------------------------------------------------------
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objectid: 5
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; shape: Line shape (1 part, 2 vertices)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp; 531404.440000, 104177.020000
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp; 531401.590000, 104168.470000
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objectid: 6
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; shape: Line shape (1 part, 2 vertices)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp; 531401.590000, 104168.470000
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp; 531401.600000, 104168.500000
2 rows found in 47.00 ms
&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If you do the math, you'll see that segments 5 &amp;amp; 6 have reciprocal slopes;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;since they share a vertex, they overlap.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In order for vertex #6 to be included, several points would need to be added,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;including a point to make a polygon of the deformed interior polygon ring, a &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;vertex for the interior ring to touch, and vertices to open and close the interior&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ring.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:22:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sde-mssql-sqlspatial-geometry-self-intersects/m-p/131323#M7589</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2021-12-11T07:22:49Z</dc:date>
    </item>
    <item>
      <title>Re: SDE MSSQL SqlSpatial Geometry Self Intersects problem</title>
      <link>https://community.esri.com/t5/data-management-questions/sde-mssql-sqlspatial-geometry-self-intersects/m-p/131324#M7590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Vince&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the help, will post your response back to the SqlSpatial forum, see what reply I get there.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;cheers&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;chris&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Dec 2010 13:21:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sde-mssql-sqlspatial-geometry-self-intersects/m-p/131324#M7590</guid>
      <dc:creator>ChrisSmith</dc:creator>
      <dc:date>2010-12-30T13:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: SDE MSSQL SqlSpatial Geometry Self Intersects problem</title>
      <link>https://community.esri.com/t5/data-management-questions/sde-mssql-sqlspatial-geometry-self-intersects/m-p/131325#M7591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;SQL-Server isn't handling the geometry right, but the root of the problem is your &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;GML source, which also has a topology bug.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I must admit that I also find the representation errors (two places in, twelve out) &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;disturbing as well -- it looks as though the values have been stored in single precision.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Dec 2010 14:09:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sde-mssql-sqlspatial-geometry-self-intersects/m-p/131325#M7591</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2010-12-30T14:09:46Z</dc:date>
    </item>
    <item>
      <title>Re: SDE MSSQL SqlSpatial Geometry Self Intersects problem</title>
      <link>https://community.esri.com/t5/data-management-questions/sde-mssql-sqlspatial-geometry-self-intersects/m-p/131326#M7592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Vince&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there any way of checking geometries to see if they are considered valid, the loaded dataset will have millions of records. If I remember correctly there was such an app called Checkgeometries that could be used to find invalid geometries in Oracle Spatial.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;chris&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Dec 2010 19:09:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sde-mssql-sqlspatial-geometry-self-intersects/m-p/131326#M7592</guid>
      <dc:creator>ChrisSmith</dc:creator>
      <dc:date>2010-12-30T19:09:22Z</dc:date>
    </item>
    <item>
      <title>Re: SDE MSSQL SqlSpatial Geometry Self Intersects problem</title>
      <link>https://community.esri.com/t5/data-management-questions/sde-mssql-sqlspatial-geometry-self-intersects/m-p/131327#M7593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;'sdelayer -o feature_info -r invalid' should scan a table for invalid shapes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Dec 2010 20:04:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sde-mssql-sqlspatial-geometry-self-intersects/m-p/131327#M7593</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2010-12-30T20:04:00Z</dc:date>
    </item>
    <item>
      <title>Re: SDE MSSQL SqlSpatial Geometry Self Intersects problem</title>
      <link>https://community.esri.com/t5/data-management-questions/sde-mssql-sqlspatial-geometry-self-intersects/m-p/131328#M7594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;unfortunately the cmd ends when it hits the first self intersecting feature, it reports the following..&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Total rows examined:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 99460&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Total invalid shapes:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Error: Linestring or poly boundary is self-intersecting (-155).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Error: Error in fetching row.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have examined the features with fids of 99459,99460,99461,99462 but they all are simple polygons definitely not self intersecting so they appear to be fine, so not sure what order the data is examined in.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Interestingly I have located another dodgy geometry, this time the interior ring is self intersecting, gml below if you are interested...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;lt;Polygon xmlns="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.opengis.net/gml" rel="nofollow" target="_blank"&gt;http://www.opengis.net/gml&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;exterior&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;LinearRing&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;posList&amp;gt;529785.17001342773 180867.58999633789 529850.04000854492 180907.64001464844 529827.799987793 180940.95001220703 529767.10000610352 180902.35998535156 529785.17001342773 180867.58999633789&amp;lt;/posList&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/LinearRing&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;/exterior&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;interior&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;LinearRing&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;posList&amp;gt;529786.55999755859 180893.41000366211 529790.07778930664 180895.52319335938 529786.32998657227 180902.80999755859 529807.55999755859 180915.42001342773 529811.73001098633 180908.5299987793 529786.55999755859 180893.41000366211&amp;lt;/posList&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/LinearRing&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;/interior&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/Polygon&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any other suggestions on how to detect these problem geometries? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;chris&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Dec 2010 08:00:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sde-mssql-sqlspatial-geometry-self-intersects/m-p/131328#M7594</guid>
      <dc:creator>ChrisSmith</dc:creator>
      <dc:date>2010-12-31T08:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: SDE MSSQL SqlSpatial Geometry Self Intersects problem</title>
      <link>https://community.esri.com/t5/data-management-questions/sde-mssql-sqlspatial-geometry-self-intersects/m-p/131329#M7595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have loaded the geometry with the problem interior ring into a shapefile, it is clearly self intersecting when viewed in arcmap.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;points from geometry in shapefile....&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Part 0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;529785.170 180867.590&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;529767.100 180902.360&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;529827.800 180940.950&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;529850.040 180907.640&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;529786.560 180868.450&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;529786.560 180868.450&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Part 1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;529786.560 180893.410&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;529811.730 180908.530&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;529807.560 180915.420&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;529786.330 180902.810&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;529790.100 180895.480&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; I then export the feature into sde and the process adds extra points I assume to fix the self intersecting issue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The exported geometry is viewable in arcmap but if you look at point 1 &amp;amp; 4 they have the same values; is this not considered self intersecting?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;points for geometry in sde...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Part 0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;529785.170 180867.590&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;529767.100 180902.360&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;529827.800 180940.950&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;529850.040 180907.640&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;529786.560 180868.450&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Part 1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;529786.330 180902.810&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;529790.078 180895.523&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;529786.560 180893.410&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;529790.100 180895.480&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;529790.078 180895.523&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;529811.730 180908.530&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;529807.560 180915.420&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;cheers&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;chris&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Dec 2010 09:35:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sde-mssql-sqlspatial-geometry-self-intersects/m-p/131329#M7595</guid>
      <dc:creator>ChrisSmith</dc:creator>
      <dc:date>2010-12-31T09:35:05Z</dc:date>
    </item>
    <item>
      <title>Re: SDE MSSQL SqlSpatial Geometry Self Intersects problem</title>
      <link>https://community.esri.com/t5/data-management-questions/sde-mssql-sqlspatial-geometry-self-intersects/m-p/131330#M7596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The SE_shape_generate_polygon is reasonably adaptive. In this case, if you add the &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;missing closing vertex to the array, the API will nominate the ring that begins and&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ends at 529790.078,180895.523 as a subpart (hole), then complete the primary ring.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Having determined that the subpart is not within its original parent, it is then promoted&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;to an independent part. Parts and subparts are permitted to touch at a single point &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(but not share boundaries or area). The API will also demote rings which *are* within&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;other parts, making them subparts.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I was the course author for the (now retired) "Accessing SDE with 'C'" 3-day training&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;class. We spent the second half of the first day on Clemetini topology and relationships.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;There was exercise code which permitted generation and comparison of shapes from&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;command-line arguments. Those exercises are gone, but the core parsing functions&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;live on, exposed in the &lt;/SPAN&gt;&lt;A href="ftp://ftp.esri.com/pub/staff/vangelo/se_toolkit/index.html"&gt;se_toolkit&lt;/A&gt;&lt;SPAN&gt; DAT module, which is how I was able to assemble &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;and test your geometry.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Dec 2010 11:16:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sde-mssql-sqlspatial-geometry-self-intersects/m-p/131330#M7596</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2010-12-31T11:16:26Z</dc:date>
    </item>
    <item>
      <title>Re: SDE MSSQL SqlSpatial Geometry Self Intersects problem</title>
      <link>https://community.esri.com/t5/data-management-questions/sde-mssql-sqlspatial-geometry-self-intersects/m-p/131331#M7597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Vince&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Once again thanks for the help!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I look forward to resurrecting my C-Api skills, been about 5 years but should be fun &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you still have the course notes that accompanied the exercises in particular the Clementini Topolgy section - or have a pointer to some reading material available on the web?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Happy New Year to you&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;chris&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Dec 2010 12:37:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sde-mssql-sqlspatial-geometry-self-intersects/m-p/131331#M7597</guid>
      <dc:creator>ChrisSmith</dc:creator>
      <dc:date>2010-12-31T12:37:03Z</dc:date>
    </item>
    <item>
      <title>Re: SDE MSSQL SqlSpatial Geometry Self Intersects problem</title>
      <link>https://community.esri.com/t5/data-management-questions/sde-mssql-sqlspatial-geometry-self-intersects/m-p/131332#M7598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I can't give away even old training materials (mostly bullet lists on which the instructor&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;needed to expound, anyway). All the concepts are available in the documentation, or&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;in User Conference proceeedings (1997 and/or 1998 -- I *did* say this was mature &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;technology, right?)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;BTW: The original "Clementini" paper, which I'll often go back to, is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family:Verdana;"&gt;E. Clementini, P. Di Felice, and P. van Oosterom, "A Small Set of Formal Topological Relationships Suitable for End-User Interaction," in &lt;SPAN style="font-style:italic;"&gt;Advances in Spatial Databases - Third International Symposium, SSD '93&lt;/SPAN&gt;. vol. 692, D. Abel and B. C. Ooi, Eds. Berlin: Springer-Verlag, 1993, pp. 277-295.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Dec 2010 13:10:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sde-mssql-sqlspatial-geometry-self-intersects/m-p/131332#M7598</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2010-12-31T13:10:00Z</dc:date>
    </item>
    <item>
      <title>Re: SDE MSSQL SqlSpatial Geometry Self Intersects problem</title>
      <link>https://community.esri.com/t5/data-management-questions/sde-mssql-sqlspatial-geometry-self-intersects/m-p/131333#M7599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Vince -&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the SQL Server Spatial world, this geometry does not self-intersect.&amp;nbsp; Michael Kallay of the SQL Server Spatial development team has posted an explanation on this issue to the SQL Server Spatial Forum (&lt;/SPAN&gt;&lt;A href="http://social.msdn.microsoft.com/Forums/en-US/sqlspatial/thread/d844071c-68b6-4ce8-bbda-05f19ac4b9e0/"&gt;http://social.msdn.microsoft.com/Forums/en-US/sqlspatial/thread/d844071c-68b6-4ce8-bbda-05f19ac4b9e0/&lt;/A&gt;&lt;SPAN&gt;).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is what the geometry looks like around Point 7, the suspected self-intersecting point, using SQL Server and the FME Universal Viewer:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;IMG src="http://www.katibah.com/spatial/Polygon_Issue.jpg" /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I will work with the the SDE engineering team to look at how SQL Server Spatial and ArcGIS can more gracefully handle these kinds of situations.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- Ed Katibah&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;SQL Server Spatial&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jan 2011 21:53:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sde-mssql-sqlspatial-geometry-self-intersects/m-p/131333#M7599</guid>
      <dc:creator>EdKatibah</dc:creator>
      <dc:date>2011-01-04T21:53:15Z</dc:date>
    </item>
    <item>
      <title>Re: SDE MSSQL SqlSpatial Geometry Self Intersects problem</title>
      <link>https://community.esri.com/t5/data-management-questions/sde-mssql-sqlspatial-geometry-self-intersects/m-p/131334#M7600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The principal problem with using arbitrary precision with real-world coordinate data&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;is the implicit assertion of accuracy not present at input. The orginal data was &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;collected at centimeter scale. Varying the locations by a few hundred nanometers &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;can change topology, but if it does, then it becomes a data quality issue -- *should*&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;we trust spatial data for which the Heisenberg uncertainty principle applies?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;There are a number of ways to process this data to remove the problematic vertices.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The simplest to code would be to perform angle calculation over three coordinate&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;sets -- vertices that belong in a shape at that scale would not bend the line by more &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;than 165 degrees (+/-) -- Whether this line bends by 180 degrees or 179.999999&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;degrees wouldn't matter in this sort of algorithm, just that you remove the vertex&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;that produces the shortest segment. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;A more robust processing step would be to apply a full Douglas-Peucker generalization &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;to the polygon ring as a line, with a tolerance distance of, say, 1/20th the diagonal&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;of the bounding box (or just a fixed value, like 0.5 meters), then attempt to cast &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;the rings back into a polygon.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a tool that may be able to do this sort of processing (in a timely fashion with&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;millions of rows), but I'd have to play with an ASCII dump of the well-known polygon&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;text to figure out if this was a 20-minute hack or something more involved.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jan 2011 02:51:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sde-mssql-sqlspatial-geometry-self-intersects/m-p/131334#M7600</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2011-01-05T02:51:55Z</dc:date>
    </item>
    <item>
      <title>Re: SDE MSSQL SqlSpatial Geometry Self Intersects problem</title>
      <link>https://community.esri.com/t5/data-management-questions/sde-mssql-sqlspatial-geometry-self-intersects/m-p/131335#M7601</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The last post suggests that the MS SQL Server exact computation is akin to splitting hair, and the ESRI computation with a margin of error is better in practice.&amp;nbsp; Although the suggested margins (165 degrees or .5m or 1/20 of the bounding rectangle's diagonal) are much too broad for my liking, it may be a valid choice, but it is not necessarily better.&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG&gt;Computations with margins cannot be done in a fully consistent way, and therefore cannot be made fully robust.&lt;/STRONG&gt;&lt;SPAN&gt; The problem is articulated at &lt;/SPAN&gt;&lt;A href="http://people.csail.mit.edu/seth/pubs/taskforce/section3_10.html"&gt;http://people.csail.mit.edu/seth/pubs/taskforce/section3_10.html&lt;/A&gt;&lt;SPAN&gt;.&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG&gt;The only known way to achieve full robustness is by using exact arithmetic.&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp; Since we at MS consider robustness paramount, we chose the (more sophisticated and more difficult) exact arithmetic approach, and we are very proud of its clean and fast implementation.&amp;nbsp; Moreover, in our next relase (already available in a preview version) we have increased the resolution (of the integer space in which we perform our exact computations) from 27 to 48 bits of accuracy.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Michael Kallay, SQL Server spatial team&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jan 2011 16:15:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sde-mssql-sqlspatial-geometry-self-intersects/m-p/131335#M7601</guid>
      <dc:creator>MichaelKallay</dc:creator>
      <dc:date>2011-01-05T16:15:14Z</dc:date>
    </item>
    <item>
      <title>Re: SDE MSSQL SqlSpatial Geometry Self Intersects problem</title>
      <link>https://community.esri.com/t5/data-management-questions/sde-mssql-sqlspatial-geometry-self-intersects/m-p/131336#M7602</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;ArcSDE has been using exact arithmetic for geometry computation since the technology &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;was aquired in 1995.&amp;nbsp; What is now known as BASIC precision uses 31 bits; HIGH precision&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(released with 9.0, and made default since 9.2) uses 64-bit integers (but is 53-bit, due to &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;double precision mantissa size).&amp;nbsp; The system is very flexible for the different data units found&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;in international databases; the default values chosen by ArcGIS are optimized by coordinate&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;system (projection) for preservation of real-world spatial data to millimeter precision (which&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;is roughly one hundred times the accuracy of most of the spatial datasets I've ever used.) . &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The distance parameter in Douglas-Peucker doesn't correspond to precision, but to deflection;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;value selection is data dependent (and, to some degree, more art than science).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jan 2011 20:47:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sde-mssql-sqlspatial-geometry-self-intersects/m-p/131336#M7602</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2011-01-05T20:47:01Z</dc:date>
    </item>
    <item>
      <title>Re: SDE MSSQL SqlSpatial Geometry Self Intersects problem</title>
      <link>https://community.esri.com/t5/data-management-questions/sde-mssql-sqlspatial-geometry-self-intersects/m-p/131337#M7603</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Vince&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Have been away for a week and it appears I have missed quite a bit!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyway what I need to be able to do is have a reasonably fast process to scan through 20+ million features to find out which are considered invalid by ESRI software.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Are you able to point me in the right direction? A function I can include in my code, an external library to reference or an executable I can run to select the problem geometries out would be desirable.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;cheers&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;chris&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jan 2011 12:24:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sde-mssql-sqlspatial-geometry-self-intersects/m-p/131337#M7603</guid>
      <dc:creator>ChrisSmith</dc:creator>
      <dc:date>2011-01-10T12:24:30Z</dc:date>
    </item>
    <item>
      <title>Re: SDE MSSQL SqlSpatial Geometry Self Intersects problem</title>
      <link>https://community.esri.com/t5/data-management-questions/sde-mssql-sqlspatial-geometry-self-intersects/m-p/131338#M7604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It looks like the 'sdelayer -o feature_info' capability isn't functional for SQL-Server.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What does 'sdelayer -o describe_long' report for the coordinate reference on your layer?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What command did you use to register the layer?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I prototyped a workaround, but it's not going to be pretty. You'll need a copy of &lt;/SPAN&gt;&lt;A href="ftp://ftp.esri.com/pub/staff/vangelo/se_toolkit/index.html"&gt;se_toolkit&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;for the 'sdequery' and 'ascinfo' utilities, and you'll need to create a view of the layer that&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;dumps the well-known text of the geometries as either string (if it will fit in varchar(8000))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;or text. Then you can query the registered rowid column and WKT with 'sdequery', and &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;pipe it through 'ascinfo' to reject the rows that fail SE_shape_generate_from_text, producing&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;an ASCII file with ID and problematic well-known text. If you want to go this route, it would&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;probably be easier to take this offline.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Unfortunately, I didn't have time to whip up some data massage classes to automate removal&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;of spurious jagged lines in geometry.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jan 2011 13:40:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sde-mssql-sqlspatial-geometry-self-intersects/m-p/131338#M7604</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2011-01-10T13:40:04Z</dc:date>
    </item>
  </channel>
</rss>

