{ "cells": [ { "cell_type": "markdown", "id": "0", "metadata": {}, "source": [ "\"Open\n", "\n", "Uncomment the following line to install [geemap](https://geemap.org) if needed." ] }, { "cell_type": "code", "execution_count": null, "id": "1", "metadata": {}, "outputs": [], "source": [ "# !pip install geemap" ] }, { "cell_type": "code", "execution_count": null, "id": "2", "metadata": {}, "outputs": [], "source": [ "import ee\n", "import geemap\n", "from ipyleaflet import ImageOverlay" ] }, { "cell_type": "code", "execution_count": null, "id": "3", "metadata": {}, "outputs": [], "source": [ "Map = geemap.Map()\n", "Map" ] }, { "cell_type": "code", "execution_count": null, "id": "4", "metadata": {}, "outputs": [], "source": [ "collection = ee.ImageCollection(\"USGS/NLCD\")\n", "print(collection.aggregate_array(\"system:id\").getInfo())" ] }, { "cell_type": "code", "execution_count": null, "id": "5", "metadata": {}, "outputs": [], "source": [ "dataset = ee.Image(\"USGS/NLCD/NLCD2016\")\n", "landcover = ee.Image(dataset.select(\"landcover\"))\n", "Map.addLayer(landcover, {}, \"NLCD land cover\")" ] }, { "cell_type": "code", "execution_count": null, "id": "6", "metadata": {}, "outputs": [], "source": [ "url = \"https://www.mrlc.gov/sites/default/files/NLCD_Colour_Classification_Update.jpg\"\n", "bounds = [(28, -128), (35, -123)]\n", "io = ImageOverlay(url=url, bounds=bounds, name=\"NLCD legend\")\n", "Map.add_layer(io)" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" } }, "nbformat": 4, "nbformat_minor": 5 }