始める無料で始める

座標参照系の変更

この演習では、GeoDataFrame の座標参照系を確認し、変更する方法を学びます。学区の 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(____.____)
コードを編集して実行