Cesium とは,3次元の「地図」をウエブブラウザで表示するための JavaScript ライブラリ. Cesium を Python から使えるソフトウエア cesiumpy をこのWebページで紹介します.
Web ページ: https://github.com/sinhrks/cesiumpy
謝辞:このページで紹介するソフトウエア等の作者に感謝します.
システム Python を使うことができる(その場合,Python のインストールは行わない)
システム Python を用いるときは,pip, setuptools の更新は次のコマンドで行う.
sudo apt -y update sudo apt -y install python3-pip python3-setuptools
Ubuntu で,システム Python 以外の Python をインストールしたい場合は pyenv が便利である: 別ページで説明している.
Python の URL: http://www.python.org/
【Python, pip の使い方】
Python, pip は,次のコマンドで起動できる.
【Python 開発環境のインストール】
JupyterLab, spyder, nteract (Python 開発環境) のインストールは, Windows でコマンドプロンプトを管理者として実行し, 次のコマンドを実行.
python -m pip install -U pip setuptools jupyterlab jupyter jupyter-console jupytext nteract_on_jupyter spyder
詳しくは,: 別ページで説明している.
JupyterLab, spyder, nteract (Python 開発環境) のインストール: : 別ページで説明している.
正確には https://github.com/sinhrks/cesiumpy をご覧ください。私が行った設定手順の記録です.
※ Windows での展開(解凍)のためのソフトには,「7-Zip」などがある.
この .zip ファイルは,E:\cesiumpy-master\cesiumpy-master に展開(解凍)したものとして,説明を続けるので,適切に読み替えてください.
Ubuntu では「sudo python3 setup.py install」
python -m pip install -r requirements.txt python setup.py install
jupyter notebook
Python プログラムを動かして,結果を Web ブラウザでビジュアルに見たい.
※ 「jupyternotebook」を入れたのに,jupyter notebook が起動しない という場合には,次の操作で,インストールを行ってから,もう一度試してみる.
python -m pip install -U jupyterlab jupyter jupyter-console jupytext spyder
ここから先は,Jupyter notebook の画面で説明する.
import cesiumpy
v = cesiumpy.Viewer()
print(v)
下の図のようにエラーが出た場合には、もう一度同じことを繰り返す