{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import ee\n", "import geemap\n", "from geemap import cartoee\n", "import cartopy.crs as ccrs\n", "import matplotlib.pyplot as plt" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "geemap.ee_initialize()\n", "\n", "point = ee.Geometry.Point(123.488, -8.284)\n", "\n", "volcano = ee.ImageCollection(\"COPERNICUS/S2_SR\") \\\n", " .filterBounds(point) \\\n", " .filterDate(\"2020-11-28\", \"2020-12-04\") \\\n", " .first()\n", "\n", "plt.figure(figsize=(16, 12))\n", "\n", "region = [123.3,-8.5,123.8,-8.18]\n", "vis = {'min': 0, 'max': 6000, 'bands': ['B4', 'B3', 'B2']}\n", "\n", "ax = cartoee.get_map(volcano, region=region, vis_params=vis)\n", "\n", "ax.set_title(\n", " label = 'Lewato volcano 2020-11-29',\n", " fontsize = 15\n", ")\n", "\n", "cartoee.add_gridlines(ax, interval=(0.1,0.1), linestyle=\":\")\n", "cartoee.add_scale_bar(ax, 5, xy=(0.9, 0.02), linewidth=3, color=\"white\", unit=\"km\")\n", "cartoee.add_north_arrow(ax, 'N', xy=(0.9, 0.2), arrow_length=0.1, text_color=\"white\", arrow_color=\"white\")\n", "\n", "plt.show()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "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": 4 }