Hi there!
I'm doing a terrain analysis and looking to find zones in a global mosaic that are less than 10 degrees.
The area dimensions I'm interested in are 5m x 5m.
Any advice?
Searching globally for a 5x5 meter cell? What are you doing?
Does it have to be a square or do you just care about area?
This works for a simple raster. Haven't tested on a mosaic, and I'm not sure how to handle the resampling on a mosaic if the rasters have different cell sizes.
import arcpy # load the dem dem = arcpy.sa.Raster("MosaicPath") # resample to cellsize of 5m in_cell_size = dem.getRasterInfo().getCellSize() resampled_dem = arcpy.sa.Resample(dem, "Bilinear", in_cell_size, 5) # calculate slope slope = arcpy.sa.Slope(resampled_dem) # create a binary raster of slope < 10 (1) or >= 10 (0) low_slope = arcpy.sa.Con(slope, 1, 0, "VALUE < 10") # save the result low_slope.save("C:/Path/low_slope.tif")
Each cell of low_slope is 5x5 meters. Each cell with Value 1 has a slope of < 10°.
DEM:
Output:
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.