예제 #1
0
def map1(request):
    global data
    if (request.method == "POST"):
        options = _ReadOptions(request)
        data = indices(options)

    return JsonResponse(data)
예제 #2
0
def calcdata(request):

    global data, palettedecide
    if (request.method == "POST"):
        options = _ReadOptions(request)
        print(options)
        if options["dataset"] == 'NDVI':
            palettedecide = 'NDVI'
        elif options["dataset"] == 'EVI':
            palettedecide = 'EVI'
        elif options["dataset"] == 'NDWI':
            palettedecide = 'NDWI'
        palete = palletedata(palettedecide, None)
        data = _Getcollection(options, palete)
    return JsonResponse(data)
예제 #3
0
def chart_data(request):
    try:
        global data, palettedecide
        if (request.method == "POST"):
            options = _ReadOptions(request)
            if options["dataset"] == 'NDVI':
                palettedecide = 'NDVI'
            elif options["dataset"] == 'EVI':
                palettedecide = 'EVI'
            elif options["dataset"] == 'NDWI':
                palettedecide = 'NDWI'
            palete = palletedata(palettedecide, None)
            data = chart_it(options, palete)

    except ee.EEException as e:
        data = {'error': 'Failed to Compute  Data . Error Stated::, ' + str(e)}
    return JsonResponse(data)