Select to view content in your preferred language

How to access spatial index grids (and their sizes)

1187
3
12-11-2020 02:45 PM
KirkKuykendall1
Frequent Contributor

With arcobjects I can use IField.GeometryDef.GridSize to retrieve spatial index grid sizes.

How do I do this with the Pro SDK?

Thanks, Kirk

Tags (1)
0 Kudos
3 Replies
RichRuh
Esri Regular Contributor

Hi Kirk,

What workflow are you trying to accomplish?  Right now, you cannot access this information with the Pro SDK or with Python.  The only way to get to it is by exporting the geodatabase schema to XML.  We've also removed it as an input option from geoprocessing.

I don't know much about how to use grid sizes, so any information you could offer would be helpful.

Thanks,

--Rich

0 Kudos
KirkKuykendall1
Frequent Contributor

Hi Rich -

I'd like to avoid spatial index grid size is invalid error when programmatically adding a feature with a too-large envelope to a featureclass with a small grid size. 

I was thinking I would check to see if a feature's envelope is too big before attempting to insert it.  Would one be able to anticipate this error by comparing the feature's envelope with the grid size(s)?

In the past, with arcmap, I've adjusted grid sizes to tune draw and spatial query performance.  Nowadays with SSD's maybe that's not so critical.

Thanks, Kirk

StephenRhea_NV5
Frequent Contributor

I'd appreciate some guidance on avoiding the error as well. Is there access to something like ArcObjects's LoadOnlyMode?