Geographic Information Systems Asked by user30985 on May 24, 2021
I would like to generate a tool in Python-Addin ArcGIS as the image attached. I also like to generate the save and load button in the tool. My purpose is that when the user chooses the range parameters and then clicks the save button, those parameters can be saved and next time if the user would like to reuse the parameter, they can load it. This is my python script but I do not know which types of python-addin should be put in my script
import arcpy, arcgisscripting,math
import pythonaddins
import pandas as pd
import os, glob
from arcpy import env
arcpy.env.overwriteOutput = True
arcpy.CheckOutExtension("Spatial")
from arcpy.sa import *
input=arcpy.GetParameterAsText(0)
range_1=arcpy.GetParameterAsText(1)
range_2=arcpy.GetParameterAsText(2)
output=arcpy.GetParameterAsText(3)
if (range_2==''):
outFocalStat = FocalStatistics(input, NbrAnnulus(range_1, range_1, "CELL"),
"MINORITY", "NODATA")
else:
outFocalStat= FocalStatistics(input, NbrAnnulus(range_2, range_2, "CELL"),
"MINORITY", "NODATA")
outFocalSat.save(output)
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP