-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calculate response Demo crashes #44
Comments
Could someone test this with new demo dataset? T |
Waiting for feedback, can't replicate |
Can't replicate this with user description of the problem with new demodata and toolbox (10.4.1 arcgis).
|
Confirmed crash in ArcGis pro 2.0 investigating |
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 |
Command line : arcpy.ImportToolbox(r"C:\arcsdm\toolbox\arcsdm.pyt") arcpy.env.workspace = r"C:\ArcSDM\work\database.gdb" 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") |
Crash happens on this line (186): |
Managed to execute Calculate response successfully using only
Studding deeper I found out that the Coordinate Systems differ
That is possibly the origin of our error |
It is problem with output spatial reference - needs confirmation |
https://www.dropbox.com/s/nxmzxex0jhpbskq/issue44.rar?dl=0 Waiting for confirmation of bug. |
Issue sent to Esri DE, waiting for response. |
Closing this - demodata fixed and problem pinpointed. Thanks! |
Reopening this because of #98 |
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:
ArcMap crashes when Calculate Response is executed. I have already checked the spatial reference and its ok. Running on ArcMap 10.5.1 |
Okay, thank you for your feedback! Which version of ArcGis are you running
this against?
…On Tue, Jul 10, 2018 at 5:30 PM Elias Martins Guerra Prado < ***@***.***> wrote:
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
- rc_dnsstru
- rc_em_real
- rc_till_cu
- rc_magn_res4k
- lithoname200k
ArcMap crashes when Calculate Response is executed. I have already checked
the spatial reference and its ok.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#44 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AKV5eXgPfii7YlzkWk0jg49TLXhFw4iVks5uFLp8gaJpZM4OOGL0>
.
|
Running on ArcMap 10.5.1 |
I got it! The problem is in line 211 of calculateresponse.py
When i run the code below
before the line 205 - arcpy.MakeRasterLayer_management(Input_Raster,RasterLayer) - This way, i have make the following modifications to the calculateresponse.py code for circunvent this issue.
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. |
Thanks for the work you have put on this, very good! Does your comment in
the end mean that this doesn't work with file system inputs, just with
geodatabase? It is one serious showstopper for some tools (we would like
them to work on both environments)
…On Wed, Jul 11, 2018 at 4:52 PM Elias Martins Guerra Prado < ***@***.***> wrote:
*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.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#44 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AKV5eTxb0B_oD-1tToWbWbsg9SsqjVwdks5uFgMngaJpZM4OOGL0>
.
|
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. |
Okay, when I have time I must study this. Perhaps there is way to make it
work on both with alternative data flows.
…On Wed, Jul 11, 2018 at 5:10 PM Elias Martins Guerra Prado < ***@***.***> wrote:
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.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#44 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AKV5eTu34QhmKND55Q_OxwFsuv7X6K1Dks5uFgdwgaJpZM4OOGL0>
.
|
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:
and so on... (without crash) |
This works also with ArcMap 10.6.1 and ArcGIS Pro 2.5: |
Load the newest version of ArcSDM (V5.02) and test again. If the problem persists, reopen this issue. |
Steps:
Download ArcSDM and ArcSDM_DemoData.
Unzip ArcSDM-Master.zip, this creates ArcSDM-master folder.
Unzip ArcSDM_DemoData.zip inside ArcSDM-master folder, this creates Data folder.
Execute file InitWorkDir.bat inside ArcSDM-master, this creates work folder.
Open ArcMAP 10.5 and open ArcSDM_Desktop_work.mxd inside work folder
Create folder connection for ArcSDM-master folder.
In Arc Toolbox, select add toolbox and select ArcSDM-master/Toolbox/ ArcSDM.pyt
In CalculateResponse demo.tbx, Step 1 and Step 2 appear with a red x. As well as LogisticRegressionDemotbx
In Step 1, select edit and appears the model where calculate weights appears with a red x.
Selected Calculate weights directly with
a. Evidence raster layer : lithoname200k, rc_dnsstru, rc_magn_res4k, rc_till_cu, rc_em_real
b. Training points orogenic gold thin
c. Changed Output to end in WD
d. Everting else as default
Run calculate response with the obtained tables, orogenic_gold_thin and defaults
ArcMAP closes. Output obtained before crash:
The text was updated successfully, but these errors were encountered: