verticapy.read_shp#
- verticapy.read_shp(path: str, schema: str | None = None, table_name: str | None = None) vDataFrame #
Ingests a SHP file. At the moment, only files located in the Vertica server can be ingested.
Parameters#
- path: str
Absolute path where the SHP file is located.
- schema: str, optional
Schema where the SHP file will be ingested.
- table_name: str, optional
Final relation name.
Returns#
- vDataFrame
The
vDataFrame
of the relation.
Examples#
Let’s consider you have access to the following shape file located in the server:
/shapefiles/tl_2010_us_state10.shp
You can easily ingest it in the table ‘my_table’ in the ‘my_schema’ schema:
read_shp( path = '/shapefiles/tl_2010_us_state10.shp', schema = 'my_schema', table_name = 'my_table', )
The file will be parsed and store in the database. The output will be a
vDataFrame
.Note
VerticaPy provides a set of geospatial functions in the
verticapy.sql.geo
module.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.rename_index()
: Renames the geo index.