GeoPandas.to_crs()方法未转换

2024-09-26 18:06:14 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试将一些数据集转换为相同的坐标系(NC2264)

NC2264 = 'EPSG:2264'

sfd_subs = pd.read_csv(r'FILE_LOCATION.csv')
wake_shapes = gpd.GeoDataFrame.from_file(r'FILE_LOCATION.shp').to_crs(NC2264)

sfd_subs = gpd.GeoDataFrame(sfd_subs, geometry=gpd.points_from_xy(sfd_subs.Longitude, sfd_subs.Latitude),crs='EPSG:4326')
sfd_subs.to_crs(NC2264)

print(sfd_subs.crs)

shapefile转换工作正常,但“sfd_subs”保持不变。我没有错

我在顶部包含了5个正确的转换,而在底部包含了未更改的转换

EPSG:4326
0       POINT (2641914.208 1398556.771)
1       POINT (2642559.277 1398183.388)
2       POINT (2641705.300 1398352.924)
3       POINT (2641716.844 1397826.942)
4       POINT (2674989.747 1419749.281)
                     ...               
3332             POINT (-78.135 35.506)
3333             POINT (-78.130 35.504)
3334             POINT (-78.123 35.530)
3335             POINT (-78.104 35.537)
3336             POINT (-78.087 35.562)

因为我没有犯错误,我不确定什么是最好的做法


Tags: csvto数据fromlocationepsgfilepoint

热门问题