{ "cells": [ { "cell_type": "markdown", "metadata": { "id": "evv3PLpEAXA-" }, "source": [ "\"Open" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "id": "U8XgkNZjFaLk" }, "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, "metadata": { "id": "Y8k0PSDGHfYA" }, "outputs": [], "source": [ "# test some basic functionality\n", "import ee\n", "import geemap.eefolium as geemap\n", "from geemap import cartoee\n", "\n", "%pylab inline\n", "Map = geemap.Map()" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "id": "KLi3XWIJZhKa" }, "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(srtm,region=[-180,-60,180,60],vis_params={'min':0,'max':3000})\n", "cartoee.add_gridlines(ax,interval=(60,30),linestyle=\":\")\n", "cartoee.add_colorbar(ax,vis_params={'min':0,'max':3000},loc=\"bottom\", label=\"Elevation\",orientation=\"horizontal\")\n", "\n", "# ax.coastlines() # adding coastlines are causing the errors!!!\n", "plt.show()" ] } ], "metadata": { "colab": { "collapsed_sections": [], "name": "cartoee_colab.ipynb", "provenance": [ { "file_id": "13Ug6S_aQaIUEWCVU01bGZ55voy2ewRs_", "timestamp": 1605193579903 }, { "file_id": "1pvDOKC7QLLeOGGLBlFgZwcp6FNde1DhI", "timestamp": 1604009510469 } ] }, "hide_input": false, "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.5" }, "toc": { "base_numbering": 1, "nav_menu": {}, "number_sections": true, "sideBar": true, "skip_h1_title": false, "title_cell": "Table of Contents", "title_sidebar": "Contents", "toc_cell": false, "toc_position": {}, "toc_section_display": true, "toc_window_display": false } }, "nbformat": 4, "nbformat_minor": 1 }