<?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: BUG: Table extents truncated, breaking spatial indexes in File Geodatabase API Questions</title>
    <link>https://community.esri.com/t5/file-geodatabase-api-questions/bug-table-extents-truncated-breaking-spatial/m-p/332371#M558</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;BLOCKQUOTE class="jive-quote"&gt;I pre-populate the envelopes of GEOGCS ArcSDE layers with {-180,-90,180,90}, just&lt;BR /&gt;so I don't have to deal with envelope property updates changing the scale at which&lt;BR /&gt;ArcGIS displays.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there an easier way to do that than by creating and removing dummy features? &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Rob &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Jan 2012 00:02:10 GMT</pubDate>
    <dc:creator>RobertCoup</dc:creator>
    <dc:date>2012-01-19T00:02:10Z</dc:date>
    <item>
      <title>BUG: Table extents truncated, breaking spatial indexes</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/bug-table-extents-truncated-breaking-spatial/m-p/332367#M554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;When adding features via the FGDB API (v1.1, Linux 64bit), table extents are not calculated correctly. The envelope returned has each value truncated to the nearest integer value, but returned as a double.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;From the attached sample code, which creates a FileGDB and populates it:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
Inserted point 0 (x10000): 172.875856, -34.317553
Inserted point 1 (x10000): 173.938053, -34.969507
Inserted point 2 (x10000): 174.927365, -35.880395

Table envelope: xMin=172.000000 yMin=-35.000000 xMax=174.000000 yMax=-34.000000
Calculated envelope: xMin=172.875856 yMin=-35.880395 xMax=174.927365 yMax=-34.317553
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This causes problems when a spatial index is calculated - if a feature falls outside the truncated extent values (ie. Point 2 above) it will not draw in ArcMap unless at least some of the truncated extent is visible. ie. zoom right in and the feature will disappear - zoom-to-layer or further out and it'll likely draw. To show all the points, you can delete the spatial index (in either ArcMap or via the FGDB API) but obviously this makes the layer painfully slow. Recalculating the spatial index in ArcMap, or deleting &amp;amp; recreating the index in ArcMap breaks it again. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note that spatial indexes won't necessarily be calculated by the API if there aren't very many features - this is why the attached sample adds each of the points 10,000x. Even on a very small layer which has no calculated spatial index on the result from the FGDB API - if you recalculate the spatial index in ArcMap it will break the layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The issue is obvious on geographic coordinate systems (since entire layers may easily fit into a 1 degree square, and they just disappear) but happens on projected coordinate systems too, though users are unlikely to see it in ArcMap. It also occurs for Polygon/Line layers.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This problem seems to have been identified in: &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/45187-Problems-displaying-feature-classes-created-via-API-in-ArcMap" rel="nofollow noopener noreferrer" target="_blank"&gt;http://forums.arcgis.com/threads/45187-Problems-displaying-feature-classes-created-via-API-in-ArcMap&lt;/A&gt;&lt;SPAN&gt; but never resolved.&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;Rob &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 15:44:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/bug-table-extents-truncated-breaking-spatial/m-p/332367#M554</guid>
      <dc:creator>RobertCoup</dc:creator>
      <dc:date>2021-12-11T15:44:35Z</dc:date>
    </item>
    <item>
      <title>Re: BUG: Table extents truncated, breaking spatial indexes</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/bug-table-extents-truncated-breaking-spatial/m-p/332368#M555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This has been entered as NIM077138. We are reviewing this and will post our findings.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We were never able to reproduce &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/451...-API-in-ArcMap"&gt;http://forums.arcgis.com/threads/451...-API-in-ArcMap&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2012 20:28:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/bug-table-extents-truncated-breaking-spatial/m-p/332368#M555</guid>
      <dc:creator>LanceShipman</dc:creator>
      <dc:date>2012-01-18T20:28:38Z</dc:date>
    </item>
    <item>
      <title>Re: BUG: Table extents truncated, breaking spatial indexes</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/bug-table-extents-truncated-breaking-spatial/m-p/332369#M556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;This has been entered as NIM077138. We are reviewing this and will post our findings.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks Lance &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've discovered if you add a point (eg. 179.01, -39.01) then delete it, the extents don't seem to contract again. So I'm guessing we can use that to workaround the bug by adding some dummy features. Though is recalculating the spatial index or something else (eg. changing a lot more features) likely to reset the extent and break it again?&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;Rob &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2012 21:54:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/bug-table-extents-truncated-breaking-spatial/m-p/332369#M556</guid>
      <dc:creator>RobertCoup</dc:creator>
      <dc:date>2012-01-18T21:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: BUG: Table extents truncated, breaking spatial indexes</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/bug-table-extents-truncated-breaking-spatial/m-p/332370#M557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I pre-populate the envelopes of GEOGCS ArcSDE layers with {-180,-90,180,90}, just&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;so I don't have to deal with envelope property updates changing the scale at which&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ArcGIS displays.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2012 22:54:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/bug-table-extents-truncated-breaking-spatial/m-p/332370#M557</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2012-01-18T22:54:06Z</dc:date>
    </item>
    <item>
      <title>Re: BUG: Table extents truncated, breaking spatial indexes</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/bug-table-extents-truncated-breaking-spatial/m-p/332371#M558</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;BLOCKQUOTE class="jive-quote"&gt;I pre-populate the envelopes of GEOGCS ArcSDE layers with {-180,-90,180,90}, just&lt;BR /&gt;so I don't have to deal with envelope property updates changing the scale at which&lt;BR /&gt;ArcGIS displays.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there an easier way to do that than by creating and removing dummy features? &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Rob &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jan 2012 00:02:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/bug-table-extents-truncated-breaking-spatial/m-p/332371#M558</guid>
      <dc:creator>RobertCoup</dc:creator>
      <dc:date>2012-01-19T00:02:10Z</dc:date>
    </item>
    <item>
      <title>Re: BUG: Table extents truncated, breaking spatial indexes</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/bug-table-extents-truncated-breaking-spatial/m-p/332372#M559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I don't generally work with FGDBs, but the table creation XML includes a data envelope property &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(look for "Extent" in the .xsd).&amp;nbsp; You should be able to create featureclasses and featuredatasets&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;with pre-defined extents.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jan 2012 11:52:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/bug-table-extents-truncated-breaking-spatial/m-p/332372#M559</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2012-01-19T11:52:10Z</dc:date>
    </item>
    <item>
      <title>Re: BUG: Table extents truncated, breaking spatial indexes</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/bug-table-extents-truncated-breaking-spatial/m-p/332373#M560</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;BLOCKQUOTE class="jive-quote"&gt;... the table creation XML includes a data envelope property &lt;BR /&gt;(look for "Extent" in the .xsd).&amp;nbsp; You should be able to create featureclasses and featuredatasets&lt;BR /&gt;with pre-defined extents.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Good idea &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; I changed &lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;"&gt;&amp;lt;Extent xsi:nil="true"/&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt; into the following in both the FeatureDataset &amp;amp; FeatureClass definitions:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;lt;Extent xsi:type='esri:EnvelopeN'&amp;gt;
&amp;nbsp; &amp;lt;XMin&amp;gt;-180.0&amp;lt;/XMin&amp;gt;
&amp;nbsp; &amp;lt;YMin&amp;gt;-90.0&amp;lt;/YMin&amp;gt;
&amp;nbsp; &amp;lt;XMax&amp;gt;180.0&amp;lt;/XMax&amp;gt;
&amp;nbsp; &amp;lt;YMax&amp;gt;90.0&amp;lt;/YMax&amp;gt;
&amp;lt;/Extent&amp;gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It's accepted by the FileGDB API okay, but querying the Table via &lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;"&gt;GetEnvelope()&lt;/SPAN&gt;&lt;SPAN&gt; immediately after creation results in &lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;"&gt;NaN&lt;/SPAN&gt;&lt;SPAN&gt;s for each envelope value, and after inserting data I get the (broken) calculated values for the envelope. I also tried adding a SpatialReference definition to the Extent - made no difference. So I guess I haven't specified the envelope correctly, or the FileGDB API is ignoring it?&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;Rob &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 15:44:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/bug-table-extents-truncated-breaking-spatial/m-p/332373#M560</guid>
      <dc:creator>RobertCoup</dc:creator>
      <dc:date>2021-12-11T15:44:38Z</dc:date>
    </item>
  </channel>
</rss>

