verticapy.sql.geo.rename_index#
- verticapy.sql.geo.rename_index(source: str, dest: str, overwrite: bool = False) bool #
Renames a spatial index.
Parameters#
- source: str
Current name of the spatial index.
- dest: str
New name of the spatial index.
- overwrite: bool, optional
BOOLEAN value that specifies whether to overwrite the index, if an index exists.
Returns#
- bool
True if the index was renamed, False otherwise.
Examples#
Describes all indexes:
from verticapy.sql.geo import describe_index describe_index()
AbcnameVarchar(4096)1 world_polygons_new 2 world_polygons Renames a specific index:
from verticapy.sql.geo import rename_index rename_index("world_polygons", "world_polygons_new") Out[2]: False
Index now has the new name:
describe_index()
AbcnameVarchar(4096)1 world_polygons_new 2 world_polygons Note
For geospatial functions, Vertica utilizes indexing to expedite computations, especially considering the potentially extensive size of polygons. This is a unique optimization approach employed by Vertica in these scenarios.
See also
create_index()
: Creates the geo index.describe_index()
: Describes the geo index.intersect()
: Spatially intersects a point or points with a set of polygons.