Commit 67beeae9 authored by Tilmann Sager's avatar Tilmann Sager
Browse files

Created masks // Added flight_trail_width as key number // Minor refactoring

parent 2e80f20b
......@@ -85,6 +85,7 @@ def init_params() -> {}:
# Classification
Key.cls_thresh_low: int(cp.get('classification', 'low_threshold')),
Key.cls_thresh_high: int(cp.get('classification', 'high_threshold')),
Key.flight_trail_width: float(cp.get('mask', 'flight_trail_width')),
# Plots
Key.plt_world_map: cp.get('plot', 'world_map')
......@@ -120,6 +121,5 @@ def read_mask(mask: str) -> {}:
Key.line_length: int(cp.get('mask', 'line_length')),
Key.line_gap: int(cp.get('mask', 'line_gap')),
Key.ratio_threshold: int(cp.get('mask', 'ratio_threshold')),
Key.flight_trail_width: float(cp.get('mask', 'flight_trail_width'))
}
return mask_params
......@@ -30,6 +30,7 @@ postprocess = 0
[classification]
low_threshold = 30
high_threshold = 1000
flight_trail_width = 1
[plot]
world_map = ../data/maps/ne_10m_admin_0_countries/ne_10m_admin_0_countries.shp
......
......@@ -43,13 +43,9 @@ DTYPES = {
def _processed_filepath(output_dir: str, granule: {}) -> str:
start_date = str(granule.get(Column.start).year) + str(granule.get(Column.start).month) + str(
granule.get(Column.start).day)
end_date = str(granule.get(Column.end).year) + str(granule.get(Column.end).month) + str(granule.get(Column.end).day)
start_time = str(granule.get(Column.start).hour) + str(granule.get(Column.start).minute)
end_time = str(granule.get(Column.end).hour) + str(granule.get(Column.end).minute)
filename = '_'.join(
[granule.get(Column.h), granule.get(Column.v), start_date, start_time, end_date, end_time]) + '.csv'
starttime = datetime.datetime.strftime(granule[Column.start], "%Y%m%d_%H%M")
endtime = datetime.datetime.strftime(granule[Column.end], "%Y%m%d_%H%M")
filename = '_'.join([granule[Column.h], granule[Column.v], starttime, endtime]) + '.csv'
return create_path([output_dir, filename])
......
......@@ -3,8 +3,6 @@ binary_threshold = 50
max_px_size = 120
sht_threshold = 0.3
ppht_threshold = 1
connectivity = 1
line_length = 10
line_gap = 3
ratio_threshold = 3
flight_trail_width = 0.7
\ No newline at end of file
line_gap = 10
ratio_threshold = 3
\ No newline at end of file
......@@ -6,5 +6,4 @@ ppht_threshold = 2
connectivity = 2
line_length = 20
line_gap = 5
ratio_threshold = 5
flight_trail_width = 0.5
\ No newline at end of file
ratio_threshold = 5
\ No newline at end of file
......@@ -3,8 +3,6 @@ binary_threshold = 90
max_px_size = 200
sht_threshold = 0.9
ppht_threshold = 1
connectivity = 2
line_length = 30
line_gap = 10
ratio_threshold = 7
flight_trail_width = 0.2
\ No newline at end of file
line_gap = 3
ratio_threshold = 7
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment