<?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: RuntimeError: Spatial index grid is too small in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/runtimeerror-spatial-index-grid-is-too-small/m-p/640817#M49936</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If your points are in decimal degrees&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: arial,helvetica,'helvetica neue',verdana,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;arcpy.Point(latitude, longitude)&lt;/SPAN&gt; is wrong&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: arial,helvetica,'helvetica neue',verdana,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;arcpy.Point(longitude, latitude) is right&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and they could be defined as a GCS_WGS_1984.&amp;nbsp; Which is way better than not defining the coordinate system.&lt;/P&gt;&lt;P&gt;Sadly web-stuff uses that web-Mercator which mean that you had better make sure that if you are getting numbers not in the range -180 to 180 for longitude then they may be in web Mercator and you should define the coordinates as such.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 May 2018 22:42:18 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2018-05-25T22:42:18Z</dc:date>
    <item>
      <title>RuntimeError: Spatial index grid is too small</title>
      <link>https://community.esri.com/t5/python-questions/runtimeerror-spatial-index-grid-is-too-small/m-p/640814#M49933</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When adding features to a feature class using arcpy, two of my features (same class) give me the error in the title.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Everything I've read says to use ArcCatalog to delete the spatial index for the feature class, but before I do that I want to make sure that is safe to do. The database I am working with is a Microsoft SQL Server database and uses some form of compressed binary to store the geography. Apparently, the way it is set up means I have to delete the spatial index rather than recalculate (which would seem safer than deleting!)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I delete the spatial index and re-create it, is there anything that may become broken? Is there any harm in doing this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT:&lt;/P&gt;&lt;P&gt;&lt;A href="https://support.esri.com/en/technical-article/000002875"&gt;This is the ESRI article in question&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT2:&lt;/P&gt;&lt;P&gt;Also, if I do delete and recreate a spatial index, how do I know my existing index parameters (as referenced in link above) and the new ones I should use?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2018 20:58:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/runtimeerror-spatial-index-grid-is-too-small/m-p/640814#M49933</guid>
      <dc:creator>MatthewSanders1</dc:creator>
      <dc:date>2018-05-25T20:58:53Z</dc:date>
    </item>
    <item>
      <title>Re: RuntimeError: Spatial index grid is too small</title>
      <link>https://community.esri.com/t5/python-questions/runtimeerror-spatial-index-grid-is-too-small/m-p/640815#M49934</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The example they give is more interesting than the workaround.&amp;nbsp; The root seems to be an issue with differences in projections/coordinate systems.&amp;nbsp; Perhaps a projection to the required coordinate system may remove the error&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2018 21:20:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/runtimeerror-spatial-index-grid-is-too-small/m-p/640815#M49934</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-05-25T21:20:59Z</dc:date>
    </item>
    <item>
      <title>Re: RuntimeError: Spatial index grid is too small</title>
      <link>https://community.esri.com/t5/python-questions/runtimeerror-spatial-index-grid-is-too-small/m-p/640816#M49935</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply! That seems like a good place to start looking. I am still new to arcpy/GIS in general and don't know much about working with spatial references.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm reading coordinates from one GIS(ish) system that uses &lt;A href="https://en.wikipedia.org/wiki/Web_Mercator"&gt;Web Mercator (EPSG:3857)&lt;/A&gt;,&amp;nbsp;using those coordinate pairs to create points (arcpy.Point(latitude, longitude)), creating an array of those Points, then using that array to create a Polyline&amp;nbsp;(arcpy.Polyline), and then using arcpy.da.InsertCursor to insert the polyline into the ArcGIS database. I read somewhere that in order to do high precision geometry, the polyline needs a spatial reference, so I've been using a blank one:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;poly = arcpy.Polyline(point_array, arcpy.SpatialReference())&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which has worked every time so far.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ArcGIS feature class uses GCS_WGS_1984. Should I be specifying anywhere that I am using coordinates from 3857? How should I go about doing this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2018 22:34:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/runtimeerror-spatial-index-grid-is-too-small/m-p/640816#M49935</guid>
      <dc:creator>MatthewSanders1</dc:creator>
      <dc:date>2018-05-25T22:34:10Z</dc:date>
    </item>
    <item>
      <title>Re: RuntimeError: Spatial index grid is too small</title>
      <link>https://community.esri.com/t5/python-questions/runtimeerror-spatial-index-grid-is-too-small/m-p/640817#M49936</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If your points are in decimal degrees&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: arial,helvetica,'helvetica neue',verdana,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;arcpy.Point(latitude, longitude)&lt;/SPAN&gt; is wrong&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: arial,helvetica,'helvetica neue',verdana,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;arcpy.Point(longitude, latitude) is right&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and they could be defined as a GCS_WGS_1984.&amp;nbsp; Which is way better than not defining the coordinate system.&lt;/P&gt;&lt;P&gt;Sadly web-stuff uses that web-Mercator which mean that you had better make sure that if you are getting numbers not in the range -180 to 180 for longitude then they may be in web Mercator and you should define the coordinates as such.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2018 22:42:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/runtimeerror-spatial-index-grid-is-too-small/m-p/640817#M49936</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-05-25T22:42:18Z</dc:date>
    </item>
    <item>
      <title>Re: RuntimeError: Spatial index grid is too small</title>
      <link>https://community.esri.com/t5/python-questions/runtimeerror-spatial-index-grid-is-too-small/m-p/640818#M49937</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the correction. I was doing arcpy.Point(longitude, latitude) correctly, I just misspoke.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just tried using web-Mercator as the spatial reference and the error went away. I am now doing&lt;/P&gt;&lt;P&gt;arcpy.Polyline(point_array, arcpy.SpatialReference(3857))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does that seem&amp;nbsp;like the correct solution?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2018 22:48:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/runtimeerror-spatial-index-grid-is-too-small/m-p/640818#M49937</guid>
      <dc:creator>MatthewSanders1</dc:creator>
      <dc:date>2018-05-25T22:48:35Z</dc:date>
    </item>
    <item>
      <title>Re: RuntimeError: Spatial index grid is too small</title>
      <link>https://community.esri.com/t5/python-questions/runtimeerror-spatial-index-grid-is-too-small/m-p/640819#M49938</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;3857 is web Mercator not decimal degrees.. you would need big numbers to define the coordinate system as such&lt;/P&gt;&lt;P&gt;4326 is GCS WGS-84&amp;nbsp;&lt;A href="http://spatialreference.org/ref/epsg/wgs-84/"&gt;http://spatialreference.org/ref/epsg/wgs-84/&lt;/A&gt;&amp;nbsp; Note that the bounds are in decimal degrees.&lt;/P&gt;&lt;P&gt;So in short... you have to define them as 'what they are' and not 'what you want them to be'&lt;/P&gt;&lt;P&gt;If your coordinates are in decimal degrees, then define them with wgs84, then use the Project tool&lt;/P&gt;&lt;P&gt;&lt;A href="http://pro.arcgis.com/en/pro-app/tool-reference/data-management/project.htm"&gt;http://pro.arcgis.com/en/pro-app/tool-reference/data-management/project.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;or its python/arcpy interface&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2018 23:18:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/runtimeerror-spatial-index-grid-is-too-small/m-p/640819#M49938</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-05-25T23:18:13Z</dc:date>
    </item>
    <item>
      <title>Re: RuntimeError: Spatial index grid is too small</title>
      <link>https://community.esri.com/t5/python-questions/runtimeerror-spatial-index-grid-is-too-small/m-p/640820#M49939</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Turns out you're right! I have some crazy looking lines now. So if I have decimal degrees&amp;nbsp;(40.64577832, -68.655557412) I should use 4326 as my spatial reference?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2018 15:42:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/runtimeerror-spatial-index-grid-is-too-small/m-p/640820#M49939</guid>
      <dc:creator>MatthewSanders1</dc:creator>
      <dc:date>2018-05-29T15:42:00Z</dc:date>
    </item>
    <item>
      <title>Re: RuntimeError: Spatial index grid is too small</title>
      <link>https://community.esri.com/t5/python-questions/runtimeerror-spatial-index-grid-is-too-small/m-p/640821#M49940</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Most likely ... a Geographic Coordinate system&amp;nbsp; aka&amp;nbsp; GCS WGS-1984 aka&amp;nbsp; Longitude/latitude&lt;/P&gt;&lt;P&gt;PS... quit messing with coordinates...&lt;/P&gt;&lt;P&gt;Think X and Y as in a graph &amp;nbsp;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: arial,helvetica,'helvetica neue',verdana,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;(-68.655557412, 40.64577832) Long/lat for the northern hemisphere North America) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;where is this?&amp;nbsp; &lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: arial,helvetica,'helvetica neue',verdana,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;(40.64577832, -68.655557412) &lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: arial,helvetica,'helvetica neue',verdana,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2018 15:47:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/runtimeerror-spatial-index-grid-is-too-small/m-p/640821#M49940</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-05-29T15:47:06Z</dc:date>
    </item>
    <item>
      <title>Re: RuntimeError: Spatial index grid is too small</title>
      <link>https://community.esri.com/t5/python-questions/runtimeerror-spatial-index-grid-is-too-small/m-p/640822#M49941</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I made up those coordinates to look similar to the ones I am working with.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I changed the spatial reference to 4326 as suggested. Now I'm getting the same 'Spatial index grid is too small' error I was getting before. Any thoughts?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit: its worth noting that I am only getting the error on certain rows. Most of them work just fine and have for every test I've run in the last few months.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2018 18:44:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/runtimeerror-spatial-index-grid-is-too-small/m-p/640822#M49941</guid>
      <dc:creator>MatthewSanders1</dc:creator>
      <dc:date>2018-05-29T18:44:40Z</dc:date>
    </item>
    <item>
      <title>Re: RuntimeError: Spatial index grid is too small</title>
      <link>https://community.esri.com/t5/python-questions/runtimeerror-spatial-index-grid-is-too-small/m-p/640823#M49942</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you would have to show the rows.&lt;/P&gt;&lt;P&gt;I would create a new geodatabase and put the file in there, so you have a clean slate from which to work.&lt;/P&gt;&lt;P&gt;Remember Longitude then Latitude&amp;nbsp;&lt;/P&gt;&lt;P&gt;Longitude -180 to +180 degrees&lt;/P&gt;&lt;P&gt;Latitude 90 to -90 degrees&lt;/P&gt;&lt;P&gt;If you are putting stuff in switched, they are not of this earth &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/wink.png" /&gt; except for a limited range&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2018 19:12:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/runtimeerror-spatial-index-grid-is-too-small/m-p/640823#M49942</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-05-29T19:12:13Z</dc:date>
    </item>
  </channel>
</rss>

