更改坐标参考系
在本练习中,您将学习如何查看 GeoDataFrame 的坐标参考系,以及如何进行转换。学区(school districts)的 GeoDataFrame 已以 school_districts 提供。
本练习是课程的一部分
在 Python 中可视化地理空间数据
练习说明
- 打印
school_districts的首行,以及该 GeoDataFrame 的crs属性。 - 将
school_districts的坐标参考系转换为epsg:3857。 - 再次打印
crs属性,确认已完成更改。
交互式实操练习
通过完成这段示例代码来试试这个练习。
# Print the first row of school districts GeoDataFrame and the crs
print(____.head(1))
print(____.crs)
# Convert the crs to epsg:3857
school_districts.geometry = school_districts.geometry.____(epsg = 3857)
# Print the first row of school districts GeoDataFrame and the crs again
print(school_districts.head(1))
print(____.____)