forked from gee-community/geemap
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for ArcGIS (gee-community#1361)
- Loading branch information
Showing
9 changed files
with
412 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,140 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"<a href=\"https://githubtocolab.com/giswqs/geemap/blob/master/examples/notebooks/zz_template.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open in Colab\"/></a>\n", | ||
"\n", | ||
"**Using Earth Engine with ArcGIS Pro**" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"# !pip install -U geemap" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Step 1 - Clone conda env\n", | ||
"\n", | ||
"Clone the `arcgispro-py3` conda environment and name it as `gee` (or whatever name you prefer)\n", | ||
"\n", | ||
"![](https://i.imgur.com/inZw6mR.png)\n", | ||
"\n", | ||
"## Step 2 - Install geemap\n", | ||
"\n", | ||
"Open Command Prompt or PowerShell to install geemap.\n", | ||
"\n", | ||
"`AppData\\Local\\ESRI\\conda\\envs\\gee\\Scripts\\pip.exe install geemap`\n", | ||
"\n", | ||
"![](https://i.imgur.com/AmBULc5.png)\n", | ||
"\n", | ||
"## Step 3 - Create a New Notebook\n", | ||
"\n", | ||
"To create a notebook, click the **Insert** tab on the ArcGIS Pro ribbon, and click the **New Notebook** button. Alternatively, open the **Catalog** pane, browse to your project directory, right-click a folder, and select **New > Notebook**.\n", | ||
"\n", | ||
"## Step 4 - Run GEE script\n", | ||
"\n", | ||
"Run any geemap code as usual. The `Map.addLayer()` function will automatically add Earth Engine layers to the active map. Use `Map.centerObject()` to center an Earth Engine object on the map." | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"import ee\n", | ||
"import geemap" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"Add Earth Engine layers." | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"Map = geemap.Map()\n", | ||
"dem = ee.Image('USGS/SRTMGL1_003')\n", | ||
"vis_params = {\n", | ||
" 'min': 0,\n", | ||
" 'max': 4000,\n", | ||
" 'palette': 'terrain',\n", | ||
"}\n", | ||
"Map.addLayer(dem, vis_params, 'SRTM DEM')\n", | ||
"Map" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"Center an Earth Engine object on the map." | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"Map = geemap.Map()\n", | ||
"image = (\n", | ||
" ee.Image('LANDSAT/LC09/C02/T1_L2/LC09_044034_20220503')\n", | ||
" .select('SR_B.')\n", | ||
" .multiply(0.0000275)\n", | ||
" .add(-0.2)\n", | ||
")\n", | ||
"\n", | ||
"vis_params = {'bands': ['SR_B5', 'SR_B4', 'SR_B3'], 'min': 0, 'max': 0.3}\n", | ||
"\n", | ||
"Map.addLayer(image, vis_params, 'Landsat 9')\n", | ||
"Map.centerObject(image)\n", | ||
"Map" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [] | ||
} | ||
], | ||
"metadata": { | ||
"anaconda-cloud": {}, | ||
"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.9.13" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 4 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,140 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"<a href=\"https://githubtocolab.com/giswqs/geemap/blob/master/examples/notebooks/zz_template.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open in Colab\"/></a>\n", | ||
"\n", | ||
"**Using Earth Engine with ArcGIS Pro**" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"# !pip install -U geemap" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Step 1 - Clone conda env\n", | ||
"\n", | ||
"Clone the `arcgispro-py3` conda environment and name it as `gee` (or whatever name you prefer)\n", | ||
"\n", | ||
"![](https://i.imgur.com/inZw6mR.png)\n", | ||
"\n", | ||
"## Step 2 - Install geemap\n", | ||
"\n", | ||
"Open Command Prompt or PowerShell to install geemap.\n", | ||
"\n", | ||
"`AppData\\Local\\ESRI\\conda\\envs\\gee\\Scripts\\pip.exe install geemap`\n", | ||
"\n", | ||
"![](https://i.imgur.com/AmBULc5.png)\n", | ||
"\n", | ||
"## Step 3 - Create a New Notebook\n", | ||
"\n", | ||
"To create a notebook, click the **Insert** tab on the ArcGIS Pro ribbon, and click the **New Notebook** button. Alternatively, open the **Catalog** pane, browse to your project directory, right-click a folder, and select **New > Notebook**.\n", | ||
"\n", | ||
"## Step 4 - Run GEE script\n", | ||
"\n", | ||
"Run any geemap code as usual. The `Map.addLayer()` function will automatically add Earth Engine layers to the active map. Use `Map.centerObject()` to center an Earth Engine object on the map." | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"import ee\n", | ||
"import geemap" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"Add Earth Engine layers." | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"Map = geemap.Map()\n", | ||
"dem = ee.Image('USGS/SRTMGL1_003')\n", | ||
"vis_params = {\n", | ||
" 'min': 0,\n", | ||
" 'max': 4000,\n", | ||
" 'palette': 'terrain',\n", | ||
"}\n", | ||
"Map.addLayer(dem, vis_params, 'SRTM DEM')\n", | ||
"Map" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"Center an Earth Engine object on the map." | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"Map = geemap.Map()\n", | ||
"image = (\n", | ||
" ee.Image('LANDSAT/LC09/C02/T1_L2/LC09_044034_20220503')\n", | ||
" .select('SR_B.')\n", | ||
" .multiply(0.0000275)\n", | ||
" .add(-0.2)\n", | ||
")\n", | ||
"\n", | ||
"vis_params = {'bands': ['SR_B5', 'SR_B4', 'SR_B3'], 'min': 0, 'max': 0.3}\n", | ||
"\n", | ||
"Map.addLayer(image, vis_params, 'Landsat 9')\n", | ||
"Map.centerObject(image)\n", | ||
"Map" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [] | ||
} | ||
], | ||
"metadata": { | ||
"anaconda-cloud": {}, | ||
"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.9.13" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 4 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
from ee_extra.Algorithms import river | ||
from ee_extra.Algorithms import river |
Oops, something went wrong.