Exemplo n.º 1
0
def doRun():
    """!
    Run for command line arguments
    @return None
    """
    i = int(sys.argv[1])
    run_output = sys.argv[2]
    fire = sys.argv[3]
    e = sys.argv[4]
    prefix = sys.argv[5]
    #~ run_output = r".\test\output\APK\APK005\2018-07-02_0935"
    #~ e = "443122.86805898 5061144.31958696 453663.889141021 5066732.33076298 NaN NaN NaN NaN"
    #~ run_output = r".\test\output\NOR\NOR072\2018-07-20_0000"
    #~ e = "498242.803905737 5229238.67263711 603653.01472615 5285118.78439733 NaN NaN NaN NaN"
    #~ i = [x for x in os.listdir(run_output) if x.startswith('intensity_H') and x.endswith('.asc')][0]
    probs = [
        x for x in os.listdir(run_output)
        if x.startswith(prefix) and x[-3:] == "asc"
    ]
    prob = probs[i]
    #~ spatialReference = arcpy.Describe(os.path.join(run_output, i)).spatialReference
    extent = parseExtent(e)
    #~ extent = parseExtent(sys.argv[1])
    #~ df = summarize(run_output, extent, spatialReference)
    #~ if df is not None:
    #~ df.to_csv("TEMP.csv", index=False)
    df = summarize(
        run_output, extent,
        arcpy.Describe(os.path.join(run_output, prob)).spatialReference)
    if df is not None:
        df.to_csv(os.path.join(
            run_output,
            "{}_{}_assets.csv".format(fire, os.path.basename(run_output))),
                  index=False)
Exemplo n.º 2
0
def doRun():
    """!
    Run with command line arguments
    @return None
    """
    parser = argparse.ArgumentParser()
    parser.add_argument("fire_prefix", help="prefix to use for naming")
    parser.add_argument("run_output", help="folder that outputs are in")
    parser.add_argument("fire", help="fire that this is for")
    parser.add_argument("extent", help="extent to center map on")
    parser.add_argument("--perim", help="perimeter to show on map")
    args = parser.parse_args()
    extent = parseExtent(args.extent)
    saveFuelMXD(args.fire_prefix, args.run_output, args.fire, extent, args.perim)
Exemplo n.º 3
0
def doRun():
    """!
    Run with command line arguments
    @return None
    """
    parser = argparse.ArgumentParser()
    parser.add_argument("i", help="date index for map to make")
    parser.add_argument("run_output", help="folder that outputs are in")
    parser.add_argument("fire", help="fire that this is for")
    parser.add_argument("extent", help="extent to center map on")
    parser.add_argument("--actuals", action="store_true", help="is for actuals")
    parser.add_argument("--perim", help="perimeter to show on map")
    args = parser.parse_args()
    extent = parseExtent(args.extent)
    saveProjectionMXD(int(args.i), args.actuals, args.run_output, args.fire, extent, args.perim)