Functions
geopolars.from_arrow
geopolars.from_arrow(
a: pa.Table | pa.Array | pa.ChunkedArray,
) -> GeoDataFrame | GeoSeries
Construct a GeoPolars GeoDataFrame
or GeoSeries
from an
Arrow Table or Array.
This operation will be zero copy for the most part. Types that are not supported by Polars may be cast to the closest supported type.
Parameters:
-
a
(
pa.Table | pa.Array | pa.ChunkedArray
) –Data represented as Arrow Table or Array.
Returns:
-
GeoDataFrame | GeoSeries
–GeoDataFrame
orGeoSeries
geopolars.from_geopandas
geopolars.from_geopandas(
gdf: geopandas.GeoDataFrame
| geopandas.GeoSeries
| pandas.DataFrame
| pandas.Series,
force_wkb: bool = True,
) -> GeoDataFrame | GeoSeries | DataFrame | Series
Construct a GeoPolars GeoDataFrame
or GeoSeries
from a
geopandas.GeoDataFrame
or
geopandas.GeoSeries
.
This operation clones data.
This requires that geopandas
and pyarrow
are installed.
Parameters:
-
gdf
(
geopandas.GeoDataFrame | geopandas.GeoSeries | pandas.DataFrame | pandas.Series
) –Input data to convert from.
Returns:
-
GeoDataFrame | GeoSeries | DataFrame | Series
–A GeoPolars
GeoDataFrame
orGeoSeries