Skip to content

Shapefile

Read Shapefile files.

geoarrow.rust.io.read_shapefile

read_shapefile(
    shp_path: Union[str, Path],
    *,
    batch_size: int = 65536,
    coord_type: CoordType | CoordTypeT | None = None
) -> Table

Read a Shapefile into an Arrow Table.

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

Parameters:

  • shp_file

    the path to the .shp file

Other Parameters:

  • batch_size (int) –

    the number of rows to include in each internal batch of the table.

  • coord_type (CoordType | CoordTypeT | None) –

    The coordinate type. Defaults to None.