land cover data error ?

71 views
Skip to first unread message

LUP_ Sree

unread,
Feb 6, 2023, 5:28:08 AM2/6/23
to Sound Mapping Tools Users Group
I'm not quite sure if this is a landcover data error,  as i'm trying yo get familiar to use the tools, i draw the simplest lancover data and fed the attribute table in accordance with the source data folder files. but i keep getting this following error for my SPREADGIS analysis 

Failed script spreadgis...

Traceback (most recent call last):
  File "C:\smt\toolbox_V4_4_2\toolbox\scripts\C_spreadgis.py", line 170, in <module>
    landcover_type = "nlcd", use_old_barrier = 0)
  File "C:\smt\toolbox_V4_4_2\toolbox\scripts\soundprophlpr.py", line 224, in SoundPropagation
    point_fill, freq_fill, my_times, my_time_labels, point_counter, keep_intermediates, use_old_barrier)
  File "C:\smt\toolbox_V4_4_2\toolbox\scripts\spreadgishlpr.py", line 71, in spreadgis
    BPD, max_veg_loss = calculate_barrier_path_distance_and_vegmax(Sound_Source, dem_ft, landcover, eucdist_ft, source_offset, receiver_offset, idir)
  File "C:\smt\toolbox_V4_4_2\toolbox\scripts\spreadgishlpr.py", line 973, in calculate_barrier_path_distance_and_vegmax
    max_dist, dist_vec, terrain_cut, veg_cut = get_terrain_cut(xyzsrc_cell, xyzrec_cell, cell_size, cell_size, numpy_dem, numpy_lc, lc_attribute_table)
  File "C:\smt\toolbox_V4_4_2\toolbox\scripts\spreadgishlpr.py", line 1390, in get_terrain_cut
    lc_vec = reclass_to_spreadtype(lc_vec, lc_attribute_table)
  File "C:\smt\toolbox_V4_4_2\toolbox\scripts\spreadgishlpr.py", line 1576, in reclass_to_spreadtype
    new_lc = lc_attribute_table[lc]
KeyError: 0

Failed to execute (spreadgis).

Failed at Mon Feb 06 18:21:27 2023 (Elapsed Time: 8.50 seconds)

any help much appreciated 
thank you.

LUP_ Sree

unread,
Feb 7, 2023, 3:08:36 AM2/7/23
to Sound Mapping Tools Users Group
figured it out, it was an issue with the landuse and the model extent. SMT really works. thank you all for making it.
Reply all
Reply to author
Forward
0 new messages