{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "![Saudia XYZ logo](http://alasmari.net/saudia-logo.png)\n", "***Code:*** whitebox tools
\n", "***Main Source:*** Geemap
\n", "***Edited by:*** Saudia.xyz\n", "\n", "Uncomment the following line to install geemap if needed." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "# !pip install geemap" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "import os\n", "import geemap\n", "import whiteboxgui" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "out_dir = os.path.expanduser('~/Downloads')\n", "dem = os.path.join(out_dir, 'srtm_46_08.tif')\n", "\n", "if not os.path.exists(dem):\n", " dem_url = 'https://drive.google.com/file/d/1EBt4delAvxY7bdsy6y9-71XpVC62Gi8r/view?usp=sharing'\n", " geemap.download_from_gdrive(dem_url, 'srtm_46_08.tif', out_dir, unzip=False)" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "f814c3db67924ea29dddabaf81c5d786", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Map(center=[24, 45], controls=(WidgetControl(options=['position', 'transparent_bg'], widget=HBox(children=(Tog…" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "Map = geemap.Map(center=(24, 45), zoom=5)\n", "Map" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "scrolled": false }, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "ddfcc319ea2d49a0b32eeafe55ec2bba", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(VBox(children=(Select(layout=Layout(height='175px', width='170px'), options=('All Tools', 'Math…" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "whiteboxgui.show()" ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "scrolled": false }, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "b6fb33ff263b4ceb89d8f8058236277c", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(VBox(children=(HBox(children=(Text(value='', layout=Layout(width='270px'), placeholder='487 too…" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "whiteboxgui.show(tree=True)" ] } ], "metadata": { "hide_input": false, "kernelspec": { "display_name": "Python 3 (ipykernel)", "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.9.4" }, "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 }, "varInspector": { "cols": { "lenName": 16, "lenType": 16, "lenVar": 40 }, "kernels_config": { "python": { "delete_cmd_postfix": "", "delete_cmd_prefix": "del ", "library": "var_list.py", "varRefreshCmd": "print(var_dic_list())" }, "r": { "delete_cmd_postfix": ") ", "delete_cmd_prefix": "rm(", "library": "var_list.r", "varRefreshCmd": "cat(var_dic_list()) " } }, "types_to_exclude": [ "module", "function", "builtin_function_or_method", "instance", "_Feature" ], "window_display": false } }, "nbformat": 4, "nbformat_minor": 4 }