gtkfi / ArcSDM

Spatial Data Modeler 6 for ArcGIS Pro
32 stars 18 forks source link

Error calculate weigths #117

Closed rekiabouazi closed 4 years ago

rekiabouazi commented 5 years ago

When calculating weights, I can not run the calculate weights tool (below the displayed error). thank you for helping me.

Executing: CalculateWeightsTool "C:\New Folder\xxxxx\xxxxxx.gdb\carte_raster" # Training_site Categorical "C:\New Folder\Carte xxx\Table Weigth.gdb\table.gbd" 2 1 -99 # Start Time: Thu Mar 21 22:52:24 2019 Running script CalculateWeightsTool... Reloaded arcsdm modules

========== arcsdm values ========== ArcSdm 5.01.07 for ArcGis (Pro and Desktop)

Arcgis environment: Desktop (10.4.1) Workspace: C:\New Folder\Work.gdb (LocalDatabase) Scratch workspace: C:\New Folder\Scratch.gdb (LocalDatabase) Output coordinate system not set - defaulting mapunit to meter Map Units: meter Mask: "Mask_raster" and it is RasterDataset -------------- END EXECUTION ---------------

Calculate weights caught arcpy.ExecuteError: RasterDataset type is not allowed as Mask! -------------- END EXECUTION --------------- Unhandled exception caught Traceback (most recent call last): File "C:\ArcSDM\Toolbox\arcsdm\common.py", line 87, in execute_tool func(self, parameters, messages) File "C:\ArcSDM\Toolbox\arcsdm\calculateweights.py", line 621, in Calculate raise arcpy.ExecuteError; ExecuteError

Completed script CalculateWeightsTool... Failed to execute (CalculateWeightsTool). Failed at Thu Mar 21 22:52:25 2019 (Elapsed Time: 0.62 seconds)

captionhydra commented 5 years ago

I have met the same issue. When I input the raster mask into the ArcMap, and select the mask of "Raster Analysis" to "Mask_raster"( Do not have the path of the Mask raster C:\XXX\Mask_raster), it can calculate the weights. I don't know why. So that I cannot use this tool in ArcCatalog. Only can use it in ArcMap.

trotor commented 5 years ago

@captionhydra to clarify: When you set the values in ArcCatalog it doesn't work or you can't set the values? All tools need masks.

captionhydra commented 5 years ago

@captionhydra to clarify: When you set the values in ArcCatalog it doesn't work or you can't set the values? All tools need masks.

I can set the values. When I use ArcMap, I set the mask like this. It works well. 1 3

But when I use ArcCatalog, it reports error. 2 4

And My ArcMap will suddenly shut down when I calculate respond use an 8bit raster as the evidence layer... 16bit raster and 32bit raster work well.

trotor commented 5 years ago

Ok, this is excellent example and I think it is a "bug" in detecting the mask. Technical reason is that when using arcmap it is "layer" and in arccatalog just a rasterfile. Anyhow I think it shouldn't be a problem. I will mark this as a bug and will try to allocate time to fix.

trotor commented 4 years ago

I think this is covered elsewhere