<?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>idea Ensure hasSpatialIndex method on Describe object report correctly when data is compressed in Python Ideas</title>
    <link>https://community.esri.com/t5/python-ideas/ensure-hasspatialindex-method-on-describe-object/idi-p/1195276</link>
    <description>&lt;P&gt;So here is a screen shot of the properties of a dataset note it is UNCOMPRESSED and has a SPATIAL INDEX&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="DuncanHornby_2-1658702483793.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/46655i46600B744DC690C5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DuncanHornby_2-1658702483793.png" alt="DuncanHornby_2-1658702483793.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="DuncanHornby_3-1658702506383.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/46656iA91570768CCD2EED/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DuncanHornby_3-1658702506383.png" alt="DuncanHornby_3-1658702506383.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I run the following code in the Python console in ArcPro 3.0 I get the expected results&lt;/P&gt;&lt;LI-CODE lang="python"&gt;desc = arcpy.Describe('centerline_reprojected')
desc.hasSpatialIndex
True&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now... I run the compress file geodatabase tool to compress the dataset, and to prove I did this here are the properties&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="DuncanHornby_4-1658702681840.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/46657i287E9393FF2BDF4F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DuncanHornby_4-1658702681840.png" alt="DuncanHornby_4-1658702681840.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Now if I run the same bit of code I get False&lt;/P&gt;&lt;LI-CODE lang="python"&gt;desc.hasSpatialIndex
False&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Finally if I un-compressed the data it clearly states in the properties that the spatial index exists.&lt;/P&gt;&lt;P&gt;It would good if this method reports the presence of the index correctly. If there is some technical reason why this can't be done the Help file needs updating to explain that it won't report the existence of a spatial index.&lt;/P&gt;</description>
    <pubDate>Sun, 24 Jul 2022 22:48:01 GMT</pubDate>
    <dc:creator>DuncanHornby</dc:creator>
    <dc:date>2022-07-24T22:48:01Z</dc:date>
    <item>
      <title>Ensure hasSpatialIndex method on Describe object report correctly when data is compressed</title>
      <link>https://community.esri.com/t5/python-ideas/ensure-hasspatialindex-method-on-describe-object/idi-p/1195276</link>
      <description>&lt;P&gt;So here is a screen shot of the properties of a dataset note it is UNCOMPRESSED and has a SPATIAL INDEX&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="DuncanHornby_2-1658702483793.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/46655i46600B744DC690C5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DuncanHornby_2-1658702483793.png" alt="DuncanHornby_2-1658702483793.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="DuncanHornby_3-1658702506383.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/46656iA91570768CCD2EED/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DuncanHornby_3-1658702506383.png" alt="DuncanHornby_3-1658702506383.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I run the following code in the Python console in ArcPro 3.0 I get the expected results&lt;/P&gt;&lt;LI-CODE lang="python"&gt;desc = arcpy.Describe('centerline_reprojected')
desc.hasSpatialIndex
True&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now... I run the compress file geodatabase tool to compress the dataset, and to prove I did this here are the properties&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="DuncanHornby_4-1658702681840.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/46657i287E9393FF2BDF4F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DuncanHornby_4-1658702681840.png" alt="DuncanHornby_4-1658702681840.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Now if I run the same bit of code I get False&lt;/P&gt;&lt;LI-CODE lang="python"&gt;desc.hasSpatialIndex
False&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Finally if I un-compressed the data it clearly states in the properties that the spatial index exists.&lt;/P&gt;&lt;P&gt;It would good if this method reports the presence of the index correctly. If there is some technical reason why this can't be done the Help file needs updating to explain that it won't report the existence of a spatial index.&lt;/P&gt;</description>
      <pubDate>Sun, 24 Jul 2022 22:48:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-ideas/ensure-hasspatialindex-method-on-describe-object/idi-p/1195276</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2022-07-24T22:48:01Z</dc:date>
    </item>
    <item>
      <title>Re: Ensure hasSpatialIndex method on Describe object report correctly when data is compressed - Status changed to: Closed</title>
      <link>https://community.esri.com/t5/python-ideas/ensure-hasspatialindex-method-on-describe-object/idc-p/1219337#M147</link>
      <description>&lt;P&gt;Hi Duncan, thank you for your post.&lt;/P&gt;&lt;P&gt;This one is in a bit of a grey area tilting towards reporting a potential bug rather than idea, so it seems Technical Support would be the better avenue for this one. However, we took a look at your concern and confirmed this is not a bug and is working as expected.&lt;/P&gt;&lt;P&gt;When the database is compressed, hasSpatialIndex should return False (as it does). You can also see this on the layer properties dialog.&lt;/P&gt;&lt;P&gt;Here's where it gets confusing: When compressed, the compressed spatial element is indexed, but in a different way, meaning that there is no spatial index on the shape column as you would expect with an uncompressed dataset. This is why hasSpatialIndex returns False as it is looking for a spatial index on the shape column.&amp;nbsp;However, A grid value is maintained through the compress / uncompress process which seeds the regeneration of the original spatial index on the field, yielding "the same" spatial index it had before.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Documentation was updated to add a note for hasSpatialIndex - Compressed datasets do not have a spatial index on the shape column and will return False. Note that you won't be able to see this update until the ArcGIS Pro 3.1 release.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 14:29:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-ideas/ensure-hasspatialindex-method-on-describe-object/idc-p/1219337#M147</guid>
      <dc:creator>HannesZiegler</dc:creator>
      <dc:date>2022-10-06T14:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: Ensure hasSpatialIndex method on Describe object report correctly when data is compressed</title>
      <link>https://community.esri.com/t5/python-ideas/ensure-hasspatialindex-method-on-describe-object/idc-p/1219368#M148</link>
      <description>&lt;P&gt;Hannes,&lt;/P&gt;&lt;P&gt;Thanks for the update and your solution to document this behaviour is welcomed.&lt;/P&gt;&lt;P&gt;Duncan&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 15:07:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-ideas/ensure-hasspatialindex-method-on-describe-object/idc-p/1219368#M148</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2022-10-06T15:07:08Z</dc:date>
    </item>
  </channel>
</rss>

