{ "cells": [ { "cell_type": "markdown", "id": "0", "metadata": {}, "source": [ "\"Open" ] }, { "cell_type": "code", "execution_count": null, "id": "1", "metadata": {}, "outputs": [], "source": [ "# only run the install once, after install then restart session and proceed\n", "\n", "# install the Proj and GEOS libraries\n", "!apt-get install libproj-dev proj-bin\n", "!apt-get install libgeos-dev\n", "\n", "# install cartopy and geemap with all of the dependencies prebuilt\n", "!pip install cartopy geemap" ] }, { "cell_type": "code", "execution_count": null, "id": "2", "metadata": {}, "outputs": [], "source": [ "# test some basic functionality\n", "import ee\n", "import geemap.foliumap as geemap\n", "from geemap import cartoee\n", "\n", "%pylab inline\n", "Map = geemap.Map()" ] }, { "cell_type": "code", "execution_count": null, "id": "3", "metadata": {}, "outputs": [], "source": [ "# get an earth engine image\n", "srtm = ee.Image(\"CGIAR/SRTM90_V4\")\n", "\n", "region = [-180, -60, 180, 85] # define bounding box to request data\n", "vis = {\"min\": 0, \"max\": 3000} # define visualization parameters for image\n", "\n", "# plot the result using cartoee\n", "ax = cartoee.get_map(\n", " srtm, region=[-180, -60, 180, 60], vis_params={\"min\": 0, \"max\": 3000}\n", ")\n", "cartoee.add_gridlines(ax, interval=(60, 30), linestyle=\":\")\n", "cartoee.add_colorbar(\n", " ax,\n", " vis_params={\"min\": 0, \"max\": 3000},\n", " loc=\"bottom\",\n", " label=\"Elevation\",\n", " orientation=\"horizontal\",\n", ")\n", "\n", "# ax.coastlines() # adding coastlines are causing the errors!!!\n", "plt.show()" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" } }, "nbformat": 4, "nbformat_minor": 5 }