spymicmac.ee_tools

Note

Before using sPyMicMac.ee_tools, you will need to run ee.Authenticate(), in order to authorize the access needed by EarthEngine. To do this from the python terminal, run the following:

import ee
ee.Authenticate()

This will open a browser window and prompt you to select your Google account for authentication. It will generate an authorization code which you should then copy and paste into the prompt in the python terminal.

After you have successfully authenticated, you should be able to use sPyMicMac.ee_tools normally (note that you will need to explicitly import ee_tools - it is not loaded by spymicmac.__init__.py, in order to prevent authorization errors):

from spymicmac import ee_tools

You won’t need to do this every time you use spymicmac.ee_tools(), but you may need to re-authorize from time to time.

spymicmac.ee_tools is a collection of tools for getting GEE data for processing KH-9 Hexagon imagery.

spymicmac.ee_tools.get_alos_dem(filt_geom=None)[source]

Return the ALOS DEM, clipped to an optional geometry.

Parameters

filt_geom – A geometry object to clip images to

Returns

spymicmac.ee_tools.get_landsat_collections(filt_geom=None, sensors='all', tier='all')[source]

Return a collection of raw Landsat images filtered by an (optional) geometry, given a list of sensor names and tier levels. Default behavior is to select all sensors and all tiers.

Valid sensor names: LC08, LE07, LT05, LT04, LM05, LM04, LM03, LM02, LM01

Valid tier levels: T1, T2. Check Landsat docs for details.

Parameters
  • filt_geom – A geometry object to filter images by. See EE docs for more details.

  • sensors – Landsat sensor(s) to select images from.

  • tier – Processing tier(s) to select.

Returns

spymicmac.ee_tools.get_srtm(ver='usgs', filt_geom=None)[source]

Return the SRTM DEM, clipped to an optional geometry.

Parameters
  • ver – SRTM version to select, one of ‘usgs’, ‘cgiar’

  • filt_geom – A geometry object to clip images to

Returns