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 (Raster | DatasetReader | TypeVar(VectorType, bound= Vector) | GeoDataFrame | None) – Reference raster or vector whose CRS to use as a reference for reprojection. Can be provided as a raster, vector, Rasterio dataset, or GeoPandas dataframe.

  • 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).