GeoSeries
Constructor
geopolars.GeoSeries
Bases: pl.Series
Extension of polars.Series to handle geospatial vector data.
to_crs
to_crs(
from_crs: str | pyproj.crs.CRS,
to_crs: str | pyproj.crs.CRS,
) -> GeoSeries
Transform all geometries in a GeoSeries to a different coordinate reference system.
For now, you must pass in both from_crs and to_crs. In the future, we'll
handle the current CRS automatically.
This method will transform all points in all objects. It has no notion of projecting entire geometries. All segments joining points are assumed to be lines in the current projection, not geodesics. Objects crossing the dateline (or other projection boundary) will have undesirable behavior.
Parameters:
-
from_crs
(
str | pyproj.crs.CRS) –Origin coordinate system. The value can be anything accepted by
pyproj.CRS.from_user_input(), such as an authority string (eg "EPSG:4326") or a WKT string. -
to_crs
(
str | pyproj.crs.CRS) –Destination coordinate system. The value can be anything accepted by
pyproj.CRS.from_user_input(), such as an authority string (eg "EPSG:4326") or a WKT string.
Returns:
-
GeoSeries–A
GeoSerieswith all geometries transformed to a new coordinate reference system.
to_geopandas
to_geopandas() -> geopandas.GeoSeries
Converts this GeoSeries to a geopandas.GeoSeries.
This operation clones data. This requires that geopandas and
pyarrow are installed.
Returns:
-
geopandas.GeoSeries–This
GeoSeriesas ageopandas.GeoSeries.
General methods and attributes
geopolars.internals.geoseries.GeoSeries.geo
property
geopolars.internals.geoseries.GeoSeries.geo: GeoRustSeries