|
36 | 36 | layout = [ |
37 | 37 | [sg.Text('Recording to Process')], |
38 | 38 | [sg.In(size=(80,1)), sg.FileBrowse(key='humFile', file_types=(("DAT File", "*.DAT"), ), initial_folder=os.path.dirname(default_params['humFile']))], |
39 | | - [sg.Text('AOI')], |
40 | | - [sg.In(size=(80,1)), sg.FileBrowse(key='aoi', file_types=(("Shapefile", "*.shp"), (".plan File", "*.plan")), initial_folder=os.path.dirname(default_params['aoi']))], |
41 | 39 | [sg.Text('Output Folder')], |
42 | 40 | [sg.In(size=(80,1)), sg.FolderBrowse(key='proj', initial_folder=os.path.dirname(default_params['projDir']))], |
43 | 41 | [sg.Text('Project Name', size=(15,1)), sg.InputText(key='projName', size=(50,1), default_text=os.path.basename(default_params['projDir']))], |
|
46 | 44 | [sg.Text('General Parameters')], |
47 | 45 | [sg.Text('Temperature [C]', size=(20,1)), sg.Input(key='tempC', default_text=default_params['tempC'], size=(10,1))], |
48 | 46 | [sg.Text('Chunk Size', size=(20,1)), sg.Input(key='nchunk', default_text=default_params['nchunk'], size=(10,1))], |
49 | | - [sg.Text('Crop Range [m]', size=(20,1)), sg.Input(key='cropRange', default_text=default_params['cropRange'], size=(10,1))], |
50 | 47 | [sg.Checkbox('Export Unknown Ping Attributes', key='exportUnknown', default=default_params['exportUnknown'])], |
51 | 48 | [sg.Checkbox('Locate and flag missing pings', key='fixNoDat', default=default_params['fixNoDat'])], |
52 | 49 | [sg.Text('Thread Count [0==All Threads]', size=(30,1)), sg.Input(key='threadCnt', default_text=default_params['threadCnt'], size=(10,1))], |
53 | 50 | [sg.HorizontalSeparator()], |
54 | | - [sg.Text('GeoTiff Pixel Resolution [0==Default Resolution (~0.02m)]')], |
55 | | - [sg.Text('Sonar', size=(10,1)), sg.Input(key='pix_res_son', default_text=default_params['pix_res_son'], size=(10,1)), sg.Text('Substrate', size=(10,1)), sg.Input(key='pix_res_map', default_text=default_params['pix_res_map'], size=(10,1))], |
| 51 | + [sg.Text('Filter Sonar Log')], |
| 52 | + [sg.Text('Crop Range [m]', size=(22,1)), sg.Input(key='cropRange', default_text=default_params['cropRange'], size=(10,1))], |
| 53 | + [sg.Text('Max. Heading Deviation [deg]:', size=(22,1)), sg.Input(key='max_heading_deviation', default_text=default_params['max_heading_deviation'], size=(10,1)), sg.VerticalSeparator(), sg.Text('Distance [m]:', size=(15,1)), sg.Input(key='max_heading_distance', default_text=default_params['max_heading_distance'], size=(10,1))], |
| 54 | + [sg.Text('Min. Speed [m/s]:', size=(22,1)), sg.Input(key='min_speed', default_text=default_params['min_speed'], size=(10,1)), sg.VerticalSeparator(), sg.Text('Max. Speed [m/s]:', size=(15,1)), sg.Input(key='max_speed', default_text=default_params['max_speed'], size=(10,1))], |
| 55 | + [sg.Text('AOI')], |
| 56 | + [sg.In(size=(80,1)), sg.FileBrowse(key='aoi', file_types=(("Shapefile", "*.shp"), (".plan File", "*.plan")), initial_folder=os.path.dirname(default_params['aoi']))], |
56 | 57 | [sg.HorizontalSeparator()], |
57 | 58 | [sg.Text('Position Corrections')], |
58 | 59 | [sg.Text('Transducer Offset [X]:', size=(22,1)), sg.Input(key='x_offset', default_text=default_params['x_offset'], size=(10,1)), sg.VerticalSeparator(), sg.Text('Transducer Offset [Y]:', size=(22,1)), sg.Input(key='y_offset', default_text=default_params['y_offset'], size=(10,1))], |
|
73 | 74 | [sg.Text('Depth Detection', size=(20,1)), sg.Combo(['Sensor', 'Auto'], key='detectDep', default_value=default_params['detectDep']), sg.VerticalSeparator(), sg.Checkbox('Smooth Depth', key='smthDep', default=default_params['smthDep']), sg.VerticalSeparator(), sg.Text('Adjust Depth [m]'), sg.Input(key='adjDep', default_text=default_params['adjDep'], size=(10,1)), sg.VerticalSeparator(()), sg.Checkbox('Plot Bedpick', key='pltBedPick', default=default_params['pltBedPick'])], |
74 | 75 | [sg.HorizontalSeparator()], |
75 | 76 | [sg.Text('Sonar Georectification Exports')], |
| 77 | + [sg.Text('Pixel Resolution [0==Default Resolution (~0.02m)]', size=(38,1)), sg.Input(key='pix_res_son', default_text=default_params['pix_res_son'], size=(10,1)),], |
76 | 78 | [sg.Checkbox('WCP', key='rect_wcp', default=default_params['rect_wcp']), sg.Checkbox('WCR', key='rect_wcr', default=default_params['rect_wcr']), sg.Text('Sonar Colormap'), sg.Combo(plt.colormaps(), key='son_colorMap', default_value=default_params['son_colorMap'])], |
77 | 79 | [sg.HorizontalSeparator()], |
78 | 80 | [sg.Text('Substrate Mapping')], |
79 | 81 | # [sg.Checkbox('Predict Substrate', key='pred_sub', default=default_params['pred_sub']), sg.VerticalSeparator(), sg.Checkbox('Export Substrate Plots', key='pltSubClass', default=default_params['pltSubClass'])], |
80 | 82 | # [sg.Checkbox('Map Substrate [Raster]', key='map_sub', default=default_params['map_sub']), sg.VerticalSeparator(), sg.Checkbox('Map Substrate [Polygon]', key='export_poly', default=default_params['export_poly']), sg.VerticalSeparator(), sg.Text('Classification Method'), sg.Combo(['max'], key='map_class_method', default_value=default_params['map_class_method'])], |
81 | 83 | # [sg.Checkbox('Export Substrate Plots', key='pltSubClass', default=default_params['pltSubClass'])], |
82 | 84 | # [sg.Text('Map Predictions', size=(20,1)), sg.Combo(['False', 'Logit', 'Probability'], key='map_predict', default_value=default_params['map_predict'])], |
| 85 | + [sg.Text('Pixel Resolution [0==Default Resolution (~0.02m)]', size=(38,1)), sg.Input(key='pix_res_map', default_text=default_params['pix_res_map'], size=(10,1))], |
83 | 86 | [sg.Checkbox('Map Substrate [Raster]', key='map_sub', default=default_params['map_sub']), sg.VerticalSeparator(), sg.Checkbox('Map Substrate [Polygon]', key='export_poly', default=default_params['export_poly']), sg.VerticalSeparator(), sg.Checkbox('Export Substrate Plots', key='pltSubClass', default=default_params['pltSubClass'])], |
84 | 87 | [sg.HorizontalSeparator()], |
85 | 88 | [sg.Text('Mosaic Exports')], |
86 | 89 | [sg.Text('# Chunks per Mosaic [0==All Chunks]'), sg.Input(key='mosaic_nchunk', default_text=default_params['mosaic_nchunk'], size=(10,1))], |
87 | 90 | [sg.Text('Export Sonar Mosaic'), sg.Combo(['False', 'GTiff', 'VRT'], key='mosaic', default_value=default_params['mosaic']), sg.VerticalSeparator(), sg.Text('Export Substrate Mosaic'), sg.Combo(['False', 'GTiff', 'VRT'], key='map_mosaic', default_value=default_params['map_mosaic'])], |
88 | 91 | [sg.HorizontalSeparator()], |
89 | | - [sg.Text('Miscellaneous Exports')], |
90 | | - [sg.Checkbox('Banklines', key='banklines', default=default_params['banklines'])], |
| 92 | + [sg.Text('Miscellaneous Shapefile Exports')], |
| 93 | + [sg.Checkbox('Banklines', key='banklines', default=default_params['banklines']), sg.VerticalSeparator(), sg.Checkbox('Coverage', key='coverage', default=default_params['coverage'])], |
91 | 94 | [sg.HorizontalSeparator()], |
92 | 95 | [sg.Submit(), sg.Quit(), sg.Button('Save Defaults')] |
93 | 96 | ] |
|
204 | 207 |
|
205 | 208 | params = { |
206 | 209 | 'humFile':values['humFile'], |
207 | | - 'aoi':aoi, |
208 | 210 | 'projDir':os.path.join(values['proj'], values['projName']), |
209 | 211 | 'project_mode':int(values['project_mode']), |
210 | 212 | 'tempC':float(values['tempC']), |
|
213 | 215 | 'exportUnknown':values['exportUnknown'], |
214 | 216 | 'fixNoDat':values['fixNoDat'], |
215 | 217 | 'threadCnt':int(values['threadCnt']), |
| 218 | + 'aoi':aoi, |
| 219 | + 'max_heading_deviation':float(values['max_heading_deviation']), |
| 220 | + 'max_heading_distance':float(values['max_heading_distance']), |
| 221 | + 'min_speed':float(values['min_speed']), |
| 222 | + 'max_speed':float(values['max_speed']), |
216 | 223 | 'pix_res_son':float(values['pix_res_son']), |
217 | 224 | 'pix_res_map':float(values['pix_res_map']), |
218 | 225 | 'x_offset':float(values['x_offset']), |
|
243 | 250 | 'mosaic_nchunk':int(values['mosaic_nchunk']), |
244 | 251 | 'mosaic':mosaic, |
245 | 252 | 'map_mosaic':map_mosaic, |
246 | | - 'banklines':values['banklines'] |
| 253 | + 'banklines':values['banklines'], |
| 254 | + 'coverage':values['coverage'] |
247 | 255 | } |
248 | 256 |
|
249 | 257 | globals().update(params) |
|
315 | 323 | # read_master_func(sonFiles, humFile, projDir, t, nchunk, exportUnknown, wcp, wcr, tileFile, detectDepth, smthDep, adjDep, pltBedPick, threadCnt) |
316 | 324 |
|
317 | 325 | #================================================== |
318 | | - if rect_wcp or rect_wcr or banklines: |
| 326 | + if rect_wcp or rect_wcr or banklines or coverage: |
319 | 327 | print('\n===========================================') |
320 | 328 | print('===========================================') |
321 | 329 | print('***** RECTIFYING *****') |
|
0 commit comments