geoutils.Vector.reproject

geoutils.Vector.reproject#

Vector.reproject(ref=None, crs=None, inplace=False)[source]#
Overloads:
  • self (VectorType), ref (RasterType | rio.io.DatasetReader | VectorType | gpd.GeoDataFrame | None), crs (CRS | str | int | None), inplace (Literal[False]) → VectorType

  • self (VectorType), ref (RasterType | rio.io.DatasetReader | VectorType | gpd.GeoDataFrame | None), crs (CRS | str | int | None), inplace (Literal[True]) → None

  • self (VectorType), ref (RasterType | rio.io.DatasetReader | VectorType | gpd.GeoDataFrame | None), crs (CRS | str | int | None), inplace (bool) → VectorType | None

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 (RasterLike | VectorLike | 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.

Returns:

Reprojected vector (or None if inplace).