I can't figure this out. I'm trying to create a Python geoprocessing service that will be used in a web map. I have a feature class called Overhead_line that has 4 different fields- LineToLine, LineToLineToG, LineToGround, and ThreePhase.
These are types of faults that occur on our distribution network, and each field holds a fault value which can be used to pinpoint where a fault occurs.
I'm trying to create a web map that has 4 inputs-
Feeder NameFault TypeFault ValuePercentageThe output is a buffered piece of conductor- so a polygon, that represents where the fault is located based on the inputs above.
This is my Python script:
import arcpyarcpy.env.overwriteOutput = Truefeeder = str(arcpy.GetParameterAsText(0))fault_type = str(arcpy.GetParameterAsText(1))fault_value = float(arcpy.GetParameterAsText(2))percentage = float(arcpy.GetParameterAsText(3)) * 0.01low_fault = float(fault_value * (1 - percentage))high_fault = float(fault_value * (1 + percentage))overhead = "\\\\SERVER\\Data\\Electric.gdb\\Overhead_line"mem_overhead = arcpy.MakeFeatureLayer_management(overhead, "mem_overhead")arcpy.SelectLayerByAttribute_management(mem_overhead, "NEW_SELECTION", "FeederID = '{0}' AND {1} >= {2} AND {1}
These are types of faults that occur on our distribution network, and each field holds a fault value which can be used to pinpoint where a fault occurs.
I'm trying to create a web map that has 4 inputs-
Feeder NameFault TypeFault ValuePercentageThe output is a buffered piece of conductor- so a polygon, that represents where the fault is located based on the inputs above.
This is my Python script:
import arcpyarcpy.env.overwriteOutput = Truefeeder = str(arcpy.GetParameterAsText(0))fault_type = str(arcpy.GetParameterAsText(1))fault_value = float(arcpy.GetParameterAsText(2))percentage = float(arcpy.GetParameterAsText(3)) * 0.01low_fault = float(fault_value * (1 - percentage))high_fault = float(fault_value * (1 + percentage))overhead = "\\\\SERVER\\Data\\Electric.gdb\\Overhead_line"mem_overhead = arcpy.MakeFeatureLayer_management(overhead, "mem_overhead")arcpy.SelectLayerByAttribute_management(mem_overhead, "NEW_SELECTION", "FeederID = '{0}' AND {1} >= {2} AND {1}