EsriOceans / btm

Benthic Terrain Modeler
http://resources.arcgis.com/en/communities/oceans/
Mozilla Public License 2.0
26 stars 7 forks source link

Surface Area to Planar Area Arc-Chord Correction Crashes #136

Open ailich opened 6 years ago

ailich commented 6 years ago

Surface Area To Planar Area Tool crashes once it has to calculate triangle area. This is on a 2m resolution bathymetry grid with 4908 columns and 13,948 rows. The calculation works on a resampled version of this data at 10 meter resolution.

Calculating Triangle Edge 16 of 16... Calculating Triangle Area 1 of 8... RuntimeError: ERROR 999998: Unexpected Error. Executing: Shift bathy_smaller C:\Users\socce\Documents\ArcGIS\Default.gdb\shift_8 -2 2 # Start Time: Tue Mar 27 16:09:06 2018 Succeeded at Tue Mar 27 16:09:27 2018 (Elapsed Time: 20.61 seconds) Python Error: File "C:\Users\socce\AppData\Local\ESRI\Desktop10.5\AssemblyCache{2DAC2AE8-B5F3-4263-9F5D-AAED6B47316B}\toolbox\scripts\surface_area_to_planar_area.py", line 172, in main area.save(area_out)

Deleting intermediate data... Completed script surfacetoplanar... Failed to execute (surfacetoplanar). Failed at Tue Mar 27 16:14:39 2018 (Elapsed Time: 8 minutes 8 seconds)

scw commented 6 years ago

@ailich thanks for the report, I haven't seen this issue before, but typically something is going wrong with writing the data in cases like this. Could you report what the earlier message "Set scratch workspace to" line reads? Could you confirm how much free space you have on the disk where the scratch workspace is located? Another possibility is that this operation is consuming too much memory, I'll see if I can reproduce locally with a similarly large raster.

ailich commented 6 years ago

I reran it using a tif and set it to my external hard drive which has 500GB free so there should be enough space there. I still get the same error however.

Executing: surfacetoplanar bathy.tif "E:\Research\R Projects\test\sapa.tif" true # Start Time: Tue Mar 27 17:35:40 2018 Running script surfacetoplanar... Set scratch workspace to E:\Research\R Projects\test... Cell size: 2.0 Flat area: 4.0 Creating Shift Grid 1 of 8... Creating Shift Grid 2 of 8... Creating Shift Grid 3 of 8... Creating Shift Grid 4 of 8... Creating Shift Grid 5 of 8... Creating Shift Grid 6 of 8... Creating Shift Grid 7 of 8... Creating Shift Grid 8 of 8... Calculating Triangle Edge 1 of 16... Calculating Triangle Edge 2 of 16... Calculating Triangle Edge 3 of 16... Calculating Triangle Edge 4 of 16... Calculating Triangle Edge 5 of 16... Calculating Triangle Edge 6 of 16... Calculating Triangle Edge 7 of 16... Calculating Triangle Edge 8 of 16... Calculating Triangle Edge 9 of 16... Calculating Triangle Edge 10 of 16... Calculating Triangle Edge 11 of 16... Calculating Triangle Edge 12 of 16... Calculating Triangle Edge 13 of 16... Calculating Triangle Edge 14 of 16... Calculating Triangle Edge 15 of 16... Calculating Triangle Edge 16 of 16... Calculating Triangle Area 1 of 8... RuntimeError: ERROR 999998: Unexpected Error. Executing: Shift bathy.tif "E:\Research\R Projects\test\shift_8.tif" -2 2 # Start Time: Tue Mar 27 17:38:02 2018 Succeeded at Tue Mar 27 17:38:22 2018 (Elapsed Time: 19.91 seconds) Python Error: File "C:\Users\socce\AppData\Local\ESRI\Desktop10.5\AssemblyCache{2DAC2AE8-B5F3-4263-9F5D-AAED6B47316B}\toolbox\scripts\surface_area_to_planar_area.py", line 172, in main area.save(area_out)

Deleting intermediate data... Completed script surfacetoplanar... Failed to execute (surfacetoplanar). Failed at Tue Mar 27 17:44:56 2018 (Elapsed Time: 9 minutes 15 seconds)

ailich commented 6 years ago

It ran using a .asc file instead of a .tif or a geodatabase file and although it took much longer (51 minutes), it did run. Calculating BPI also seems not to work for tifs but works for .asc files.