diff --git a/forest_monitor/core.py b/forest_monitor/core.py index 75fb0b6..4a07534 100644 --- a/forest_monitor/core.py +++ b/forest_monitor/core.py @@ -14,8 +14,8 @@ class ForestMonitor(): ee.Initialize(settings.EE_CREDENTIALS) # image collection - TREE_CANOPY = ee.ImageCollection('projects/servir-mekong/yearly_primitives_smoothed/tree_canopy') - TREE_HEIGHT = ee.ImageCollection('projects/servir-mekong/yearly_primitives_smoothed/tree_height') + TREE_CANOPY = ee.ImageCollection('projects/servir-mekong/UMD/tree_canopy') + TREE_HEIGHT = ee.ImageCollection('projects/servir-mekong/UMD/tree_height') PRIMARY_FOREST = ee.ImageCollection('projects/servir-mekong/yearly_primitives_smoothed/primary_forest') # geometries @@ -125,7 +125,7 @@ def _apply_tree_canopy_definition(img): return { 'eeMapId': str(map_id['mapid']), - 'eeMapToken': str(map_id['token']) + 'eeMapURL': str(map_id['tile_fetcher'].url_format) } # ------------------------------------------------------------------------- @@ -134,7 +134,7 @@ def tree_height(self, get_image = False, for_download = False, year = None, - tree_height_definition = 5, + tree_height_definition = 5, ): if not year: @@ -170,7 +170,7 @@ def _apply_tree_height_definition(img): return { 'eeMapId': str(map_id['mapid']), - 'eeMapToken': str(map_id['token']) + 'eeMapURL': str(map_id['tile_fetcher'].url_format) } # ------------------------------------------------------------------------- @@ -201,14 +201,14 @@ def primary_forest(self, get_image=False, year=None): return { 'eeMapId': str(map_id['mapid']), - 'eeMapToken': str(map_id['token']) + 'eeMapURL': str(map_id['tile_fetcher'].url_format) } # ------------------------------------------------------------------------- @staticmethod def _get_combined_img_coll(): - years = ee.List.sequence(2000, 2018) + years = ee.List.sequence(2000, 2019) date_ymd = ee.Date.fromYMD def addBands(year): @@ -280,7 +280,7 @@ def forest_gain(self, return { 'eeMapId': str(map_id['mapid']), - 'eeMapToken': str(map_id['token']) + 'eeMapURL': str(map_id['tile_fetcher'].url_format) } # ------------------------------------------------------------------------- @@ -328,7 +328,7 @@ def forest_loss(self, return { 'eeMapId': str(map_id['mapid']), - 'eeMapToken': str(map_id['token']) + 'eeMapURL': str(map_id['tile_fetcher'].url_format) } # ------------------------------------------------------------------------- @@ -390,7 +390,7 @@ def forest_change(self, return { 'eeMapId': str(map_id['mapid']), - 'eeMapToken': str(map_id['token']) + 'eeMapURL': str(map_id['tile_fetcher'].url_format) } # ------------------------------------------------------------------------- @@ -431,7 +431,7 @@ def forest_extend(self, return { 'eeMapId': str(map_id['mapid']), - 'eeMapToken': str(map_id['token']) + 'eeMapURL': str(map_id['tile_fetcher'].url_format) } # ------------------------------------------------------------------------- @@ -587,7 +587,7 @@ def download_to_drive(self, print ('past %d seconds' % (i * settings.EE_TASK_POLL_FREQUENCY)) i += 1 time.sleep(settings.EE_TASK_POLL_FREQUENCY) - + # Make a copy (or copies) in the user's Drive if the task succeeded state = task.status()['state'] if state == ee.batch.Task.State.COMPLETED: diff --git a/landcover_viewer/core.py b/landcover_viewer/core.py index ebad8b8..2428337 100644 --- a/landcover_viewer/core.py +++ b/landcover_viewer/core.py @@ -525,7 +525,7 @@ def get_landcover(self, classes=range(0, 21), year=2016, download=False): return { 'eeMapId': str(map_id['mapid']), - 'eeMapToken': str(map_id['token']) + 'eeMapURL': str(map_id['tile_fetcher'].url_format) } # ------------------------------------------------------------------------- @@ -558,7 +558,7 @@ def get_primitive(self, index=0, year=2016, download=False): return { 'eeMapId': str(map_id['mapid']), - 'eeMapToken': str(map_id['token']) + 'eeMapURL': str(map_id['tile_fetcher'].url_format) } # ------------------------------------------------------------------------- @@ -579,7 +579,7 @@ def get_probability(self, year=2017, download=False): }) return { 'eeMapId': str(map_id['mapid']), - 'eeMapToken': str(map_id['token']) + 'eeMapURL': str(map_id['tile_fetcher'].url_format) } # ------------------------------------------------------------------------- @@ -738,5 +738,5 @@ def get_composite(self, year=2017): return { 'eeMapId': str(map_id['mapid']), - 'eeMapToken': str(map_id['token']) + 'eeMapURL': str(map_id['tile_fetcher'].url_format) } diff --git a/landcoverportal/static/app/controllers/forest-monitor-controller.js b/landcoverportal/static/app/controllers/forest-monitor-controller.js index aebdb03..e1ba0b6 100644 --- a/landcoverportal/static/app/controllers/forest-monitor-controller.js +++ b/landcoverportal/static/app/controllers/forest-monitor-controller.js @@ -661,7 +661,7 @@ // Callbacks for Parameters (forest canopy, change, loss etc) var parameterChangeSuccessCallback = function (name, data, slider, message) { MapService.removeGeoJson(map); - var mapType = MapService.getMapType(data.eeMapId, data.eeMapToken, name); + var mapType = MapService.getMapType(name, data.eeMapURL); loadMap(name, mapType); slider.slider('setValue', 1); showSuccessAlert(message); diff --git a/landcoverportal/static/app/controllers/landcover-controller.js b/landcoverportal/static/app/controllers/landcover-controller.js index 6408e64..751fcfa 100644 --- a/landcoverportal/static/app/controllers/landcover-controller.js +++ b/landcoverportal/static/app/controllers/landcover-controller.js @@ -270,6 +270,7 @@ $scope.showLoader = false; }; + /** * Starts the Google Earth Engine application. The main entry point. */ @@ -315,7 +316,7 @@ }; LandCoverService.getLandCoverMap(parameters) .then(function (data) { - var mapType = MapService.getMapType(data.eeMapId, data.eeMapToken, type); + var mapType = MapService.getMapType(type, data.eeMapURL); loadMap(type, mapType); $timeout(function () { showInfoAlert('The map data shows the landcover data for ' + $scope.sliderYear); @@ -799,7 +800,7 @@ var type = 'primitivemap'; MapService.removeGeoJson(map); MapService.clearLayer(map, type); - var mapType = MapService.getMapType(data.eeMapId, data.eeMapToken, type); + var mapType = MapService.getMapType(type, data.eeMapURL); loadMap(type, mapType); $timeout(function () { showInfoAlert('Showing ' + getPrimitiveLabel(index) + ' primitive layer for ' + $scope.sliderYear); @@ -831,7 +832,7 @@ var type = 'probabilitymap'; MapService.removeGeoJson(map); MapService.clearLayer(map, type); - var mapType = MapService.getMapType(data.eeMapId, data.eeMapToken, type); + var mapType = MapService.getMapType(type, data.eeMapURL); var checked = $('#probability-map-checkbox').prop('checked'); loadMap(type, mapType); if (checked) { @@ -866,7 +867,7 @@ var type = 'compositemap'; MapService.removeGeoJson(map); MapService.clearLayer(map, type); - var mapType = MapService.getMapType(data.eeMapId, data.eeMapToken, type); + var mapType = MapService.getMapType(type, data.eeMapURL); var checked = $('#composite-map-checkbox').prop('checked'); loadMap(type, mapType); if (checked) { diff --git a/landcoverportal/static/app/controllers/myanmar-fra-controller.js b/landcoverportal/static/app/controllers/myanmar-fra-controller.js index d670dac..d35b72f 100644 --- a/landcoverportal/static/app/controllers/myanmar-fra-controller.js +++ b/landcoverportal/static/app/controllers/myanmar-fra-controller.js @@ -265,7 +265,7 @@ LandCoverService.getLandCoverMap(parameters) .then(function (data) { - var mapType = MapService.getMapType(data.eeMapId, data.eeMapToken, type); + var mapType = MapService.getMapType(type, data.eeMapURL); loadMap(type, mapType); $timeout(function () { showInfoAlert('The map data shows the landcover data for ' + $scope.sliderYear); @@ -710,7 +710,7 @@ .then(function (data) { MapService.removeGeoJson(map); MapService.clearLayer(map, 'primitivemap'); - var mapType = MapService.getMapType(data.eeMapId, data.eeMapToken, 'primitivemap'); + var mapType = MapService.getMapType('primitivemap', data.eeMapURL); loadMap('primitivemap', mapType); $timeout(function () { showInfoAlert('Showing ' + getPrimitiveLabel(index) + ' primitive layer for ' + $scope.sliderYear); diff --git a/landcoverportal/static/app/controllers/myanmar-ipcc-controller.js b/landcoverportal/static/app/controllers/myanmar-ipcc-controller.js index b889469..a2322c2 100644 --- a/landcoverportal/static/app/controllers/myanmar-ipcc-controller.js +++ b/landcoverportal/static/app/controllers/myanmar-ipcc-controller.js @@ -267,7 +267,7 @@ LandCoverService.getLandCoverMap(parameters) .then(function (data) { - var mapType = MapService.getMapType(data.eeMapId, data.eeMapToken, type); + var mapType = MapService.getMapType(type, data.eeMapURL); loadMap(type, mapType); $timeout(function () { showInfoAlert('The map data shows the landcover data for ' + $scope.sliderYear); @@ -712,7 +712,7 @@ .then(function (data) { MapService.removeGeoJson(map); MapService.clearLayer(map, 'primitivemap'); - var mapType = MapService.getMapType(data.eeMapId, data.eeMapToken, 'primitivemap'); + var mapType = MapService.getMapType('primitivemap', data.eeMapURL); loadMap('primitivemap', mapType); $timeout(function () { showInfoAlert('Showing ' + getPrimitiveLabel(index) + ' primitive layer for ' + $scope.sliderYear); diff --git a/landcoverportal/static/app/controllers/myanmar-national-controller.js b/landcoverportal/static/app/controllers/myanmar-national-controller.js index 03ad3c1..9ec3f43 100644 --- a/landcoverportal/static/app/controllers/myanmar-national-controller.js +++ b/landcoverportal/static/app/controllers/myanmar-national-controller.js @@ -259,7 +259,7 @@ LandCoverService.getLandCoverMap(parameters) .then(function (data) { - var mapType = MapService.getMapType(data.eeMapId, data.eeMapToken, type); + var mapType = MapService.getMapType(type, data.eeMapURL); loadMap(type, mapType); $timeout(function () { showInfoAlert('The map data shows the landcover data for ' + $scope.sliderYear); @@ -694,7 +694,7 @@ .then(function (data) { MapService.removeGeoJson(map); MapService.clearLayer(map, 'primitivemap'); - var mapType = MapService.getMapType(data.eeMapId, data.eeMapToken, 'primitivemap'); + var mapType = MapService.getMapType('primitivemap', data.eeMapURL); loadMap('primitivemap', mapType); $timeout(function () { showInfoAlert('Showing ' + getPrimitiveLabel(index) + ' primitive layer for ' + $scope.sliderYear); diff --git a/landcoverportal/static/app/controllers/myanmar-national-portal-controller.js b/landcoverportal/static/app/controllers/myanmar-national-portal-controller.js index 29f4839..ffd2676 100644 --- a/landcoverportal/static/app/controllers/myanmar-national-portal-controller.js +++ b/landcoverportal/static/app/controllers/myanmar-national-portal-controller.js @@ -294,7 +294,7 @@ LandCoverService.getLandCoverMap(parameters) .then(function (data) { - var mapType = MapService.getMapType(data.eeMapId, data.eeMapToken, type); + var mapType = MapService.getMapType(type, data.eeMapURL); loadMap(type, mapType); $timeout(function () { showInfoAlert('The map data shows the landcover data for ' + $scope.sliderYear); @@ -729,7 +729,7 @@ .then(function (data) { MapService.removeGeoJson(map); MapService.clearLayer(map, 'primitivemap'); - var mapType = MapService.getMapType(data.eeMapId, data.eeMapToken, 'primitivemap'); + var mapType = MapService.getMapType('primitivemap', data.eeMapURL); loadMap('primitivemap', mapType); $timeout(function () { showInfoAlert('Showing ' + getPrimitiveLabel(index) + ' primitive layer for ' + $scope.sliderYear); diff --git a/landcoverportal/static/app/controllers/myanmar-plantation-controller.js b/landcoverportal/static/app/controllers/myanmar-plantation-controller.js index 5ef0e94..07016ff 100644 --- a/landcoverportal/static/app/controllers/myanmar-plantation-controller.js +++ b/landcoverportal/static/app/controllers/myanmar-plantation-controller.js @@ -234,7 +234,7 @@ LandCoverService.getLandCoverMap(parameters) .then(function (data) { - var mapType = MapService.getMapType(data.eeMapId, data.eeMapToken, type); + var mapType = MapService.getMapType(type, data.eeMapURL); loadMap(type, mapType); $timeout(function () { showInfoAlert('The map data shows the landcover data for ' + $scope.sliderYear); @@ -676,7 +676,7 @@ .then(function (data) { MapService.removeGeoJson(map); MapService.clearLayer(map, 'primitivemap'); - var mapType = MapService.getMapType(data.eeMapId, data.eeMapToken, 'primitivemap'); + var mapType = MapService.getMapType('primitivemap', data.eeMapURL); loadMap('primitivemap', mapType); $timeout(function () { showInfoAlert('Showing ' + getPrimitiveLabel(index) + ' primitive layer for ' + $scope.sliderYear); @@ -780,7 +780,7 @@ .then(function (data) { MapService.removeGeoJson(map); MapService.clearLayer(map, 'probabilitymap'); - var mapType = MapService.getMapType(data.eeMapId, data.eeMapToken, 'probabilitymap'); + var mapType = MapService.getMapType('probabilitymap', data.eeMapURL); var checked = $('#probability-map-checkbox').prop('checked'); loadMap('probabilitymap', mapType); if (checked) { diff --git a/landcoverportal/static/app/services/map-service.js b/landcoverportal/static/app/services/map-service.js index 4734d8c..468098c 100644 --- a/landcoverportal/static/app/services/map-service.js +++ b/landcoverportal/static/app/services/map-service.js @@ -166,19 +166,20 @@ } }; - service.getMapType = function (mapId, mapToken, type) { + service.getMapType = function (type, eeMapURL) { var eeMapOptions = { - getTileUrl: function (tile, zoom) { - var url = 'https://earthengine.googleapis.com/map/'; - url += [mapId, zoom, tile.x, tile.y].join('/'); - url += '?token=' + mapToken; + getTileUrl: function (tile, zoom) { + var url = eeMapURL.replace('{x}', tile.x) + .replace('{y}', tile.y) + .replace('{z}', zoom); return url; }, - tileSize: new google.maps.Size(256, 256), - opacity: 1.0, - name: type + tileSize: new google.maps.Size(256, 256), + name: type, + opacity: 1.0 }; - return new google.maps.ImageMapType(eeMapOptions); + var mapType = new google.maps.ImageMapType(eeMapOptions); + return mapType }; service.getPolygonBoundArray = function (array) { diff --git a/landcoverportal/templates/layout.html b/landcoverportal/templates/layout.html index 742a770..96ae50f 100644 --- a/landcoverportal/templates/layout.html +++ b/landcoverportal/templates/layout.html @@ -100,11 +100,7 @@ {% cms_toolbar %} - + {% block navigation_container %} {% endblock navigation_container %} diff --git a/landcoverportal/templates/panels/side-panel-forest-monitor.html b/landcoverportal/templates/panels/side-panel-forest-monitor.html index df34852..6f9a2be 100644 --- a/landcoverportal/templates/panels/side-panel-forest-monitor.html +++ b/landcoverportal/templates/panels/side-panel-forest-monitor.html @@ -67,7 +67,7 @@
Tree height greater than (meters)
  • Tree Canopy Cover for

    -
    @@ -120,7 +120,7 @@
    Tree height greater than (meters)
  • Tree Canopy Height for

    -
    @@ -170,7 +170,7 @@
    Tree height greater than (meters)
  • Annual Forest Extend for

    -
    @@ -230,7 +230,7 @@
    Tree height greater than (meters)
  • Primary Forest

    -
    @@ -309,18 +309,18 @@
    Area greater than (hectares)
  • -->
  • - Forest Gain + Forest Gain

    From
    -
    To
    -
    @@ -375,18 +375,18 @@
    Area greater than (hectares)
  • - Forest Loss + Forest Loss

    From
    -
    To
    -
    diff --git a/landcoverportal/templates/panels/side-panel-myanmar-national.html b/landcoverportal/templates/panels/side-panel-myanmar-national.html index fdc763f..2b10c18 100644 --- a/landcoverportal/templates/panels/side-panel-myanmar-national.html +++ b/landcoverportal/templates/panels/side-panel-myanmar-national.html @@ -4,7 +4,7 @@

    Sign in with Google

    (to download data to your Google drive)
    - +

    [[emailID]]

    - \ No newline at end of file + diff --git a/myanmar_fra/core.py b/myanmar_fra/core.py index e8a2ad0..dca142b 100644 --- a/myanmar_fra/core.py +++ b/myanmar_fra/core.py @@ -35,8 +35,9 @@ class MyanmarFRA(): ] # geometries - MEKONG_FEATURE_COLLECTION = ee.FeatureCollection('ft:1tdSwUL7MVpOauSgRzqVTOwdfy17KDbw-1d9omPw') - DEFAULT_GEOM = MEKONG_FEATURE_COLLECTION.filter(ee.Filter.inList('Country', ['Myanmar (Burma)'])).geometry() + + MEKONG_FEATURE_COLLECTION = ee.FeatureCollection('users/biplov/Mekong') + DEFAULT_GEOM = MEKONG_FEATURE_COLLECTION.filter(ee.Filter.inList('NAME_0', ['Myanmar'])).geometry() # Class and Index LANDCOVERCLASSES = [ @@ -143,7 +144,7 @@ def __init__(self, area_path, area_name, shape, geom, radius, center): if (area_name == 'Myanmar'): area_name = 'Myanmar (Burma)' self.geometry = MyanmarFRA.MEKONG_FEATURE_COLLECTION.filter(\ - ee.Filter.inList('Country', [area_name])).geometry() + ee.Filter.inList('NAME_0', [area_name])).geometry() elif (area_path == 'province'): if settings.DEBUG: path = os.path.join(os.path.dirname(os.path.dirname(__file__)), @@ -225,7 +226,7 @@ def get_landcover(self, classes=range(0, 11), year=2017, download=False): return { 'eeMapId': str(map_id['mapid']), - 'eeMapToken': str(map_id['token']) + 'eeMapURL': str(map_id['tile_fetcher'].url_format) } # ------------------------------------------------------------------------- @@ -258,7 +259,7 @@ def get_primitive(self, index=0, year=2017, download=False): return { 'eeMapId': str(map_id['mapid']), - 'eeMapToken': str(map_id['token']) + 'eeMapURL': str(map_id['tile_fetcher'].url_format) } # ------------------------------------------------------------------------- diff --git a/myanmar_ipcc/core.py b/myanmar_ipcc/core.py index f9b6917..e5d34d5 100644 --- a/myanmar_ipcc/core.py +++ b/myanmar_ipcc/core.py @@ -34,8 +34,8 @@ class MyanmarIPCC(): ] # geometries - MEKONG_FEATURE_COLLECTION = ee.FeatureCollection('ft:1tdSwUL7MVpOauSgRzqVTOwdfy17KDbw-1d9omPw') - DEFAULT_GEOM = MEKONG_FEATURE_COLLECTION.filter(ee.Filter.inList('Country', ['Myanmar (Burma)'])).geometry() + MEKONG_FEATURE_COLLECTION = ee.FeatureCollection('users/biplov/Mekong') + DEFAULT_GEOM = MEKONG_FEATURE_COLLECTION.filter(ee.Filter.inList('NAME_0', ['Myanmar'])).geometry() # Class and Index LANDCOVERCLASSES = [ @@ -234,7 +234,7 @@ def get_landcover(self, classes=range(0, 11), year=2017, download=False): return { 'eeMapId': str(map_id['mapid']), - 'eeMapToken': str(map_id['token']) + 'eeMapURL': str(map_id['tile_fetcher'].url_format) } # ------------------------------------------------------------------------- @@ -242,7 +242,7 @@ def get_primitive(self, index=0, year=2017, download=False): primitive_img_coll = MyanmarIPCC.PRIMITIVES[index] - image_collection = primitive_img_coll.filterDate('%s-01-01' % year, + image_collection = primitive_img_coll.filterDate('%s-01-01' % year, '%s-12-31' % year) if image_collection.size().getInfo() > 0: image = ee.Image(image_collection.mean()) @@ -267,7 +267,7 @@ def get_primitive(self, index=0, year=2017, download=False): return { 'eeMapId': str(map_id['mapid']), - 'eeMapToken': str(map_id['token']) + 'eeMapURL': str(map_id['tile_fetcher'].url_format) } # ------------------------------------------------------------------------- @@ -346,7 +346,7 @@ def download_to_drive(self, print ('past %d seconds' % (i * settings.EE_TASK_POLL_FREQUENCY)) i += 1 time.sleep(settings.EE_TASK_POLL_FREQUENCY) - + # Make a copy (or copies) in the user's Drive if the task succeeded state = task.status()['state'] if state == ee.batch.Task.State.COMPLETED: diff --git a/myanmar_national/core.py b/myanmar_national/core.py index 18847b6..4533da1 100644 --- a/myanmar_national/core.py +++ b/myanmar_national/core.py @@ -34,8 +34,8 @@ class MyanmarNational(): ] # geometries - MEKONG_FEATURE_COLLECTION = ee.FeatureCollection('ft:1tdSwUL7MVpOauSgRzqVTOwdfy17KDbw-1d9omPw') - DEFAULT_GEOM = MEKONG_FEATURE_COLLECTION.filter(ee.Filter.inList('Country', ['Myanmar (Burma)'])).geometry() + MEKONG_FEATURE_COLLECTION = ee.FeatureCollection('users/biplov/Mekong') + DEFAULT_GEOM = MEKONG_FEATURE_COLLECTION.filter(ee.Filter.inList('NAME_0', ['Myanmar'])).geometry() # Class and Index LANDCOVERCLASSES = [ @@ -198,7 +198,7 @@ def get_landcover(self, classes=range(0, 11), year=2017, download=False): return { 'eeMapId': str(map_id['mapid']), - 'eeMapToken': str(map_id['token']) + 'eeMapURL': str(map_id['tile_fetcher'].url_format) } # ------------------------------------------------------------------------- @@ -206,7 +206,7 @@ def get_primitive(self, index=0, year=2017, download=False): primitive_img_coll = MyanmarNational.PRIMITIVES[index] - image_collection = primitive_img_coll.filterDate('%s-01-01' % year, + image_collection = primitive_img_coll.filterDate('%s-01-01' % year, '%s-12-31' % year) if image_collection.size().getInfo() > 0: image = ee.Image(image_collection.mean()) @@ -231,7 +231,7 @@ def get_primitive(self, index=0, year=2017, download=False): return { 'eeMapId': str(map_id['mapid']), - 'eeMapToken': str(map_id['token']) + 'eeMapURL': str(map_id['tile_fetcher'].url_format) } # ------------------------------------------------------------------------- @@ -307,7 +307,7 @@ def download_to_drive(self, print ('past %d seconds' % (i * settings.EE_TASK_POLL_FREQUENCY)) i += 1 time.sleep(settings.EE_TASK_POLL_FREQUENCY) - + # Make a copy (or copies) in the user's Drive if the task succeeded state = task.status()['state'] if state == ee.batch.Task.State.COMPLETED: diff --git a/myanmar_plantation/core.py b/myanmar_plantation/core.py index 0290e5e..49e7c1e 100644 --- a/myanmar_plantation/core.py +++ b/myanmar_plantation/core.py @@ -39,8 +39,8 @@ class MyanmarPlantation(): ] # geometries - MEKONG_FEATURE_COLLECTION = ee.FeatureCollection('ft:1tdSwUL7MVpOauSgRzqVTOwdfy17KDbw-1d9omPw') - DEFAULT_GEOM = MEKONG_FEATURE_COLLECTION.filter(ee.Filter.inList('Country', ['Myanmar (Burma)'])).geometry() + MEKONG_FEATURE_COLLECTION = ee.FeatureCollection('users/biplov/Mekong') + DEFAULT_GEOM = MEKONG_FEATURE_COLLECTION.filter(ee.Filter.inList('NAME_0', ['Myanmar'])).geometry() # Class and Inde MAP_CLASSES = [ @@ -147,7 +147,8 @@ def _get_geometry(self, shape): return ee.Geometry.Polygon(coor_list).convexHull() return ee.Geometry.Polygon(coor_list) - return MyanmarPlantation.DEFAULT_GEOM.buffer(10000) + # return MyanmarPlantation.DEFAULT_GEOM.buffer(10000) + return MyanmarPlantation.DEFAULT_GEOM # ------------------------------------------------------------------------- def get_landcover(self, classes=range(0, 11), year=2018, download=False): @@ -192,7 +193,7 @@ def get_landcover(self, classes=range(0, 11), year=2018, download=False): return { 'eeMapId': str(map_id['mapid']), - 'eeMapToken': str(map_id['token']) + 'eeMapURL': str(map_id['tile_fetcher'].url_format) } # ------------------------------------------------------------------------- @@ -323,7 +324,7 @@ def get_probability(self, year=2018, download=False): }) return { 'eeMapId': str(map_id['mapid']), - 'eeMapToken': str(map_id['token']) + 'eeMapURL': str(map_id['tile_fetcher'].url_format) } # ------------------------------------------------------------------------- @@ -347,7 +348,7 @@ def get_composite(self, year=2018): return { 'eeMapId': str(map_id['mapid']), - 'eeMapToken': str(map_id['token']) + 'eeMapURL': str(map_id['tile_fetcher'].url_format) } # END =========================================================================