utm_crs#
- utm_crs(gdf: GeoDataFrame) None [source]#
Change temporary the CRS of a vector, ie when computing area based statistics / features (centroid….) which need a meter-based CRS.
WARNING: the modifications (other than CRS) on the yielded GeoDataFrame will be kept!
>>> vect = vectors.read(vectors_path().joinpath("aoi.kml")) >>> with vectors.utm_crs(vect) as utm_vect: >>> utm_centroid = utm_vect.centroid >>> utm_vect["centroid_utm"] = utm_centroid >>> vect["centroid_utm"].equals(c2) True
- Parameters:
gdf (str) – GeoDataFrame to copnvert