131 arcgis
In [ ]:
Copied!
# !pip install -U geemap
# !pip install -U geemap
Step 1 - Open ArcGIS Python Command Prompt¶
Navigate to the Start Menu -> All apps -> ArcGIS folder, then open the Python Command Prompt.
Step 2 - Create a conda environment¶
Create a fresh conda env to install arcpy and geemap with the following commands within the Python Command Prompt:
conda create conda-forge::mamba esri::python -n gee
conda activate gee
mamba install arcpy geemap -c esri -c conda-forge
proswap gee
Step 3 - Create a New Notebook¶
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.
Step 4 - Run GEE script¶
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.
In [ ]:
Copied!
import ee
import geemap
import ee
import geemap
Add Earth Engine layers.
In [ ]:
Copied!
Map = geemap.Map()
dem = ee.Image("USGS/SRTMGL1_003")
vis_params = {
"min": 0,
"max": 4000,
"palette": "terrain",
}
Map.addLayer(dem, vis_params, "SRTM DEM")
Map
Map = geemap.Map()
dem = ee.Image("USGS/SRTMGL1_003")
vis_params = {
"min": 0,
"max": 4000,
"palette": "terrain",
}
Map.addLayer(dem, vis_params, "SRTM DEM")
Map
Center an Earth Engine object on the map.
In [ ]:
Copied!
Map = geemap.Map()
image = (
ee.Image("LANDSAT/LC09/C02/T1_L2/LC09_044034_20220503")
.select("SR_B.")
.multiply(0.0000275)
.add(-0.2)
)
vis_params = {"bands": ["SR_B5", "SR_B4", "SR_B3"], "min": 0, "max": 0.3}
Map.addLayer(image, vis_params, "Landsat 9")
Map.centerObject(image)
Map
Map = geemap.Map()
image = (
ee.Image("LANDSAT/LC09/C02/T1_L2/LC09_044034_20220503")
.select("SR_B.")
.multiply(0.0000275)
.add(-0.2)
)
vis_params = {"bands": ["SR_B5", "SR_B4", "SR_B3"], "min": 0, "max": 0.3}
Map.addLayer(image, vis_params, "Landsat 9")
Map.centerObject(image)
Map