<?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 Arcpy Weighted Overlay Type mismatch in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcpy-weighted-overlay-type-mismatch/m-p/1247083#M66502</link>
    <description>&lt;P&gt;Trying to run an arcpy.sa.WeightedOverlay on 3 datasets derived from multiple ring buffered point features and rasterized on the way, but am getting an error. I have tried everything in my power and listed online to mitigate this issue: same extent, cell size, projection, works fine when manually running in Pro with same datasets. Their pixel type:&amp;nbsp;&lt;SPAN&gt;16-bit signed integer&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Short workflow on what I did with datasets: OSM data -&amp;gt; Multiple Ring Buffer -&amp;gt; Clip -&amp;gt; Polygon to Raster (this resulted in rasters with Short pixel type and produced same error). Next attempt was to convert to .tif format (as seen in the code the file extension) with Raster To Other Format (as it suggests on official Arcgis tool description). After that I've tried to reclassify the values, but results in Unsigned char pixel type.&lt;/P&gt;&lt;P&gt;Nevertheless, all these rasters I've tried in ArcPy actually work within the manual use of the tool.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I receive:&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;RuntimeError: Failed to apply Raster Function: 'WeightedOverlay' (Type mismatch. )&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P class="lia-align-left"&gt;&lt;SPAN&gt;Code sample:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcpy


arcpy.env.workspace = r'..\\Application Development\\Suitability Analysis'
directory = r'..\\Application Development\\Suitability Analysis'


park_raster = arcpy.Raster(directory + r"\\data\\osm\\osm_final_tiff\\park_raster.tif") # don't add extensions as .tif, does not recognize layer
bus_raster = arcpy.Raster(directory + r"\\data\\osm\\osm_final_tiff\\bus_raster.tif")
economic_raster = arcpy.Raster(directory + r"\\data\\osm\\osm_final_tiff\\economic_raster.tif")

describe1 = arcpy.Raster(park_raster)

#checking if it fetches the raster, works fine
check_park = arcpy.management.GetRasterProperties(park_raster, "VALUETYPE")


wotable = arcpy.sa.WOTable([[park_raster, 50, "VALUE", ([[250, 5], [500, 4], [750, 3], [1000, 2], [5000, 1], ["NODATA", "NODATA"]])],
                        [bus_raster, 30, "VALUE", ([[100, 5], [250, 4], [500, 3], [1000, 2], [5000, 1], ["NODATA", "NODATA"]])],
                        [economic_raster, 20, "VALUE", ([[250, 5], [500, 4], [1000, 3], [2000, 2], [5000, 1], ["NODATA", "NODATA"]])]], [1, 5, 1])
        

outWeightedOverlay = arcpy.sa.WeightedOverlay(wotable)
outWeightedOverlay.save(r"..\\Application Development\\Suitability Analysis")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have done everything in my power and what I've encountered so far: same projection, cell size, data type&lt;/P&gt;&lt;P&gt;One noticeable thing is that &lt;A href="https://community.esri.com/t5/arcmap-questions/custom-weighted-overlay-tool-python-not/td-p/1157129" target="_blank" rel="noopener"&gt;here&lt;/A&gt;&amp;nbsp;RemapValue is defined within the WOTable but in mine code it doesn't exist as it is an unrecognized parameter and throws an error, if this can serve as a clue..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be appretiable. Thank you&lt;/P&gt;</description>
    <pubDate>Wed, 11 Jan 2023 15:49:05 GMT</pubDate>
    <dc:creator>EdahŠahinović</dc:creator>
    <dc:date>2023-01-11T15:49:05Z</dc:date>
    <item>
      <title>Arcpy Weighted Overlay Type mismatch</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-weighted-overlay-type-mismatch/m-p/1247083#M66502</link>
      <description>&lt;P&gt;Trying to run an arcpy.sa.WeightedOverlay on 3 datasets derived from multiple ring buffered point features and rasterized on the way, but am getting an error. I have tried everything in my power and listed online to mitigate this issue: same extent, cell size, projection, works fine when manually running in Pro with same datasets. Their pixel type:&amp;nbsp;&lt;SPAN&gt;16-bit signed integer&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Short workflow on what I did with datasets: OSM data -&amp;gt; Multiple Ring Buffer -&amp;gt; Clip -&amp;gt; Polygon to Raster (this resulted in rasters with Short pixel type and produced same error). Next attempt was to convert to .tif format (as seen in the code the file extension) with Raster To Other Format (as it suggests on official Arcgis tool description). After that I've tried to reclassify the values, but results in Unsigned char pixel type.&lt;/P&gt;&lt;P&gt;Nevertheless, all these rasters I've tried in ArcPy actually work within the manual use of the tool.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I receive:&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;RuntimeError: Failed to apply Raster Function: 'WeightedOverlay' (Type mismatch. )&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P class="lia-align-left"&gt;&lt;SPAN&gt;Code sample:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcpy


arcpy.env.workspace = r'..\\Application Development\\Suitability Analysis'
directory = r'..\\Application Development\\Suitability Analysis'


park_raster = arcpy.Raster(directory + r"\\data\\osm\\osm_final_tiff\\park_raster.tif") # don't add extensions as .tif, does not recognize layer
bus_raster = arcpy.Raster(directory + r"\\data\\osm\\osm_final_tiff\\bus_raster.tif")
economic_raster = arcpy.Raster(directory + r"\\data\\osm\\osm_final_tiff\\economic_raster.tif")

describe1 = arcpy.Raster(park_raster)

#checking if it fetches the raster, works fine
check_park = arcpy.management.GetRasterProperties(park_raster, "VALUETYPE")


wotable = arcpy.sa.WOTable([[park_raster, 50, "VALUE", ([[250, 5], [500, 4], [750, 3], [1000, 2], [5000, 1], ["NODATA", "NODATA"]])],
                        [bus_raster, 30, "VALUE", ([[100, 5], [250, 4], [500, 3], [1000, 2], [5000, 1], ["NODATA", "NODATA"]])],
                        [economic_raster, 20, "VALUE", ([[250, 5], [500, 4], [1000, 3], [2000, 2], [5000, 1], ["NODATA", "NODATA"]])]], [1, 5, 1])
        

outWeightedOverlay = arcpy.sa.WeightedOverlay(wotable)
outWeightedOverlay.save(r"..\\Application Development\\Suitability Analysis")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have done everything in my power and what I've encountered so far: same projection, cell size, data type&lt;/P&gt;&lt;P&gt;One noticeable thing is that &lt;A href="https://community.esri.com/t5/arcmap-questions/custom-weighted-overlay-tool-python-not/td-p/1157129" target="_blank" rel="noopener"&gt;here&lt;/A&gt;&amp;nbsp;RemapValue is defined within the WOTable but in mine code it doesn't exist as it is an unrecognized parameter and throws an error, if this can serve as a clue..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be appretiable. Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2023 15:49:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-weighted-overlay-type-mismatch/m-p/1247083#M66502</guid>
      <dc:creator>EdahŠahinović</dc:creator>
      <dc:date>2023-01-11T15:49:05Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy Weighted Overlay Type mismatch</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-weighted-overlay-type-mismatch/m-p/1247163#M66507</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from arcpy.sa import *
wotable = WOTable([
    [park_raster, 50, "VALUE", ([[250, 5], [500, 4], [750, 3], [1000, 2], [5000, 1], ["NODATA", "NODATA"]])],
    [bus_raster, 30, "VALUE", ([[100, 5], [250, 4], [500, 3], [1000, 2], [5000, 1], ["NODATA", "NODATA"]])],
    [economic_raster, 20, "VALUE", ([[250, 5], [500, 4], [1000, 3], [2000, 2], [5000, 1], ["NODATA", "NODATA"]])]],
    [1, 5, 1]
)
out_ = WeightedOverlay(wotable)
out_.save(...etc)&lt;/LI-CODE&gt;&lt;P&gt;Did you try with the * import as in the help topics?&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/spatial-analyst/wotable-class.htm" target="_blank"&gt;WOTable—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2023 10:00:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-weighted-overlay-type-mismatch/m-p/1247163#M66507</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2023-01-11T10:00:09Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy Weighted Overlay Type mismatch</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-weighted-overlay-type-mismatch/m-p/1247390#M66512</link>
      <description>&lt;P&gt;Wow, this actually worked! Thank you!&lt;/P&gt;&lt;P&gt;What I had seen just as a module 'shortcutting' acutally did the trick. The RemapValue is now glowing as a parameter as it should after all!&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2023 19:02:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-weighted-overlay-type-mismatch/m-p/1247390#M66512</guid>
      <dc:creator>EdahŠahinović</dc:creator>
      <dc:date>2023-01-11T19:02:24Z</dc:date>
    </item>
  </channel>
</rss>

