IO#

cuSpatial offers native GPU-accelerated shapefile reading. In addition, any host-side GeoPandas DataFrame can be copied into GPU memory for use with cuSpatial algorithms.

cuspatial.read_polygon_shapefile(filename)#

Reads polygon geometry from an ESRI shapefile into GPU memory.

Parameters
filenamestr, pathlike

ESRI Shapefile file path (usually ends in .shp)

Returns
resulttuple (cudf.Series, cudf.Series, cudf.DataFrame)
poly_offsetscudf.Series(dtype=np.int32)

Offsets of the first ring in each polygon

ring_offsetscudf.Series(dtype=np.int32)

Offsets of the first point in each ring

pointscudf.DataFrame
DataFrame of all points in the shapefile
xcudf.Series(dtype=np.float64)

x-components of each polygon’s points

ycudf.Series(dtype=np.float64)

y-components of each polygon’s points

cuspatial.from_geopandas(gpdf)#

Converts a geopandas mixed geometry dataframe into a cuspatial geometry dataframe.

Possible inputs:

geopandas.geoseries.GeoSeries geopandas.geodataframe.GeoDataFrame