raise ValueError('Value %s not found for %s' % (int(ID1), idfield)) mod_asym = id_parameter.mod_asym xmid = id_parameter.median lxmod = id_parameter.xmod rxmod = id_parameter.xmod lscale = id_parameter.lscale rscale = id_parameter.rscale manager.run_job(Job(NAME, batch=True, gui=True, raster1=raster1.path, raster2=raster2.path, output_raster=output_raster, raster_type='ERDAS IMAGINE', asymptote=mod_asym, xmid=xmid, lxmod=lxmod, rxmod=rxmod, lscale=lscale, rscale=rscale, debug=debugging)) except ValueError, e: arcpy.AddError(e) arcpy.AddMessage("See log file in %s for more information" % USER_DATA_DIR) except IOError, e: arcpy.AddError(e) arcpy.AddMessage("See log file in %s for more information" % USER_DATA_DIR) else:
exclude = exclude.split(",") try: if include != ['']: include = [int(value.strip()) for value in include] except ValueError, e: arcpy.AddError("Include values must be integers") try: if exclude != ['']: exclude = [int(value.strip()) for value in exclude] except ValueError, e: arcpy.AddError("Exclude values must be integers") raster_format = arcpy.GetParameterAsText(5) raster_name_tag = arcpy.GetParameterAsText(6) debugging = bool(arcpy.GetParameterAsText(7)) manager.run_job(Job(NAME, batch=True, gui=True, reference_raster=reference_raster, input_workspace=inputws, output_workspace=outws, include=include, exclude=exclude, raster_format=raster_format, raster_name_tag=raster_name_tag, debug=debugging)) else: arcpy.AddError("Could not load Zupport tool: %s" % NAME) arcpy.AddMessage("See log file in %s for more information" % USER_DATA_DIR)
# THIS MODULE SHOULD ONLY BE CALLED FROM ARCGIS TOOLBOX import arcpy from zupport.core import Job, Manager from zupport.utilities import USER_DATA_DIR NAME = "aggregate" manager = Manager() plugin = manager.get_plugin('zarcgis') if plugin and plugin.registered(NAME): manager.run_job(Job(NAME, batch=False, gui=True)) else: arcpy.AddError("Could not load Zupport tool: %s" % NAME) arcpy.AddMessage("See log file in %s for more information" % USER_DATA_DIR)
template = arcpy.GetParameterAsText(2) grouptags = arcpy.GetParameterAsText(3) grouptags = grouptags.split(";") operator = arcpy.GetParameterAsText(4) outws = arcpy.GetParameterAsText(5) # These will be None if not provided reftable_file = arcpy.GetParameterAsText(6) reftable = read_csv(reftable_file, dialect=ZCustom) reffields = (arcpy.GetParameterAsText(7), arcpy.GetParameterAsText(8)) debugging = bool(arcpy.GetParameterAsText(9)) manager.run_job(Job(NAME, batch=True, gui=True, input_workspace=inputws, wildcard=wildcard, template=template, grouptags=grouptags, operator=operator, output_workspace=outws, reference_table=reftable, reference_fields=reffields, debug=debugging)) else: arcpy.AddError("Could not load Zupport tool: %s" % NAME) arcpy.AddMessage("See log file in %s for more information" % USER_DATA_DIR)
grouptags = grouptags.split(";") operator = arcpy.GetParameterAsText(4) outws = arcpy.GetParameterAsText(5) # These will be None if not provided reftable_file = arcpy.GetParameterAsText(6) reftable = read_csv(reftable_file, dialect=ZCustom) reffields = (arcpy.GetParameterAsText(7), arcpy.GetParameterAsText(8)) debugging = bool(arcpy.GetParameterAsText(9)) manager.run_job( Job(NAME, batch=True, gui=True, input_workspace=inputws, wildcard=wildcard, template=template, grouptags=grouptags, operator=operator, output_workspace=outws, reference_table=reftable, reference_fields=reffields, debug=debugging)) else: arcpy.AddError("Could not load Zupport tool: %s" % NAME) arcpy.AddMessage("See log file in %s for more information" % USER_DATA_DIR)
mod_asym = id_parameter.mod_asym xmid = id_parameter.median lxmod = id_parameter.xmod rxmod = id_parameter.xmod lscale = id_parameter.lscale rscale = id_parameter.rscale manager.run_job( Job(NAME, batch=True, gui=True, raster1=raster1.path, raster2=raster2.path, output_raster=output_raster, raster_type='ERDAS IMAGINE', asymptote=mod_asym, xmid=xmid, lxmod=lxmod, rxmod=rxmod, lscale=lscale, rscale=rscale, debug=debugging)) except ValueError, e: arcpy.AddError(e) arcpy.AddMessage("See log file in %s for more information" % USER_DATA_DIR) except IOError, e: arcpy.AddError(e) arcpy.AddMessage("See log file in %s for more information" %