verticapy.sql.geo.describe_index#
- verticapy.sql.geo.describe_index(name: str | None = None, list_polygons: bool = False) TableSample | vDataFrame #
Retrieves information about an index that contains a set of polygons. If you do not pass any parameters, this function returns all defined indexes.
Parameters#
- name: str, optional
Index name.
- list_polygons: bool, optional
Boolean that specifies whether to list the polygons in the index. If set to True, the function returns a
vDataFrame
instead of aTableSample
.
Returns#
- TableSample
geospatial indexes.
Examples#
Describes all indexes:
from verticapy.sql.geo import describe_index describe_index()
AbcnameVarchar(4096)1 world_polygons_new 2 world_polygons Describes a specific index:
describe_index("world_polygons")
AbctypeVarchar(20)... 123max_xFloat(22)123max_yFloat(22)1 GEOMETRY ... 180.0 83.64513 Describes all geometries of a specific index:
describe_index( "world_polygons", list_polygons = True, )
123gidInteger100%... AbcstateVarchar(20)100%🌎Geometry(13167)100%1 1 ... INDEXED 2 2 ... INDEXED 3 3 ... INDEXED 4 4 ... INDEXED 5 5 ... INDEXED 6 6 ... INDEXED 7 7 ... INDEXED 8 8 ... INDEXED 9 9 ... INDEXED 10 10 ... INDEXED 11 11 ... INDEXED 12 12 ... INDEXED 13 13 ... INDEXED 14 14 ... INDEXED 15 15 ... INDEXED 16 16 ... INDEXED 17 17 ... INDEXED 18 18 ... INDEXED 19 19 ... INDEXED 20 20 ... INDEXED 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.intersect()
: Spatially intersects a point or points with a set of polygons.rename_index()
: Renames the geo index.