⚠️ Our 0.1 release refactored several early-development functions for long-term stability, to update your code see here. ⚠️
Future changes will come with deprecation warnings! 🙂

geoutils.Vector.reproject

geoutils.Vector.reproject#

Vector.reproject(ref=None, crs=None, inplace=False)[source]#

Reproject vector to a specified coordinate reference system.

Match-reference: a reference raster or vector can be passed to match CRS during reprojection.

Alternatively, a CRS can be passed in many formats (string, EPSG integer, or CRS).

To reproject a Vector with different source bounds, first run Vector.crop().

Parameters:
  • ref (Union[Raster, DatasetReader, TypeVar(VectorType, bound= Vector), GeoDataFrame, str, None]) – A reference raster or vector whose CRS to use as a reference for reprojection. Can be provided as a raster, vector, Rasterio dataset, GeoPandas dataframe, or path to the file.

  • crs (CRS | str | int | None) – Specify the Coordinate Reference System or EPSG to reproject to. If dst_ref not set, defaults to self.crs.

  • inplace (bool) – Whether to update the vector in-place.

Return type:

Vector | None

Returns:

Reprojected vector (or None if inplace).