<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Weighted Overlay Custom Tool (Python) Inclusion in Web AppBuilder Application Issue in ArcGIS Web AppBuilder Questions</title>
    <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/weighted-overlay-custom-tool-python-inclusion-in/m-p/1157127#M22036</link>
    <description>&lt;P&gt;I am attempting to develop a custom Weighted Overlay tool (via Python script) to be included in a Web AppBuilder application. This tool is based on the utility of the Weighted Overlay (Spatial Analyst) tool. I would like for the Web App user to input only the layer weight values (0% - 100%) and be presented with the output weighted overlay raster layer. I have hard-coded the four input raster data layers, which is the goal. I have developed a script that works correctly within ArcMap, and I have published a geoprocessing service using this script. I have successfully added this geoprocessing service to my Web AppBuilder application (hosted through AGOL). However, the tool results in a general "Submitted. Executing... Failed." message after being run. I imagine this is an issue with my script.&lt;/P&gt;&lt;P&gt;Here is the script that I am using to publish this geoprocessing service:&lt;/P&gt;&lt;P&gt;# FireIncidentRiskAnalysis.py&lt;BR /&gt;# Usage: FireIncidentRiskAnalysis &amp;lt;Fire_Incident_Risk_Analysis&amp;gt;&lt;BR /&gt;# Description:&lt;BR /&gt;# ---------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;# Import arcpy module&lt;BR /&gt;import arcpy&lt;BR /&gt;from arcpy import env&lt;BR /&gt;from arcpy.sa import *&lt;/P&gt;&lt;P&gt;arcpy.env.overwriteOutput = True&lt;BR /&gt;arcpy.env.workspace = arcpy.env.scratchGDB&lt;/P&gt;&lt;P&gt;StationProximity = arcpy.GetParameter(0)&lt;BR /&gt;if StationProximity == '#' or not StationProximity:&lt;BR /&gt;StationProximity = 25&lt;BR /&gt;&lt;BR /&gt;Landuse = arcpy.GetParameter(1)&lt;BR /&gt;if Landuse == '#' or not Landuse:&lt;BR /&gt;Landuse = 25&lt;BR /&gt;&lt;BR /&gt;HazardousSiteProximity = arcpy.GetParameter(2)&lt;BR /&gt;if HazardousSiteProximity == '#' or not HazardousSiteProximity:&lt;BR /&gt;HazardousSiteProximity = 25&lt;/P&gt;&lt;P&gt;HydrantProximity = arcpy.GetParameter(3)&lt;BR /&gt;if HydrantProximity == '#' or not HydrantProximity:&lt;BR /&gt;HydrantProximity = 25&lt;/P&gt;&lt;P&gt;# Script arguments&lt;BR /&gt;#Fire_Incident_Risk_Analysis = arcpy.GetParameterAsText(0)&lt;BR /&gt;#if Fire_Incident_Risk_Analysis == '#' or not Fire_Incident_Risk_Analysis:&lt;BR /&gt;Fire_Incident_Risk_Analysis = "C:\\CapstoneProject\\Project_Toolbox\\FireIncidentRiskAssessment\\FireIncidentRiskAssessment.gdb\\AnalysisOutput" # provide a default value if unspecified&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;# Local variables:&lt;BR /&gt;Proximity_to_Fire_Station_Raster = "ParcelsNearStationRaster"&lt;BR /&gt;Landuse_Raster = "LanduseReclass"&lt;BR /&gt;Hazardous_Material_Site_Buffer_Raster = "HazardousMaterialSites"&lt;BR /&gt;Fire_Hydrant_Buffer_Raster = "FireHydrantDistanceBuffers"&lt;/P&gt;&lt;P&gt;remapstation = RemapValue([[1,4],[2,3],[3,2],[4,1],["NODATA","NODATA"]])&lt;BR /&gt;remaplanduse = RemapValue([[1,4],[2,3],[3,2],[4,1],["NODATA","NODATA"]])&lt;BR /&gt;remaphazardous = RemapValue([[1,4],[2,3],[3,2],[4,1],["NODATA","NODATA"]])&lt;BR /&gt;remaphydrant = RemapValue([[1,5],[2,4],[3,3],[4,1],["NODATA","NODATA"]])&lt;/P&gt;&lt;P&gt;myWOTable = WOTable([[Proximity_to_Fire_Station_Raster, StationProximity, "VALUE", remapstation],&lt;BR /&gt;[Landuse_Raster, Landuse, "VALUE", remaplanduse],&lt;BR /&gt;[Hazardous_Material_Site_Buffer_Raster, HazardousSiteProximity, "VALUE", remaphazardous],&lt;BR /&gt;[Fire_Hydrant_Buffer_Raster, HydrantProximity, "VALUE", remaphydrant]], [1, 5, 1])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# Execute WeightedOverlay&lt;BR /&gt;WeightedOverlayOutput = WeightedOverlay(myWOTable)&lt;/P&gt;&lt;P&gt;arcpy.CopyRaster_management(WeightedOverlayOutput, Fire_Incident_Risk_Analysis)&lt;BR /&gt;#WeightedOverlayOutput.save(Fire_Incident_Risk_Analysis)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any assistance would be greatly appreciated.&lt;/P&gt;</description>
    <pubDate>Thu, 24 Mar 2022 01:59:49 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2022-03-24T01:59:49Z</dc:date>
    <item>
      <title>Weighted Overlay Custom Tool (Python) Inclusion in Web AppBuilder Application Issue</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/weighted-overlay-custom-tool-python-inclusion-in/m-p/1157127#M22036</link>
      <description>&lt;P&gt;I am attempting to develop a custom Weighted Overlay tool (via Python script) to be included in a Web AppBuilder application. This tool is based on the utility of the Weighted Overlay (Spatial Analyst) tool. I would like for the Web App user to input only the layer weight values (0% - 100%) and be presented with the output weighted overlay raster layer. I have hard-coded the four input raster data layers, which is the goal. I have developed a script that works correctly within ArcMap, and I have published a geoprocessing service using this script. I have successfully added this geoprocessing service to my Web AppBuilder application (hosted through AGOL). However, the tool results in a general "Submitted. Executing... Failed." message after being run. I imagine this is an issue with my script.&lt;/P&gt;&lt;P&gt;Here is the script that I am using to publish this geoprocessing service:&lt;/P&gt;&lt;P&gt;# FireIncidentRiskAnalysis.py&lt;BR /&gt;# Usage: FireIncidentRiskAnalysis &amp;lt;Fire_Incident_Risk_Analysis&amp;gt;&lt;BR /&gt;# Description:&lt;BR /&gt;# ---------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;# Import arcpy module&lt;BR /&gt;import arcpy&lt;BR /&gt;from arcpy import env&lt;BR /&gt;from arcpy.sa import *&lt;/P&gt;&lt;P&gt;arcpy.env.overwriteOutput = True&lt;BR /&gt;arcpy.env.workspace = arcpy.env.scratchGDB&lt;/P&gt;&lt;P&gt;StationProximity = arcpy.GetParameter(0)&lt;BR /&gt;if StationProximity == '#' or not StationProximity:&lt;BR /&gt;StationProximity = 25&lt;BR /&gt;&lt;BR /&gt;Landuse = arcpy.GetParameter(1)&lt;BR /&gt;if Landuse == '#' or not Landuse:&lt;BR /&gt;Landuse = 25&lt;BR /&gt;&lt;BR /&gt;HazardousSiteProximity = arcpy.GetParameter(2)&lt;BR /&gt;if HazardousSiteProximity == '#' or not HazardousSiteProximity:&lt;BR /&gt;HazardousSiteProximity = 25&lt;/P&gt;&lt;P&gt;HydrantProximity = arcpy.GetParameter(3)&lt;BR /&gt;if HydrantProximity == '#' or not HydrantProximity:&lt;BR /&gt;HydrantProximity = 25&lt;/P&gt;&lt;P&gt;# Script arguments&lt;BR /&gt;#Fire_Incident_Risk_Analysis = arcpy.GetParameterAsText(0)&lt;BR /&gt;#if Fire_Incident_Risk_Analysis == '#' or not Fire_Incident_Risk_Analysis:&lt;BR /&gt;Fire_Incident_Risk_Analysis = "C:\\CapstoneProject\\Project_Toolbox\\FireIncidentRiskAssessment\\FireIncidentRiskAssessment.gdb\\AnalysisOutput" # provide a default value if unspecified&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;# Local variables:&lt;BR /&gt;Proximity_to_Fire_Station_Raster = "ParcelsNearStationRaster"&lt;BR /&gt;Landuse_Raster = "LanduseReclass"&lt;BR /&gt;Hazardous_Material_Site_Buffer_Raster = "HazardousMaterialSites"&lt;BR /&gt;Fire_Hydrant_Buffer_Raster = "FireHydrantDistanceBuffers"&lt;/P&gt;&lt;P&gt;remapstation = RemapValue([[1,4],[2,3],[3,2],[4,1],["NODATA","NODATA"]])&lt;BR /&gt;remaplanduse = RemapValue([[1,4],[2,3],[3,2],[4,1],["NODATA","NODATA"]])&lt;BR /&gt;remaphazardous = RemapValue([[1,4],[2,3],[3,2],[4,1],["NODATA","NODATA"]])&lt;BR /&gt;remaphydrant = RemapValue([[1,5],[2,4],[3,3],[4,1],["NODATA","NODATA"]])&lt;/P&gt;&lt;P&gt;myWOTable = WOTable([[Proximity_to_Fire_Station_Raster, StationProximity, "VALUE", remapstation],&lt;BR /&gt;[Landuse_Raster, Landuse, "VALUE", remaplanduse],&lt;BR /&gt;[Hazardous_Material_Site_Buffer_Raster, HazardousSiteProximity, "VALUE", remaphazardous],&lt;BR /&gt;[Fire_Hydrant_Buffer_Raster, HydrantProximity, "VALUE", remaphydrant]], [1, 5, 1])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# Execute WeightedOverlay&lt;BR /&gt;WeightedOverlayOutput = WeightedOverlay(myWOTable)&lt;/P&gt;&lt;P&gt;arcpy.CopyRaster_management(WeightedOverlayOutput, Fire_Incident_Risk_Analysis)&lt;BR /&gt;#WeightedOverlayOutput.save(Fire_Incident_Risk_Analysis)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any assistance would be greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 01:59:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/weighted-overlay-custom-tool-python-inclusion-in/m-p/1157127#M22036</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2022-03-24T01:59:49Z</dc:date>
    </item>
    <item>
      <title>Weighted Overlay Custom Tool (Python) for Web AppBuilder aplication</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/weighted-overlay-custom-tool-python-inclusion-in/m-p/1157128#M22038</link>
      <description>&lt;P&gt;I am attempting to develop a custom Weighted Overlay tool (via Python script) to be included in a Web AppBuilder application. This tool is based on the utility of the Weighted Overlay (Spatial Analyst) tool. I would like for the Web App user to input only the layer weight values (0% - 100%) and be presented with the output weighted overlay raster layer. I have hard-coded the four input raster data layers, which is the goal. I have developed a script that works correctly within ArcMap, and I have published a geoprocessing service using this script. I have successfully added this geoprocessing service to my Web AppBuilder application (hosted through AGOL). However, the tool results in a general "Submitted. Executing... Failed." message after being run. I imagine this is an issue with my script.&lt;/P&gt;&lt;P&gt;Here is the script that I am using to publish this geoprocessing service:&lt;/P&gt;&lt;P&gt;# FireIncidentRiskAnalysis.py&lt;BR /&gt;# Usage: FireIncidentRiskAnalysis &amp;lt;Fire_Incident_Risk_Analysis&amp;gt;&lt;BR /&gt;# Description:&lt;BR /&gt;# ---------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;# Import arcpy module&lt;BR /&gt;import arcpy&lt;BR /&gt;from arcpy import env&lt;BR /&gt;from arcpy.sa import *&lt;/P&gt;&lt;P&gt;arcpy.env.overwriteOutput = True&lt;BR /&gt;arcpy.env.workspace = arcpy.env.scratchGDB&lt;/P&gt;&lt;P&gt;StationProximity = arcpy.GetParameter(0)&lt;BR /&gt;if StationProximity == '#' or not StationProximity:&lt;BR /&gt;StationProximity = 25&lt;BR /&gt;&lt;BR /&gt;Landuse = arcpy.GetParameter(1)&lt;BR /&gt;if Landuse == '#' or not Landuse:&lt;BR /&gt;Landuse = 25&lt;BR /&gt;&lt;BR /&gt;HazardousSiteProximity = arcpy.GetParameter(2)&lt;BR /&gt;if HazardousSiteProximity == '#' or not HazardousSiteProximity:&lt;BR /&gt;HazardousSiteProximity = 25&lt;/P&gt;&lt;P&gt;HydrantProximity = arcpy.GetParameter(3)&lt;BR /&gt;if HydrantProximity == '#' or not HydrantProximity:&lt;BR /&gt;HydrantProximity = 25&lt;/P&gt;&lt;P&gt;# Script arguments&lt;BR /&gt;#Fire_Incident_Risk_Analysis = arcpy.GetParameterAsText(0)&lt;BR /&gt;#if Fire_Incident_Risk_Analysis == '#' or not Fire_Incident_Risk_Analysis:&lt;BR /&gt;Fire_Incident_Risk_Analysis = "C:\\CapstoneProject\\Project_Toolbox\\FireIncidentRiskAssessment\\FireIncidentRiskAssessment.gdb\\AnalysisOutput" # provide a default value if unspecified&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;# Local variables:&lt;BR /&gt;Proximity_to_Fire_Station_Raster = "ParcelsNearStationRaster"&lt;BR /&gt;Landuse_Raster = "LanduseReclass"&lt;BR /&gt;Hazardous_Material_Site_Buffer_Raster = "HazardousMaterialSites"&lt;BR /&gt;Fire_Hydrant_Buffer_Raster = "FireHydrantDistanceBuffers"&lt;/P&gt;&lt;P&gt;remapstation = RemapValue([[1,4],[2,3],[3,2],[4,1],["NODATA","NODATA"]])&lt;BR /&gt;remaplanduse = RemapValue([[1,4],[2,3],[3,2],[4,1],["NODATA","NODATA"]])&lt;BR /&gt;remaphazardous = RemapValue([[1,4],[2,3],[3,2],[4,1],["NODATA","NODATA"]])&lt;BR /&gt;remaphydrant = RemapValue([[1,5],[2,4],[3,3],[4,1],["NODATA","NODATA"]])&lt;/P&gt;&lt;P&gt;myWOTable = WOTable([[Proximity_to_Fire_Station_Raster, StationProximity, "VALUE", remapstation],&lt;BR /&gt;[Landuse_Raster, Landuse, "VALUE", remaplanduse],&lt;BR /&gt;[Hazardous_Material_Site_Buffer_Raster, HazardousSiteProximity, "VALUE", remaphazardous],&lt;BR /&gt;[Fire_Hydrant_Buffer_Raster, HydrantProximity, "VALUE", remaphydrant]], [1, 5, 1])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# Execute WeightedOverlay&lt;BR /&gt;WeightedOverlayOutput = WeightedOverlay(myWOTable)&lt;/P&gt;&lt;P&gt;arcpy.CopyRaster_management(WeightedOverlayOutput, Fire_Incident_Risk_Analysis)&lt;BR /&gt;#WeightedOverlayOutput.save(Fire_Incident_Risk_Analysis)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any assistance would be greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 02:03:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/weighted-overlay-custom-tool-python-inclusion-in/m-p/1157128#M22038</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2022-03-24T02:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: Weighted Overlay Custom Tool (Python) for Web AppBuilder aplication</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/weighted-overlay-custom-tool-python-inclusion-in/m-p/1157177#M22039</link>
      <description>&lt;P&gt;&lt;A href="https://community.esri.com/t5/python-blog/code-formatting-the-community-version/ba-p/1007633" target="_blank"&gt;Code formatting ... the Community Version - Esri Community&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;to make it easier to read&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 09:09:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/weighted-overlay-custom-tool-python-inclusion-in/m-p/1157177#M22039</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2022-03-24T09:09:51Z</dc:date>
    </item>
  </channel>
</rss>

