開始使用免費開始

建立 Point 幾何物件

艾菲爾鐵塔是 19 世紀興建的鐵製鏤空塔,很可能是巴黎最具代表性的地標。

Eiffel Tower

(作者 couscouschocolat[依 [CC BY 2.0] 授權],取自維基共享資源)

艾菲爾鐵塔的位置是:x 為 255422.6、y 為 6250868.9。

本練習屬於課程

在 Python 中處理地理空間資料

檢視課程

練習說明

  • 從 shapely 匯入 Point 類別。
  • 使用艾菲爾鐵塔的座標建立一個 shapely 的點物件,並指定給名為 eiffel_tower 的變數。
  • 印出結果。

動手互動練習

試著完成這個範例程式碼,體驗一下這個練習。

# Import the Point geometry
from ____.____ import ____

# Construct a point object for the Eiffel Tower
eiffel_tower = ____

# Print the result
____
編輯並執行程式碼