AnsweredAssumed Answered

Issues with weighted sum and weighted overlay tools

Question asked by twowlz on Apr 8, 2017
Latest reply on Apr 9, 2017 by Dan_Patterson

I cannot run a weighted sum or overlay because I get the message that I don't have the cell size set--but I do in fact have it set. Here's the python for my entire process (copied from a model)--and you can see that I set it. Anyone else having this issue?

 

... # Import arcpy module

... import arcpy

... 

... 

... # Local variables:

... PolytoPointCensus = "PolytoPointCensus"

... ZCrimeCalls = "C:\\SpatialAnalysisClassProject\\LR911Calls.gdb\\ZCrimeCalls"

... PolytoPointCensus__3_ = "PolytoPointCensus"

... ZPoverty_Rate = "C:\\SpatialAnalysisClassProject\\LR911Calls.gdb\\ZPovertyRate"

... PolytoPointCensus__2_ = "PolytoPointCensus"

... ZPublic_Housing = "C:\\SpatialAnalysisClassProject\\LR911Calls.gdb\\ZPublicHousing"

... Weighte_ZCri1 = "C:\\SpatialAnalysisClassProject\\LR911Calls.gdb\\Weighte_ZCri1"

... 

... # Process: Crime calls Kernel Density

... arcpy.gp.KernelDensity_sa(PolytoPointCensus, "ZCrimeCalls", ZCrimeCalls, "50", "5280", "SQUARE_MAP_UNITS", "DENSITIES", "PLANAR")

... 

... # Process: Poverty Kernel Density

... arcpy.gp.KernelDensity_sa(PolytoPointCensus__3_, "ZPovRate", ZPoverty_Rate, "50", "5280", "SQUARE_MAP_UNITS", "DENSITIES", "PLANAR")

... 

... # Process: Public Housing Kernel Density

... arcpy.gp.KernelDensity_sa(PolytoPointCensus__2_, "ZPublicHousing", ZPublic_Housing, "50", "5280", "SQUARE_MAP_UNITS", "DENSITIES", "PLANAR")

... 

... # Process: Weighted Sum

... tempEnvironment0 = arcpy.env.cellSize

... arcpy.env.cellSize = "50"

... tempEnvironment1 = arcpy.env.mask

... arcpy.env.mask = "Little Rock Municipal Boundary"

... arcpy.gp.WeightedSum_sa("C:\\SpatialAnalysisClassProject\\LR911Calls.gdb\\ZCrimeCalls VALUE 0.33;C:\\SpatialAnalysisClassProject\\LR911Calls.gdb\\ZPovertyRate VALUE 0.33;C:\\SpatialAnalysisClassProject\\LR911Calls.gdb\\ZPublicHousing VALUE 0.33", Weighte_ZCri1)

... arcpy.env.cellSize = tempEnvironment0

... arcpy.env.mask = tempEnvironment1

... 

... 

Runtime error  Traceback (most recent call last):   File "<string>", line 36, in <module>   File "c:\program files (x86)\arcgis\desktop10.4\arcpy\arcpy\geoprocessing\_base.py", line 506, in <lambda>     return lambda *args: val(*gp_fixargs(args, True)) ExecuteError: ERROR 010050: Cell size is not set. Failed to execute (WeightedSum).

Outcomes