Ejemplo n.º 1
0
    scene = options.scene.split("_")[0]

    mndwi_file = "mndwi.tif"
    ndbi_file = "ndbi.tif"
    ndvi_file = "ndvi.tif"
    savi_file = "savi.tif"
    output_file = "watermap.tif"

    cloud_mask_file = outdir + "/cloud_mask.tif"

    output_file_4326 = outdir + "/watermap_4326.tif"

    if verbose:
        print "output_file", output_file

    app = EO1_ALI_L1T(outdir, options.scene, verbose)

    if verbose:
        print "Loading green band"

    green_dn = app.get_band_data(4)
    green_radiance = app.radiance(4, green_dn)
    green_toa = app.toa(4, green_radiance)
    green_mask = (green_dn == 0)

    if verbose:
        print "Loading mir band"

    mir_dn = app.get_band_data(9)
    mir_radiance = app.radiance(9, mir_dn)
    mir_toa = app.toa(9, mir_radiance)
Ejemplo n.º 2
0
                           help="Forces new product to be generated")
    apg_input.add_argument("-v",
                           "--verbose",
                           action='store_true',
                           help="Verbose on/off")
    apg_input.add_argument("-s", "--scene", help="EO-1 Scene")

    options = parser.parse_args()
    force = options.force
    verbose = options.verbose
    scene = options.scene

    outdir = os.path.join(config.EO1_DIR, scene)
    scene = options.scene.split("_")[0]

    app = EO1_ALI_L1T(outdir, scene)

    print "Loading band 2"

    dn = app.get_band_data(2)
    radiance = app.radiance(2, dn)
    toa = app.toa(2, radiance)
    toa[dn == 0] = 0

    mult = 0.9

    output_file = "cum_toa_" + str(mult) + ".tif"

    for i in range(3, 10):
        print "Loading band", i
        dn_i = app.get_band_data(i)
Ejemplo n.º 3
0
    scene = options.scene.split("_")[0]

    mndwi_file = "mndwi.tif"
    ndbi_file = "ndbi.tif"
    ndvi_file = "ndvi.tif"
    savi_file = "savi.tif"
    output_file = "watermap.tif"

    cloud_mask_file = outdir + "/cloud_mask.tif"

    output_file_4326 = outdir + "/watermap_4326.tif"

    if verbose:
        print "output_file", output_file

    app = EO1_ALI_L1T(outdir, scene, verbose)

    if verbose:
        print "Loading green band"

    green_dn = app.get_band_data(4)
    green_radiance = app.radiance(4, green_dn)
    green_toa = app.toa(4, green_radiance)
    green_mask = (green_dn == 0)

    if verbose:
        print "Loading mir band"

    mir_dn = app.get_band_data(9)
    mir_radiance = app.radiance(9, mir_dn)
    mir_toa = app.toa(9, mir_radiance)