Python 如何有效地更改geopandas数据帧中几何体的crs?
我有一个形状文件,我正在将其转换为geopandas数据帧。这个形状文件的crs是epsg:4326,我想把它转换成epsg:3857Python 如何有效地更改geopandas数据帧中几何体的crs?,python,performance,gis,shapefile,geopandas,Python,Performance,Gis,Shapefile,Geopandas,我有一个形状文件,我正在将其转换为geopandas数据帧。这个形状文件的crs是epsg:4326,我想把它转换成epsg:3857 import geopandas as gp file_path = 'zip_poly.shp' sf = gp.read_file(file_path) sf = sf[['ZIP_CODE','PO_NAME','STATE','geometry']] sf = sf.to_crs(epsg=3857) 您可以找到shapefile shapefile
import geopandas as gp
file_path = 'zip_poly.shp'
sf = gp.read_file(file_path)
sf = sf[['ZIP_CODE','PO_NAME','STATE','geometry']]
sf = sf.to_crs(epsg=3857)
您可以找到shapefile
shapefile大约有33K个zipcodes,转换时间太长。有更好的快速转换方法吗?我认为您显示的代码是目前最好的选择(多长时间太长?)。使用pyproj的最新版本(>2.1)可能会有所改进,GeoPandas中正在进行改进性能的工作,但尚未发布。的副本