Ejemplo n.º 1
0
def hillshade_generator():
    arcpy.env.workspace = "C:\\Users\\michal\\Desktop\\_BP"
    arcpy.env.overwriteOutput = 1
    print("Creating list of DEM files...")
    dem_pasy2 = []
    for root, dirs, files in os.walk(
            r'C:\Users\michal\Desktop\_BP\gis\las_pasy_dem\arcgis\full'):
        for file in files:
            if file.endswith('_dem.tif'):
                pas = ("gis\\las_pasy_dem\\arcgis\\full\\" + file,
                       "gis\\las_pasy_dem\\arcgis\\full\\hillshade\\" +
                       file[:-8] + "_hillshade.tif",
                       "gis\\las_pasy_dem\\arcgis\\area_n81\\hillshade\\" +
                       file[:-8] + "_area81_hillshade.tif")
                dem_pasy2.append(pas)
    print("List of DEM files created!")

    for dem in dem_pasy2:
        print("Generating hillshade: ", dem[0])
        arcpy.env.snapRaster = "Krkonose\\2019_06_14_Lucni_2_DSM.tif"
        arcpy.env.cellSize = "Krkonose\\2019_06_14_Lucni_2_DSM.tif"
        arcpy.env.extent = "MAXOF"
        arcpy.HillShade_3d(dem[0], dem[1])
        arcpy.env.extent = "Krkonose\\area_n81.shp"
        arcpy.HillShade_3d(dem[0], dem[2])
        print("Done!")
Ejemplo n.º 2
0
def make_topo_layers(topo_folder):
    """
    Writes the layers
    :param topo_folder: We want to make layers for the stuff in this folder
    :return:
    """
    source_code_folder = os.path.dirname(os.path.abspath(__file__))
    symbology_folder = os.path.join(source_code_folder, 'BRATSymbology')
    dem_symbology = os.path.join(symbology_folder, "DEM.lyr")
    slope_symbology = os.path.join(symbology_folder, "Slope.lyr")
    hillshade_symbology = os.path.join(symbology_folder, "Hillshade.lyr")

    for folder in os.listdir(topo_folder):
        dem_folder_path = os.path.join(topo_folder, folder)
        dem_file = None
        for file_name in os.listdir(dem_folder_path):
            if file_name.endswith(".tif"):
                dem_file = os.path.join(dem_folder_path, file_name)
                make_layer(dem_folder_path,
                           dem_file,
                           "DEM",
                           dem_symbology,
                           is_raster=True)

        hillshade_folder = make_folder(dem_folder_path, "Hillshade")
        hillshade_file = os.path.join(hillshade_folder, "Hillshade.tif")
        try:
            arcpy.HillShade_3d(dem_file, hillshade_file)
            make_layer(hillshade_folder,
                       hillshade_file,
                       "Hillshade",
                       hillshade_symbology,
                       is_raster=True)
        except arcpy.ExecuteError as err:
            if get_execute_error_code(err) == "000859":
                arcpy.AddWarning(
                    "Warning: Unable to create hillshade layer. Consider modifying your DEM input if you need a hillshade."
                )
            else:
                raise arcpy.ExecuteError(err)

        slope_folder = make_folder(dem_folder_path, "Slope")
        slope_file = os.path.join(slope_folder, "Slope.tif")
        try:
            out_slope = arcpy.sa.Slope(dem_file)
            out_slope.save(slope_file)
            make_layer(slope_folder,
                       slope_file,
                       "Slope",
                       slope_symbology,
                       is_raster=True)
        except arcpy.ExecuteError as err:
            if get_execute_error_code(err) == "000859":
                arcpy.AddWarning(
                    "Warning: Unable to create hillshade layer. Consider modifying your DEM input if you need a hillshade."
                )
            else:
                raise arcpy.ExecuteError(err)
Ejemplo n.º 3
0
    def calculateShadow(self):
        """
        Program description: 

        INPUT_PARAMETERS:
        inputValue_      - 

        COMMENTS:
        """

        #arcpy.CheckOutExtension("3D")

        print "Start creating shadow image..."

        inFileName = tkFileDialog.askopenfilename(
            defaultextension='TIFF',
            filetypes=[('ERDAS IMAGINE', '*.img'), ('TIFF', '*.tif')],
            initialdir=self.workspace,
            initialfile=INITFILE_DEM,
            multiple=False,
            parent=tkRoot,
            title=
            'Chose input elevation raster file for processing shadow (ArcPy)')
        inFile = sa.Raster(inFileName)

        #Determine Shadow Area: Spatial Analyst Tools --> Solar Radiation: Area Solar Radiation
        #--> Not applicable here

        #3D Anaylist Tools --> Raster Surface: HillShade
        azimuth = float(143.1156527)  #SUN_AZIMUTH from Landsat
        altitude = float(51.2588465)  #SUN_ELEVATION from Landsat
        outFileName = "out_shadow.tif"  # Problem length of filename!

        arcpy.HillShade_3d(inFile, outFileName, azimuth, altitude, "SHADOWS",
                           1)

        print "Hillshade shadow image '" + str(
            outFileName) + "' with azimut '" + str(
                azimuth) + "' and altitude '" + str(altitude) + "' created."

        return
Ejemplo n.º 4
0
def makeTopoLayers(topoFolder):
    """
    Writes the layers
    :param topoFolder: We want to make layers for the stuff in this folder
    :return:
    """
    sourceCodeFolder = os.path.dirname(os.path.abspath(__file__))
    symbologyFolder = os.path.join(sourceCodeFolder, 'BRATSymbology')
    demSymbology = os.path.join(symbologyFolder, "DEM.lyr")
    slopeSymbology = os.path.join(symbologyFolder, "Slope.lyr")
    layers = []

    for folder in os.listdir(topoFolder):
        demFolderPath = os.path.join(topoFolder, folder)
        demFile = None
        for fileName in os.listdir(demFolderPath):
            if fileName.endswith(".tif"):
                demFile = os.path.join(demFolderPath, fileName)
                layers.append(
                    makeLayer(demFolderPath,
                              demFile,
                              os.path.basename(demFile),
                              demSymbology,
                              isRaster=True))

        hillshadeFolder = makeFolder(demFolderPath, "Hillshade")
        hillshadeFile = os.path.join(hillshadeFolder, "Hillshade.tif")
        arcpy.HillShade_3d(demFile, hillshadeFile)
        makeLayer(hillshadeFolder, hillshadeFile, "Hillshade", isRaster=True)

        slopeFolder = makeFolder(demFolderPath, "Slope")
        slopeFile = os.path.join(slopeFolder, "Slope.tif")
        outSlope = arcpy.sa.Slope(demFile)
        outSlope.save(slopeFile)
        makeLayer(slopeFolder,
                  slopeFile,
                  "Slope",
                  slopeSymbology,
                  isRaster=True)
Ejemplo n.º 5
0
#PolyMask = str(workspaceGDB + "\\" + "Seg_" + inSegment + "_" + inYear + "_" + CellSizeName + "_mask_poly")
PolyMask = str(workspaceGDB + "\\" + "Seg_" + inSegment + "_" + inYear + "_" + CellSizeName + "_mask_poly")
arcpy.AddMessage("output polygon mask: " + PolyMask)
arcpy.AddMessage(PolyMask)

arcpy.RasterToPolygon_conversion(RasterMaskInt, PolyMask, "NO_SIMPLIFY", "Value")
#
###############################################
# Create hillshade
#
azimuth = 315
altitude = 45
modelShadows = "NO_SHADOWS"
zFactor = 1
outHillshade = str(outFolder + "\\" + "Seg_" + inSegment + "_" + inYear + "_" + CellSizeName + "_hillshade.tif")
arcpy.HillShade_3d(outRaster, outHillshade, azimuth, altitude, modelShadows, zFactor)

###############################################
#
## Create data source polygon file and source raster file
#
# copy mb boundary to workspace gdb and assign short name
inMBbasename = os.path.basename(inMBboundary)
MBboundaryCopy = str(workspaceGDB + "\\" + inMBbasename)
arcpy.CopyFeatures_management(inMBboundary, MBboundaryCopy)
inMBbdy = os.path.basename(MBboundaryCopy)
# assign short name to poly mask
inPolyMask = os.path.basename(PolyMask)
# copy topo boundary and assign short name
TopoBoundaryFC = str(workspaceGDB + "\\" + "TopoBND_Seg_" + inSegment + "_" + inYear)
arcpy.CopyFeatures_management(inTopoBoundaryShape, TopoBoundaryFC)
Ejemplo n.º 6
0
import arcpy
from arcpy import env

try:
    if arcpy.CheckExtension("3D") == "Available":
        arcpy.CheckOutExtension("3D")
    else:
        #Raise a custom exception
        raise LicenseError

    env.workspace = "D:/GrosMorne"
    arcpy.HillShade_3d("WesternBrook", "westbrook_hill", 300)
    arcpy.Aspect_3d("WesternBrook", "westbrook_aspect")

except LicenseError:
    print "3D Analyst license is unavailable"
except:
    print arcpy.GetMessages(2)
finally:
    # Check in the 3D Analyst extension
    arcpy.CheckInExtension("3D")
Ejemplo n.º 7
0
#Check out extensions
arcpy.CheckOutExtension("Spatial")
arcpy.CheckOutExtension("3D")

arcpy.env.workspace = gdbworkspace

#convert img to TIFFs with elevation raster in feet and hillshade
elev = arcpy.ListRasters("img*")
for raster in elev:
    rasterObject = arcpy.Describe(raster)
    name = rasterObject.basename
    elevFeet = published_data + park_name + "_elev_feet.tif"
    hillshade = published_data + park_name + "_hillshade.tif"
    r1 = arcpy.sa.Raster(raster) * 3.281
    r1.save(elevFeet)
    arcpy.HillShade_3d(elevFeet, hillshade, 270, 55)

################# EXTRA: Create NDVI and canopy layer #################

print """############# Creating NDVI and canopy rasters as TIFFs ############# """

#Create NDVI (extra stuff)
naip = arcpy.ListRasters("NAIP*")
for raster in naip:
    rasterObject = arcpy.Describe(raster)
    name = rasterObject.basename
    print name
    RedBand = published_data + rasterObject.basename + "_1.tif"
    NIRBand = published_data + rasterObject.basename + "_4.tif"
    compRed = rasterObject.catalogPath + "/Band_1"
    print "Extracting Near Infrared Band to {0}".format(RedBand)
Ejemplo n.º 8
0
# This sets the workspace and shows the raster files in the database
try:
    arcpy.env.workspace = geodatabase
    rasterList = arcpy.ListRasters()
    print ("Raster: ", rasterList)
except:
    print("Not a valid database")
arcpy.env.overwriteOutput = True

# This asks the user to choose what layer they want to use to create the hillshade
in_raster = input("Please choose what Raster Layer you want to use: ")

# This defines the variables that will be used to create the hillshade
out_dir = geodatabase
i = 90
azimuth = 90
altitude = 55

# This creates a while loop that will create the 3 hillshades
# The loop will run as long as azimuth is less that 271
while azimuth < 271:
    # This determines what the hillshade output will be called
    out_raster = "hillshade" + str(i)
    print("Creating hillshade from " + in_raster + " ...")
    # This runs the arcpy hillshade function
    arcpy.HillShade_3d(in_raster, out_raster, azimuth, altitude, "SHADOWS", 1)
    # This adds 90 to the variabke azimuth
    azimuth += 90
    # This adds 90 to the variable i
    i += 90
Ejemplo n.º 9
0
polygon = arcpy.Polygon(arcpy.Array(boundaryPoints))
arcpy.CreateFeatureclass_management(arcpy.env.workspace,
                                    name + '_Boundary.shp', 'POLYGON', polygon)
arcpy.CopyFeatures_management(polygon, name + '_Boundary.shp')
arcpy.AddMessage(name + '_Boundary.shp generated.')

# Create TIN based on topo data and boundary
arcpy.CreateTin_3d(name + '_TIN')
arcpy.EditTin_3d(
    name + '_TIN',
    [[name + '_Points.shp', 'Z', '<None>', 'Mass_Points', False],
     [name + '_Boundary.shp', '<None>', '<None>', 'Soft_Clip', False]])
arcpy.AddMessage(name + '_TIN generated.')

# Create raster out of TIN
arcpy.TinRaster_3d(name + '_TIN',
                   name + '_Raster.tif',
                   'FLOAT',
                   'LINEAR',
                   sample_distance='CELLSIZE {}'.format(cellsize),
                   z_factor=1)
arcpy.AddMessage(name + '_Raster.tif generated.')

# Create hillshade out of raster
arcpy.HillShade_3d(name + '_Raster.tif',
                   name + '_Hillshade.tif',
                   azimuth,
                   altitude,
                   z_factor=1)
arcpy.AddMessage(name + '_Hillshade.tif generated.')
Ejemplo n.º 10
0
Flow_Velocity = r"C:\Users\NReid\Documents\ArcGIS\Projects\TrailProjectModel\modelData.gdb\MaxFlow_Vel"
TC_Reclas_in = r"C:\Users\NReid\Documents\ArcGIS\Projects\TrailProjectModel\modelData.gdb\TC_Reclassify"
TrailPT_OVel = r"C:\Users\NReid\Documents\ArcGIS\Projects\TrailProjectModel\modelData.gdb\Excess_Vel"
Point_Vel = r"C:\Users\NReid\Documents\ArcGIS\Projects\TrailProjectModel\modelData.gdb\Velocity_pt"

    # Process: Fill - works
fill = arcpy.sa.Fill(DEM)
fill.save(Fill_DEM)
print ("Fill complete.")

    # Process: Flow Direction - works
flow = arcpy.gp.FlowDirection_sa(Fill_DEM, DEM_FlowDir, "Normal", "D8")
print ("Flow Direction complete.")

    # Process: Hillshade - works
hshade = arcpy.HillShade_3d(Fill_DEM, Hillshade, "315", "45", "NO_SHADOWS", "1")
print ("Hillshade complete.")

     # Process: Slope Raster
slope = arcpy.Slope_3d(Fill_DEM, Slope_Percent, "PERCENT_RISE", 0.3048, "PLANAR", "")
print ("Slope Raster complete.")

     # Process: Aspect Raster
aspect = arcpy.sa.Aspect(Fill_DEM, "PLANAR", "")
aspect.save (DEM_Aspect)
print ("Aspect Raster complete.")

    # Process: Raster Domain - works
arcpy.RasterDomain_3d(Fill_DEM, DEM_Domain, "POLYGON")
print ("Raster Domain complete.")
Ejemplo n.º 11
0
    def terreno(self, path):
        # Paso 1:
        # TERRENO: DEM, DIRECCION DE FLUJO, ACUMULACION, LONGITUD
        t_inputs = self.inputs()
        print('TERRENO: DEM, DIRECCION DE FLUJO, ACUMULACION, LONGITUD')

        # Crear carpeta de salidas
        print('Crear carpeta de salidas')
        os.system('md modeloFONAG\\%s' % t_inputs[16])
        os.system('md modeloFONAG\\%s\\tables' % t_inputs[16])
        env.workspace = '%s/modeloFONAG/%s' % (path, t_inputs[16])

        # Lectura de DEM y relleno de vacios
        r_DEM = arcpy.Raster('%s/modeloFONAG/inputs/%s' % (path, t_inputs[0]))
        print('Lectura DEM')
        print('%s/modeloFONAG/inputs/%s' % (path, t_inputs[0]))

        # Leer Mascara
        inMaskData = '%s/modeloFONAG/inputs/%s/%s' % (path, t_inputs[1], t_inputs[2])
        print('Lectura Mascara')
        print(inMaskData)

        # Extraer por mascara
        r_DEM_mask = ExtractByMask(r_DEM, inMaskData)
        r_DEM_mask.save('%s/modeloFONAG/%s/r_DEM_mask.tif' % (path, t_inputs[16]))
        print('Extraer por mascara')

        # Relleno de vacios
        r_SurfaceRaster = Fill(r_DEM_mask)
        r_SurfaceRaster.save('%s/modeloFONAG/%s/r_DEM_fill.tif' % (path, t_inputs[16]))
        print('Relleno de vacios')

        # Variables de entorno
        env.cellSize = '%s/modeloFONAG/%s/r_DEM_fill.tif' % (path, t_inputs[16])
        env.extent = '%s/modeloFONAG/%s/r_DEM_fill.tif' % (path, t_inputs[16])
        print('Variables de entorno')

        # Generar raster de ceros y de unos para ciertos procesos
        r_DEM_ceros = r_SurfaceRaster * 0
        r_DEM_unos = r_SurfaceRaster / r_SurfaceRaster
        # r_DEM_ceros.save('%s/modeloFONAG/%s/r_DEM_ceros.tif' % (path, t_inputs[16]))
        # r_DEM_unos.save('%s/modeloFONAG/%s/r_DEM_unos.tif' % (path, t_inputs[16]))
        print('Extraer por mascara')

        # Genera hillshade
        r_Hillshade = '%s/modeloFONAG/%s/r_DEM_shd.tif' % (path, t_inputs[16])
        arcpy.HillShade_3d(r_SurfaceRaster, r_Hillshade, z_factor=3)
        print('Generar hillshade')

        # Direccion de flujo
        r_FlowDirection = FlowDirection(r_SurfaceRaster, 'NORMAL')
        r_FlowDirection.save('%s/modeloFONAG/%s/r_DEM_dir.tif' % (path, t_inputs[16]))
        print('Direccion de flujo')

        # Acumulacion de flujo
        inWeightRaster = ''
        r_FlowAccumulation = FlowAccumulation(r_FlowDirection, inWeightRaster) + 1
        r_FlowAccumulation.save('%s/modeloFONAG/%s/r_DEM_acc.tif' % (path, t_inputs[16]))
        print('Acumulacion de flujo')

        # Area de aporte
        cellXResult = arcpy.GetRasterProperties_management(r_DEM_mask, 'CELLSIZEX')
        cellYResult = arcpy.GetRasterProperties_management(r_DEM_mask, 'CELLSIZEY')
        cellX = float(cellXResult.getOutput(0))
        cellY = float(cellYResult.getOutput(0))
        cellArea = cellX * cellY
        r_area = r_FlowAccumulation * cellArea
        r_area.save('%s/modeloFONAG/%s/r_DEM_area.tif' % (path, t_inputs[16]))
        print('Area de aporte')

        # Longitud de flujo
        r_FlowLength = FlowLength(r_FlowDirection, 'UPSTREAM', inWeightRaster)
        r_FlowLength.save('%s/modeloFONAG/%s/r_DEM_length.tif' % (path, t_inputs[16]))
        print('Longitud de flujo')
        r_LengthAccumulation = FlowAccumulation(r_FlowDirection, r_FlowLength)
        r_Length_mean = r_LengthAccumulation / r_FlowAccumulation
        r_Length_norm = (r_FlowLength + 1) / (r_Length_mean + 1)
        c_factordist = Exp(-1 * r_Length_norm)
        c_factordist.save('%s/modeloFONAG/%s/r_factordist.tif' % (path, t_inputs[16]))
        print('Factor de ponderacion por distancia')

        print('FIN DE MODULO DE TERRENO')
Ejemplo n.º 12
0
    arcpy.CreateTin_3d(output_folder + "\\tin")
    #edit tin
    arcpy.EditTin_3d(output_folder + "\\tin",
                     spot + ";" + contours + ";" + breaklines)
    #tin to raster conversion
    data_type = "FLOAT"
    interp_method = "LINEAR"
    samp_method = "CELLSIZE 10"
    factor = 1
    arcpy.TinRaster_3d(output_folder + "\\tin", output_folder + "\\grid",
                       data_type, interp_method, samp_method, factor)
    #slope computation
    arcpy.Slope_3d(output_folder + "\\grid", output_folder + "\\slope",
                   "DEGREE", 1)
    #hillshading
    arcpy.HillShade_3d()

    arcpy.CheckInExtension('3D')
else:
    print('Licence not available')

#-------------------------------------------------------------------------------
# PRINT MAPS
#-------------------------------------------------------------------------------
import arcpy
import arcpy.mapping as map

path_mxd = r"C:\DAS\SESSION4\template2.mxd"
#mxd reference
mxd = map.MapDocument(path_mxd)
Ejemplo n.º 13
0
def Model1():  # Model 1

    # To allow overwriting outputs change overwriteOutput option to True.
    arcpy.env.overwriteOutput = False

    # Check out any necessary licenses.
    arcpy.CheckOutExtension("3D")

    arcpy.ImportToolbox(r"F:\software\LAStools\ArcGIS_toolbox\LAStools.tbx")
    # Model Environment settings
    with arcpy.EnvManager(cellSize="0,05",
                          snapRaster=r"KRNAP\2019_06_14_Lucni_2_DSM.tif"):
        jtsk_pas3_area81_las_2_ = "C:\\Users\\michal\\Desktop\\_BP\\Krkonose\\LiDAR\\area_81\\jtsk_pas3_area81.las"
        grid_size = 0, 05
        keep = "lowest"
        jtsk_pas4_area81_las_2_ = "C:\\Users\\michal\\Desktop\\_BP\\Krkonose\\LiDAR\\area_81\\jtsk_pas4_area81.las"
        jtsk_pas5_area81_las = "C:\\Users\\michal\\Desktop\\_BP\\Krkonose\\LiDAR\\area_81\\jtsk_pas5_area81.las"
        jtsk_pas6_area81_las = "C:\\Users\\michal\\Desktop\\_BP\\Krkonose\\LiDAR\\area_81\\jtsk_pas6_area81.las"
        jtsk_pas7_area81_las = "C:\\Users\\michal\\Desktop\\_BP\\Krkonose\\LiDAR\\area_81\\jtsk_pas7_area81.las"
        jtsk_pas8_area81_las = "C:\\Users\\michal\\Desktop\\_BP\\Krkonose\\LiDAR\\area_81\\jtsk_pas8_area81.las"

        # Process: lasthin (lasthin)
        lasthin(input_file=jtsk_pas3_area81_las_2_,
                grid_size=grid_size,
                keep=keep,
                output_format="",
                output_file=jtsk_pas3_area81_thin_min_las,
                output_directory="",
                output_appendix="",
                additional_command - line_parameters="",
                verbose=True)

        # Process: las2dem (las2dem)
        las2dem(input_file=jtsk_pas3_area81_thin_min_las,
                step=0,
                05,
                kill_triangles_with_edges_longer_than=100,
                item="elevation",
                output="actual values",
                sun_direction_for_hillside_shading="north east",
                sun_position_for_hillside_shading="1 pm",
                set_min__for_gray_ramp_and_false_colors_=None,
                set_max__for_gray_ramp_and_false_colors_=None,
                triangulate="all points",
                use_tile_bounding_box=False,
                closed_breaklines="",
                open_breaklines="",
                output_format="tif",
                output_file=jtsk_pas3_area81_dem_tif,
                output_directory="",
                output_appendix="",
                additional_command - line_parameters="",
                verbose=True)

        # Process: HillShade (HillShade)
        jtsk_pas3_area81_hillshade_tif = "C:\\Users\\michal\\Desktop\\_BP\\gis\\las_pasy_dem\\lastools\\area_n81\\hillshade\\jtsk_pas3_area81_hillshade.tif"
        arcpy.HillShade_3d(in_raster=jtsk_pas3_area81_dem_tif,
                           out_raster=jtsk_pas3_area81_hillshade_tif,
                           azimuth=315,
                           altitude=45,
                           model_shadows="NO_SHADOWS",
                           z_factor=1)

        # Process: lasthin (2) (lasthin)
        lasthin(input_file=jtsk_pas4_area81_las_2_,
                grid_size=grid_size,
                keep=keep,
                output_format="",
                output_file=jtsk_pas4_area81_thin_min_las,
                output_directory="",
                output_appendix="",
                additional_command - line_parameters="",
                verbose=True)

        # Process: las2dem (2) (las2dem)
        las2dem(input_file=jtsk_pas4_area81_thin_min_las,
                step=0,
                05,
                kill_triangles_with_edges_longer_than=100,
                item="elevation",
                output="actual values",
                sun_direction_for_hillside_shading="north east",
                sun_position_for_hillside_shading="1 pm",
                set_min__for_gray_ramp_and_false_colors_=None,
                set_max__for_gray_ramp_and_false_colors_=None,
                triangulate="all points",
                use_tile_bounding_box=False,
                closed_breaklines="",
                open_breaklines="",
                output_format="tif",
                output_file=jtsk_pas4_area81_dem_tif,
                output_directory="",
                output_appendix="",
                additional_command - line_parameters="",
                verbose=True)

        # Process: HillShade (2) (HillShade)
        jtsk_pas4_area81_hillshade_tif = "C:\\Users\\michal\\Desktop\\_BP\\gis\\las_pasy_dem\\lastools\\area_n81\\hillshade\\jtsk_pas4_area81_hillshade.tif"
        arcpy.HillShade_3d(in_raster=jtsk_pas4_area81_dem_tif,
                           out_raster=jtsk_pas4_area81_hillshade_tif,
                           azimuth=315,
                           altitude=45,
                           model_shadows="NO_SHADOWS",
                           z_factor=1)

        # Process: lasthin (3) (lasthin)
        lasthin(input_file=jtsk_pas5_area81_las,
                grid_size=grid_size,
                keep=keep,
                output_format="",
                output_file=jtsk_pas5_area81_thin_min_las,
                output_directory="",
                output_appendix="",
                additional_command - line_parameters="",
                verbose=True)

        # Process: las2dem (3) (las2dem)
        las2dem(input_file=jtsk_pas5_area81_thin_min_las,
                step=0,
                05,
                kill_triangles_with_edges_longer_than=100,
                item="elevation",
                output="actual values",
                sun_direction_for_hillside_shading="north east",
                sun_position_for_hillside_shading="1 pm",
                set_min__for_gray_ramp_and_false_colors_=None,
                set_max__for_gray_ramp_and_false_colors_=None,
                triangulate="all points",
                use_tile_bounding_box=False,
                closed_breaklines="",
                open_breaklines="",
                output_format="tif",
                output_file=jtsk_pas5_area81_dem_tif,
                output_directory="",
                output_appendix="_dem",
                additional_command - line_parameters="",
                verbose=True)

        # Process: HillShade (3) (HillShade)
        jtsk_pas5_area81_hillshade_tif = "C:\\Users\\michal\\Desktop\\_BP\\gis\\las_pasy_dem\\lastools\\area_n81\\hillshade\\jtsk_pas5_area81_hillshade.tif"
        arcpy.HillShade_3d(in_raster=jtsk_pas5_area81_dem_tif,
                           out_raster=jtsk_pas5_area81_hillshade_tif,
                           azimuth=315,
                           altitude=45,
                           model_shadows="NO_SHADOWS",
                           z_factor=1)

        # Process: lasthin (4) (lasthin)
        lasthin(input_file=jtsk_pas6_area81_las,
                grid_size=grid_size,
                keep=keep,
                output_format="",
                output_file=jtsk_pas6_area81_thin_min_las,
                output_directory="",
                output_appendix="",
                additional_command - line_parameters="",
                verbose=True)

        # Process: las2dem (4) (las2dem)
        las2dem(input_file=jtsk_pas6_area81_thin_min_las,
                step=0,
                05,
                kill_triangles_with_edges_longer_than=100,
                item="elevation",
                output="actual values",
                sun_direction_for_hillside_shading="north east",
                sun_position_for_hillside_shading="1 pm",
                set_min__for_gray_ramp_and_false_colors_=None,
                set_max__for_gray_ramp_and_false_colors_=None,
                triangulate="all points",
                use_tile_bounding_box=False,
                closed_breaklines="",
                open_breaklines="",
                output_format="tif",
                output_file=jtsk_pas6_area81_dem_tif,
                output_directory="",
                output_appendix="_dem",
                additional_command - line_parameters="",
                verbose=True)

        # Process: HillShade (4) (HillShade)
        jtsk_pas6_area81_hillshade_tif = "C:\\Users\\michal\\Desktop\\_BP\\gis\\las_pasy_dem\\lastools\\area_n81\\hillshade\\jtsk_pas6_area81_hillshade.tif"
        arcpy.HillShade_3d(in_raster=jtsk_pas6_area81_dem_tif,
                           out_raster=jtsk_pas6_area81_hillshade_tif,
                           azimuth=315,
                           altitude=45,
                           model_shadows="NO_SHADOWS",
                           z_factor=1)

        # Process: lasthin (5) (lasthin)
        lasthin(input_file=jtsk_pas7_area81_las,
                grid_size=grid_size,
                keep=keep,
                output_format="",
                output_file=jtsk_pas7_area81_thin_min_las,
                output_directory="",
                output_appendix="",
                additional_command - line_parameters="",
                verbose=True)

        # Process: las2dem (5) (las2dem)
        las2dem(input_file=jtsk_pas7_area81_thin_min_las,
                step=0,
                05,
                kill_triangles_with_edges_longer_than=100,
                item="elevation",
                output="actual values",
                sun_direction_for_hillside_shading="north east",
                sun_position_for_hillside_shading="1 pm",
                set_min__for_gray_ramp_and_false_colors_=None,
                set_max__for_gray_ramp_and_false_colors_=None,
                triangulate="all points",
                use_tile_bounding_box=False,
                closed_breaklines="",
                open_breaklines="",
                output_format="tif",
                output_file=jtsk_pas7_area81_dem_tif,
                output_directory="",
                output_appendix="_dem",
                additional_command - line_parameters="",
                verbose=True)

        # Process: HillShade (5) (HillShade)
        jtsk_pas7_area81_hillshade_tif = "C:\\Users\\michal\\Desktop\\_BP\\gis\\las_pasy_dem\\lastools\\area_n81\\hillshade\\jtsk_pas7_area81_hillshade.tif"
        arcpy.HillShade_3d(in_raster=jtsk_pas7_area81_dem_tif,
                           out_raster=jtsk_pas7_area81_hillshade_tif,
                           azimuth=315,
                           altitude=45,
                           model_shadows="NO_SHADOWS",
                           z_factor=1)

        # Process: lasthin (6) (lasthin)
        lasthin(input_file=jtsk_pas8_area81_las,
                grid_size=grid_size,
                keep=keep,
                output_format="",
                output_file=jtsk_pas8_area81_thin_min_las,
                output_directory="",
                output_appendix="",
                additional_command - line_parameters="",
                verbose=True)

        # Process: las2dem (6) (las2dem)
        las2dem(input_file=jtsk_pas8_area81_thin_min_las,
                step=0,
                05,
                kill_triangles_with_edges_longer_than=100,
                item="elevation",
                output="actual values",
                sun_direction_for_hillside_shading="north east",
                sun_position_for_hillside_shading="1 pm",
                set_min__for_gray_ramp_and_false_colors_=None,
                set_max__for_gray_ramp_and_false_colors_=None,
                triangulate="all points",
                use_tile_bounding_box=False,
                closed_breaklines="",
                open_breaklines="",
                output_format="tif",
                output_file=jtsk_pas8_area81_dem_tif,
                output_directory="",
                output_appendix="_dem",
                additional_command - line_parameters="",
                verbose=True)

        # Process: HillShade (6) (HillShade)
        jtsk_pas8_area81_hillshade_tif = "C:\\Users\\michal\\Desktop\\_BP\\gis\\las_pasy_dem\\lastools\\area_n81\\hillshade\\jtsk_pas8_area81_hillshade.tif"
        arcpy.HillShade_3d(in_raster=jtsk_pas8_area81_dem_tif,
                           out_raster=jtsk_pas8_area81_hillshade_tif,
                           azimuth=315,
                           altitude=45,
                           model_shadows="NO_SHADOWS",
                           z_factor=1)

        # Process: lasmerge (lasmerge)
        jtsk_pas3_8_area81_las = "C:\\Users\\michal\\Desktop\\_BP\\Krkonose\\LiDAR\\area_81\\jtsk_pas3-8_area81.las"
        lasmerge(input_file_1=jtsk_pas3_area81_las_2_,
                 input_file_2=jtsk_pas4_area81_las_2_,
                 input_file_3=jtsk_pas5_area81_las,
                 input_file_4=jtsk_pas6_area81_las,
                 input_file_5=jtsk_pas7_area81_las,
                 input_file_6=jtsk_pas8_area81_las,
                 input_file_7="",
                 input_file_8="",
                 input_file_9="",
                 output_file=jtsk_pas3_8_area81_las,
                 additional_command - line_parameters="",
                 verbose=True)