salem.transform_geopandas

salem.transform_geopandas(gdf, from_crs=None, to_crs=Proj('+proj=longlat +datum=WGS84 +no_defs', preserve_units=True), inplace=False)[source]

Reprojects a geopandas dataframe.

Parameters
gdfgeopandas.DataFrame

the dataframe to transform (must have a crs attribute)

from_crscrs

if gdf has no crs attribute (happens when the crs is a salem grid)

to_crscrs

the crs into which the dataframe must be transformed

inplacebool

the original dataframe will be overwritten (default: False)

Returns
A projected dataframe