Skip to content

Shapefile

Read Shapefile files.

geoarrow.rust.io.read_shapefile

read_shapefile(
    shp_file: Union[str, Path, BinaryIO], dbf_file: Union[str, Path, BinaryIO]
) -> Table

Read a Shapefile into an Arrow Table.

The returned Arrow table will have geometry information in native GeoArrow encoding.

Note

Coordinate Reference System information is not currently read from the Shapefile.

Parameters:

  • shp_file (Union[str, Path, BinaryIO]) –

    the path to the .shp file or the .shp file as a Python file object in binary read mode.

  • dbf_file (Union[str, Path, BinaryIO]) –

    the path to the .dbf file or the .dbf file as a Python file object in binary read mode.