'Set CRS to shapefile

Good afternoon,

I have a question: how to set CRS to shapefile in python?

Using gdal.Polygonize(), I converted raster to vector (shapefile) and then I put it in QGIS, shapefile is without CRS.

how to set CRS to shapefile in python?



Solution 1:[1]

Use GeoDataFrame.to_crs

gpf.to_crs('EPSG:4326')

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 pyaj