Comments (23)
from arcsdm.
Issue sent to Esri DE, waiting for response.
from arcsdm.
from arcsdm.
Could someone test this with new demo dataset?
T
from arcsdm.
Waiting for feedback, can't replicate
from arcsdm.
Can't replicate this with user description of the problem with new demodata and toolbox (10.4.1 arcgis).
Completed script CalculateResponse... Succeeded at Wed Jul 19 10:07:13 2017 (Elapsed Time: 1 minutes 17 seconds) | Completed script CalculateResponse... Succeeded at Wed Jul 19 10:07:13 2017 (Elapsed Time: 1 minutes 17 seconds) | Completed script CalculateResponse... | | Succeeded at Wed Jul 19 10:07:13 2017 (Elapsed Time: 1 minutes 17 seconds)
-- | -- | -- | -- | --
Completed script CalculateResponse... Succeeded at Wed Jul 19 10:07:13 2017 (Elapsed Time: 1 minutes 17 seconds) | Completed script CalculateResponse... | | Succeeded at Wed Jul 19 10:07:13 2017 (Elapsed Time: 1 minutes 17 seconds)
Completed script CalculateResponse...
| Succeeded at Wed Jul 19 10:07:13 2017 (Elapsed Time: 1 minutes 17 seconds)
from arcsdm.
Confirmed crash in ArcGis pro 2.0 investigating
from arcsdm.
arcpy.ArcSDM.CalculateResponse("lithoname200k", r"C:\ArcSDM\work\database.gdb\lithoname200k_WC", "orogenic_gold_thin", None, -99, 1, r"C:\ArcSDM\work\database.gdb\W_pprb", r"C:\ArcSDM\work\database.gdb\W_std", r"C:\ArcSDM\work\database.gdb\W_MDvar", r"C:\ArcSDM\work\database.gdb\W_Tstd", r"C:\ArcSDM\work\database.gdb\W_conf")
This crashes the tool - investigating
from arcsdm.
Command line :
arcpy.ImportToolbox(r"C:\arcsdm\toolbox\arcsdm.pyt")
arcpy.env.workspace = r"C:\ArcSDM\work\database.gdb"
arcpy.env.scratchWorkspace = r"C:\ArcSDM\work\database.gdb"
arcpy.env.mask = r"C:\ArcSDM\work\database.gdb\study_area"
arcpy.ArcSDM.CalculateResponse(r"C:\ArcSDM\work\database.gdb\lithoname200k", r"C:\ArcSDM\work\database.gdb\lithoname200k_WC", r"C:\ArcSDM\work\database.gdb\orogenic_gold_thin", None, -99, 1, r"C:\ArcSDM\work\database.gdb\W_pprb", r"C:\ArcSDM\work\database.gdb\W_std", r"C:\ArcSDM\work\database.gdb\W_MDvar", r"C:\ArcSDM\work\database.gdb\W_Tstd", r"C:\ArcSDM\work\database.gdb\W_conf")
from arcsdm.
Crash happens on this line (186):
gp.AddJoin_management(RasterLayer,"Value",Wts_Table,"CLASS")
from arcsdm.
Managed to execute Calculate response successfully using only
- rc_till_cu
- rc_magn_res4k
- rc_em_real
But any combination that contains - rc_dnsstru or
- lithoname_200k
produces the error. Therefore is more related to the layers.
Studding deeper I found out that the Coordinate Systems differ
- orogenic_gold_thin -> EUREF_FIN_TM35FIN
- rc_dnsstru -> ETRS_1989_Transverse_Mercator
- rc_em_real -> EUREF_FIN_TM35FIN
- rc_till_cu -> EUREF_FIN_TM35FIN
- rc_magn_res4k -> EUREF_FIN_TM35FIN
- lithoname200k -> ETRS_1989_Transverse_Mercator
That is possibly the origin of our error
from arcsdm.
It is problem with output spatial reference - needs confirmation
from arcsdm.
https://www.dropbox.com/s/nxmzxex0jhpbskq/issue44.rar?dl=0
Waiting for confirmation of bug.
from arcsdm.
Closing this - demodata fixed and problem pinpointed. Thanks!
from arcsdm.
Reopening this because of #98
from arcsdm.
I'm with the same problem, using the data in ArcSDM_Demodata/DemoData_version_files (dowloaded from github) using the following layers for Wofe Demo testing:
- orogenic_Au
- lithoname200k
- rc_till_cu
- rc_till_co
- rc_dst_worms
- rc_appa_res
- rc_magn_res4k
ArcMap crashes when Calculate Response is executed. I have already checked the spatial reference and its ok.
Running on ArcMap 10.5.1
from arcsdm.
from arcsdm.
Running on ArcMap 10.5.1
from arcsdm.
I got it!
The problem is in line 211 of calculateresponse.py
arcpy.AddJoin_management(RasterLayer,"VALUE",Wts_Table,"CLASS")
When i run the code below
my_raster_layer = arcpy.Raster(RasterLayer)
if my_raster_layer.hasRAT:
arcpy.AddMessage("Has a VAT!")
else:
arcpy.AddMessage("No VAT!")
before the line 205 - arcpy.MakeRasterLayer_management(Input_Raster,RasterLayer) -
the algorithm output "No VAT", that is, the RasterLayer created do not have Attribute Table, probably this is causing the crash.
This way, i have make the following modifications to the calculateresponse.py code for circunvent this issue.
- Comment line 205
arcpy.MakeRasterLayer_management(Input_Raster,RasterLayer)
- Modified line 211, replacing RasterLayer by Input_Raster
arcpy.AddJoin_management(Input_Raster,"VALUE",Wts_Table,"CLASS")
- Modified line 236, replacing RasterLayer by Input_Raster
arcpy.CopyRaster_management(Input_Raster,Temp_Raster,'#','#',NoDataArg2)
- Comment line 381
gp.makerasterlayer(Input_Raster,RasterLayer)
- Comment line 383, No need for AddJoin again, as the Input_Raster already has the join
gp.AddJoin_management(Input_Raster,"Value",Wts_Table,"CLASS")
- Modified line 397, replacing RasterLayer by Input_Raster
arcpy.CopyRaster_management(Input_Raster, Temp_Raster,"#","#",NoDataArg2)
After these modifications the code is running well. However for AddJoin_management() function work with the Input_Raster, i have to export all the used rasters to a gdb before running the tool.
Thanks for the attention, and for the help.
from arcsdm.
Yes, for AddJoin_management to work without use the makerasterlayer function, the input must be with geodatabase. But if you want the tool to accept file system inputs, you can add some lines of code to transform the input files to geodatabase before start join the tables.
from arcsdm.
I haven't same test data than above but I have tested with current data. My experience is that Calculate Response (from arto-dev branch) works with ArcMap and ArcGIS Pro if workspace is either File Geodatabase (which I recommend) or File System.
Here is short test using python on ArcMap 10.6.1:
import arcpy
print (arcpy.env.mask)
C:\ArcSDM\Work\DemoData_version_files\derivatives\study_area_g\study_area_g
import arcgisscripting
gp = arcgisscripting.create()
print(gp.workspace)
C:\ArcSDM\work
print(gp.scratchworkspace)
C:\ArcSDM\work\Scratch
Input_Raster = r"C:\ArcSDM\Work\DemoData_version_files\geology\lithoname200k\lithoname200k"
!!! Calculate Response may crash if Input Raster is RasterDataset but don't crash if it is RasterBand
Wts_Table = r"C:\ArcSDM\Work\DemoData_version_files\lithoname200k_CT.dbf"
!!! This table is output from Calculate Weights.
Training_Points = r"C:\ArcSDM\Work\DemoData_version_files\shape_files\Orogenic_Au.shp"
outputrastername = Input_Raster.replace(".","_")
outputrastername = outputrastername[:10] + "W"
Output_Raster = gp.CreateScratchName(outputrastername, '', 'rst', gp.scratchworkspace)
RasterLayer = "OutRas_lyr"
arcpy.MakeRasterLayer_management(Input_Raster,RasterLayer)
<Result 'OutRas_lyr'>
!!! MakeRasterLayer writes RasterLayer to TEMP folder.
arcpy.AddJoin_management(RasterLayer,"VALUE",Wts_Table,"CLASS")
<Result 'OutRas_lyr'>
Temp_Raster = gp.CreateScratchName('tmp_rst', '', 'rst', gp.scratchworkspace)
arcpy.CopyRaster_management(RasterLayer,Temp_Raster,'#','#','#')
<Result 'C:\ArcSDM\work\Scratch\tmp_rst17'>
outras = arcpy.sa.Lookup(Temp_Raster,"WEIGHT")
and so on... (without crash)
from arcsdm.
This works also with ArcMap 10.6.1 and ArcGIS Pro 2.5:
import arcpy
arcpy.ImportToolbox(r"C:\ArcSDM\Toolbox\ArcSDM.pyt")
arcpy.env.workspace = r"C:\ArcSDM\Work"
arcpy.env.scratchWorkspace = r"C:\ArcSDM\Work\Scratch"
arcpy.env.mask = r"C:\ArcSDM\Work\DemoData_version_files\derivatives\study_area_g\study_area_g"
!!! Note: Mask must be RasterBand, not RasterDataset (study_area_g twice above)
!!! Also Input raster must be RasterBand, not RasterDataset (lithoname200k twice below)
arcpy.ArcSDM.CalculateResponse(r"C:\ArcSDM\work\DemoData_version_files\geology\lithoname200k\lithoname200k", r"C:\ArcSDM\Work\DemoData_version_files\lithoname200k_CT.dbf", r"C:\ArcSDM\work\DemoData_version_files\shape_files\Orogenic_Au.shp", "#", -99, 1, r"C:\ArcSDM\work\W_pprb", r"C:\ArcSDM\work\W_std", r"C:\ArcSDM\work\W_MDvar", r"C:\ArcSDM\work\W_Tstd", r"C:\ArcSDM\work\W_conf")
from arcsdm.
Load the newest version of ArcSDM (V5.02) and test again. If the problem persists, reopen this issue.
from arcsdm.
Related Issues (20)
- Folder path problems in the Logistic Regression tool. HOT 1
- Problem with Experimental tools on ArcGIS Pro 2.5.0 HOT 1
- Calculate weight tool does not work on Arcgis10.8 HOT 4
- Logistic Regression Error in updated version of ArcSDM too: 'logpol.tba does not exist' and 'too many unique values' HOT 1
- Error when executing : Calculate Weights ArcSDM-master HOT 1
- yy
- Failed to execute (ROCTool). HOT 1
- ArcSDM for version ArcGis 10.8.1 ? HOT 1
- Study how to update the repository
- ToolBox documentation guides for GTK
- Replace arcpy.mapping with arcpy.mp HOT 4
- Study GitHub Actions for ArcSDM
- Calculate Weights Migration to ArcGIS Pro 3.x
- Calculate Response Migration to ArcGIS Pro 3.x HOT 1
- Create tag for 5.03.1 HOT 1
- Agterberg-Cheng CI Test Migration to ArcGIS Pro 3.x
- Area Frequency Table Migration to ArcGIS Pro 3.x
- Grand WoE Migration to ArcGIS Pro 3.x
- Logistic Regression - Replace Python code for Migration to ArcGIS Pro 3.x
- Training Sites Reduction Migration to ArcGIS Pro 3.x
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arcsdm.