POST
|
I don't think it allready has a function applied. The only thing I did was using raster algebra (Minus, Plus, Divide) on two bands of sentinel 2 imagery. Wouldn't know how to apply a function to this raster by just using Python;
... View more
07-11-2017
11:10 AM
|
0
|
2
|
1158
|
POST
|
Hello Dan, when I run the script (in PyScripter) it eventually gets an error. It says: ExecuteError: Failed to execute. Parameters are not valid. ERROR 000814: Invalid file type. Failed to execute (EditRasterFunction). This is the script where I only try the Binary threshold function : import arcpy # Set workspace dir = r"C:\Users\Thomas\Documents\School\Masterproef\Python\Deel 1" arcpy.env.workspace = dir arcpy.env.overwriteOutput = True if (arcpy.CheckExtension('Spatial') == 'Available'): arcpy.CheckOutExtension('Spatial') from arcpy.sa import * else: print "Spatial analyst extension not available" from arcpy.sa import * # Mappen Variabelen Banden = dir + r"\Banden" Resultaten = dir + r"\Resultaten" # Gebruikte bestanden variabelen Band3 = Banden + r"\B03.jp2" Band8 = Banden + r"\B08.jp2" Binary_Thresholding_Function = Resultaten + r"\Raster Function Temlate.rft" NDWI1 = dir + r"\NDWI1.tif" arcpy.EditRasterFunction_management(NDWI1, "EDIT_MOSAIC_DATASET", "INSERT", Binary_Thresholding_Function, "Binary Thresholding function") I hope this makes things clearer. Thanks in advance!
... View more
07-06-2017
10:13 AM
|
0
|
4
|
1158
|
POST
|
Yes, that function indeed. I need it for mapping water bodies after performing a Normalized Difference Water Index using 2 rasters (band 3 & Band 8 from sentinel 2 imagery). I found the Syntax code here: Edit Raster Function—Data Management toolbox | ArcGIS Desktop . I filled it in like this: Binary_Thresholding_Function = Resultaten + r"\Raster Function Temlate.rft" arcpy.EditRasterFunction_management(NDWI1, "EDIT_MOSAIC_DATASET", "INSERT", Binary_Thresholding_Function, "Binary Thresholding function") Where NDWI1 is the result after applying the Normalized Difference Water Index. For the Binary_Thresholding_Function I've exported a template for the function using it manually in Arcmap itself.
... View more
07-05-2017
11:47 AM
|
0
|
6
|
1158
|
POST
|
I've been trying to apply the Binary Threshold function from ArcGIS/ArcMap in Python but I can't seem to get it right. I've been trying with arcpy.EditRasterFunction_management. Does anyone know how to get this right? Thanks in Advance!
... View more
07-05-2017
09:59 AM
|
0
|
8
|
2382
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|