ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
English
  • English
  • Deutsch
  • Español
  • Français
  • 日本語
  • Русский
  • 简体中文
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions
  • Manage Data
  • Administering geodatabases
  • Using SQL with geodatabases
  • Use ST_Geometry with SQL
  • Spatial indexes
  • Back to Top
  • The ST_Geometry storage type
  • SQL and Esri ST_Geometry
  • SQL implementation differences for the ST_Geometry type
  • Load the SQLite ST_Geometry library
  • Geometry validation
  • Spatial indexes

    • Spatial indexes and ST_Geometry
    • When are spatial indexes used with ST_Geometry?
    • The R-tree index
    • The spatial grid index
    • Guidelines for choosing a spatial index grid size
    • Tips on using a spatial grid index

    Use SQL with existing geodatabase feature classes

    • Enhance ArcGIS functionality using ST_Geometry
    • Spatial SQL queries on tables with an ST_Geometry column
    • Using spatial views on tables with an ST_Geometry column
    • Using SQL with existing feature classes

    Use SQL to create spatial tables

    • Rules for creating spatial tables to be used with ArcGIS
    • Create tables with an ST_Geometry column
    • Register an ST_Geometry column
    • Unregister an ST_Geometry column
    • Create spatial references using SQL
    • Insert features to a table with an ST_Geometry column
    • Create spatial indexes on tables with an ST_Geometry column using SQL
    • Update values in an ST_Geometry spatial column
    • Delete values from an ST_Geometry spatial column
    • Register a table or view with the geodatabase
    • Workflow: Create tables with SQL and register them with the geodatabase

    ST_Geometry function reference

    • SQL functions used with ST_Geometry
    • Constructor functions for ST_Geometry
    • Geometry properties
    • Spatial accessor functions
    • Spatial relationships
    • Spatial relationship functions
    • Spatial operations
    • Spatial operation functions
    • Parametric circles, ellipses, and wedges
    • ST_Aggr_ConvexHull
    • ST_Aggr_Intersection
    • ST_Aggr_Union
    • ST_Area
    • ST_AsBinary
    • ST_AsText
    • ST_Boundary
    • ST_Buffer
    • ST_Centroid
    • ST_Contains
    • ST_ConvexHull
    • ST_CoordDim
    • ST_Crosses
    • ST_Curve
    • ST_Difference
    • ST_Dimension
    • ST_Disjoint
    • ST_Distance
    • ST_DWithin
    • ST_EndPoint
    • ST_Entity
    • ST_Envelope
    • ST_EnvIntersects
    • ST_Equals
    • ST_Equalsrs
    • ST_ExteriorRing
    • ST_GeomCollection
    • ST_GeomCollFromWKB
    • ST_Geometry
    • ST_GeometryN
    • ST_GeometryType
    • ST_GeomFromCollection
    • ST_GeomFromText
    • ST_GeomFromWKB
    • ST_GeoSize
    • ST_InteriorRingN
    • ST_Intersection
    • ST_Intersects
    • ST_Is3d
    • ST_IsClosed
    • ST_IsEmpty
    • ST_IsMeasured
    • ST_IsRing
    • ST_IsSimple
    • ST_Length
    • ST_LineFromText
    • ST_LineFromWKB
    • ST_LineString
    • ST_M
    • ST_MaxM
    • ST_MaxX
    • ST_MaxY
    • ST_MaxZ
    • ST_MinM
    • ST_MinX
    • ST_MinY
    • ST_MinZ
    • ST_MLineFromText
    • ST_MLineFromWKB
    • ST_MPointFromText
    • ST_MPointFromWKB
    • ST_MPolyFromText
    • ST_MPolyFromWKB
    • ST_MultiCurve
    • ST_MultiLineString
    • ST_MultiPoint
    • ST_MultiPolygon
    • ST_MultiSurface
    • ST_NumGeometries
    • ST_NumInteriorRing
    • ST_NumPoints
    • ST_OrderingEquals
    • ST_Overlaps
    • ST_Perimeter
    • ST_Point
    • ST_PointFromText
    • ST_PointFromWKB
    • ST_PointN
    • ST_PointOnSurface
    • ST_PolyFromText
    • ST_PolyFromWKB
    • ST_Polygon
    • ST_Relate
    • ST_SRID
    • ST_StartPoint
    • ST_Surface
    • ST_SymmetricDiff
    • ST_Touches
    • ST_Transform
    • ST_Union
    • ST_Within
    • ST_X
    • ST_Y
    • ST_Z

    Tips on using a spatial grid index

    ArcMap 10.8
    |
    Help archive
    ArcGIS Desktop is in mature support and will be retired March 1, 2026. There are no plans for future releases of ArcGIS Desktop, and it is recommended that you migrate to ArcGIS Pro. See Migrate from ArcMap to ArcGIS Pro for more information.

    The following are tips on using the spatial index grid that is used by Oracle and DB2 on tables containing an ST_Geometry column:

    • Symptoms when a grid size is wrong

      If a grid size is determined to be too large or too small when creating a spatial index in Oracle, the following error occurs:

      CREATE INDEX farm_idx on farm(shape)
      INDEXTYPE is SDE.ST_SPATIAL_INDEX
      PARAMETERS ('st_grids=1000,3000,9000 st_srid=31');
      \
      

      CREATE INDEX farm_idx on farm(shape)
      *
      ERROR at line 1:
      ORA-20006: InValid Grid Size
      ORA-06512: at "SDE.ST_GEOMETRY_SHAPELIB_PKG", line 43
      ORA-06512: at "SDE.ST_POLYGON", line 236

      To identify common issues with Db2 or Informix, see IBM Knowledge Center documentation.

    • Deferring creation of a spatial index after loading data

      Loading or appending data into a spatial table can decrease the total time it takes to complete the load. It also results in less fragmentation of column indexes, which improves query performance. Therefore, it can be useful to defer creating the spatial index until you complete loading your data into the spatial table.

    • Using ST_AsText to display the ST_Geometry contents

      The human-readable well-known text representation is useful when you want to examine the content of individual geometries. Use the ST_AsText function in a SELECT statement to translate the ST_Geometry contents into well-known text for display.

    Related topics

    • The spatial grid index

    ArcGIS Desktop

    • Home
    • Documentation
    • Support

    ArcGIS

    • ArcGIS Online
    • ArcGIS Desktop
    • ArcGIS Enterprise
    • ArcGIS
    • ArcGIS Developer
    • ArcGIS Solutions
    • ArcGIS Marketplace

    About Esri

    • About Us
    • Careers
    • Esri Blog
    • User Conference
    • Developer Summit
    Esri
    Tell us what you think.
    Copyright © 2021 Esri. | Privacy | Legal