GeoNotebook is an application that provides client/server environment with interactive visualization and analysis capabilities using Jupyter, [GeoJS] (http://www.github.com/OpenGeoscience/geojs) and other open source tools. Jointly developed by Kitware and NASA Ames.
Checkout some additional screenshots
For default tile serving
- GDAL >= 2.1.0
- mapnik >= 3.1.0
- python-mapnik >= 0.1
git clone [email protected]:OpenGeoscience/geonotebook.git
cd geonotebook
mkvirtualenv -a . geonotebook
# Numpy must be fully installed before rasterio
pip install -r prerequirements.txt
pip install -r requirements.txt
pip install .
# Enable both the notebook and server extensions
jupyter serverextension enable --sys-prefix --py geonotebook
jupyter nbextension enable --sys-prefix --py geonotebook
Note The serverextension
and nbextension
commands accept flags that configure how
and where the extensions are installed. See jupyter serverextension --help
for more
information.
When developing geonotebook, it is often helpful to install packages as a reference to the
checked out repository rather than copying them to the system site-packages
. A "development
install" will allow you to make live changes to python or javascript without reinstalling the
package.
# Install the geonotebook python package as "editable"
pip install -e .
# Install the notebook extension as a symlink
jupyter nbextension install --sys-prefix --symlink --py geonotebook
# Enable the extension
jupyter serverextension enable --sys-prefix --py geonotebook
jupyter nbextension enable --sys-prefix --py geonotebook
# Start the javascript builder
cd js
npm run watch
cd notebooks/
jupyter notebook
Geonotebook relies on a configuration for several of its options. The system will merge configuration files in the following precedence:
- /etc/geonotebook.ini
- /usr/etc/geonotebook.ini
- /usr/local/etc/geonotebook.ini
sys.prefix
/etc/geonotebook.ini (e.g. /home/user/.virtual_environments/geonotebook/etc/geonotebook.inig)- ~/.geonotebook.ini
os.getcwd()
/.geonotebook.ini- any path specified in the
GEONOTEBOOK_INI
environment variable.
The default configuration is installed in sys.prefix
/etc/geonotebook.ini
# From the source root
pip install -r requirements-dev.txt
tox
# Optionally only run tests on python 2.7
# tox -e py27
System requirements for running the notebook can sometimes prove burdensome to install. To ease these issues we have included a docker container that will run the notebook inside a containerized process.
Additionally there is a Vagrantfile
for standing up an instance of Geonotebook within a virtual machine, further instructions can be found here.
By default geonotebook provides its own tile server based on Mapnik and GDAL as a Jupyter Notebook server extension. Assuming system pre-requisites are available this should not need to be configured. Alternately geonotebook may be configured to use a pre-existing Geoserver for serving tiles. A built in geoserver implementation is available as a virtual machine in devops/geoserver/.
First provision the geoserver
cd devops/geoserver/
vagrant up
Second change the vis_server
configuration to geoserver
in the [default]
section of your configuration. Then include a [geoserver]
section with the pertinent configuration. E.g.:
[default]
vis_server=geoserver
...
[geoserver]
username = admin
password = geoserver
url = http://127.0.0.1:8080/geoserver