def GetPolygonTimeSeries(polygon_id,mypath,ref_start,ref_end,series_start,series_end):
"""Returns details about the polygon with the passed-in ID."""
#details = memcache.get(polygon_id)
# If we've cached details for this polygon, return them.
#if details is not None:
# return details
details = {}
try:
details['timeSeries'] = ComputePolygonTimeSeries(polygon_id,mypath,ref_start,ref_end,series_start,series_end)
# Store the results in memcache.
#memcache.add(polygon_id, json.dumps(details), MEMCACHE_EXPIRATION)
except ee.EEException as e:
# Handle exceptions from the EE client library.
details['error'] = str(e)
# Send the results to the browser.
return json.dumps(details)
评论列表
文章目录