Skip to content

Commit b14ec4e

Browse files
committed
Update gt_graph_to_wkt.py
1 parent 20e805d commit b14ec4e

File tree

1 file changed

+5
-42
lines changed

1 file changed

+5
-42
lines changed

apls/gt_graph_to_wkt.py

100644100755
+5-42
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
Created on Mon Aug 26 15:30:33 2019
55
66
@author: avanetten
7+
8+
Execution example:
9+
python /apls/apls/gt_graph_to_wkt.py \
10+
--root_dir=/spacenet/competitions/SN5_roads/train/AOI_7_Moscow/
11+
712
"""
813

914
import os
@@ -184,25 +189,6 @@ def gt_geojson_dir_to_wkt(geojson_dir, im_dir, output_csv_path,
184189
###############################################################################
185190
if __name__ == "__main__":
186191

187-
# Single chip
188-
#im_path = '/raid/cosmiq/spacenet/competitions/SN5_roads/train/AOI_7_Moscow/PS-RGB/SN5_roads_train_AOI_7_Moscow_PS-RGB_chip996.tif'
189-
#geojson_path = '/raid/cosmiq/spacenet/competitions/SN5_roads/train/AOI_7_Moscow/geojson_roads_speed/SN5_roads_train_AOI_7_Moscow_geojson_roads_speed_chip996.geojson'
190-
#weight_key = 'length'
191-
#verbose = True
192-
#
193-
#gt_geojson_to_wkt(geojson_path, im_path, weight_key=weight_key,
194-
# verbose=verbose)
195-
196-
# Entire directory
197-
# im_dir = '/raid/cosmiq/spacenet/competitions/SN5_roads/train/AOI_7_Moscow/PS-RGB'
198-
# geojson_dir = '/raid/cosmiq/spacenet/competitions/SN5_roads/train/AOI_7_Moscow/geojson_roads_speed'
199-
# verbose = True
200-
#
201-
# weight_key = 'travel_time_s'
202-
# output_csv_path = '/raid/cosmiq/spacenet/competitions/SN5_roads/train/AOI_7_Moscow/' \
203-
# + 'geojson_roads_speed_wkt_' + weight_key + '.csv'
204-
205-
206192
parser = argparse.ArgumentParser()
207193
parser.add_argument('--root_dir', default='', type=str,
208194
help='Root directory of geojson data')
@@ -231,11 +217,6 @@ def gt_geojson_dir_to_wkt(geojson_dir, im_dir, output_csv_path,
231217
geojson_dir = os.path.join(root_dir, 'geojson_roads_speed')
232218
# get name
233219
out_prefix = '_'.join(root_dir.split('/')[-3:])
234-
# if args.simplify_graph:
235-
# out_name = out_prefix + 'geojson_roads_speed_wkt_weighted_simp.csv'
236-
# else:
237-
# out_name = out_prefix + 'geojson_roads_speed_wkt_weighted.csv'
238-
# output_csv_path = os.path.join(root_dir, out_name)
239220
output_csv_path = os.path.join(root_dir, out_prefix + args.out_file_name)
240221

241222
print("output_csv_path:", output_csv_path)
@@ -246,21 +227,3 @@ def gt_geojson_dir_to_wkt(geojson_dir, im_dir, output_csv_path,
246227
simplify=args.simplify_graph,
247228
weight_keys=weight_keys,
248229
verbose=verbose)
249-
250-
'''
251-
Execute
252-
253-
scp -r /raid/cosmiq/apls/apls/ 10.123.1.70:/raid/local/src/apls/
254-
255-
python /raid/local/src/apls/apls/gt_graph_to_wkt.py \
256-
--root_dir=/nfs/data/cosmiq/spacenet/competitions/SN5_roads/tiles_upload/train/AOI_7_Moscow/
257-
258-
python /raid/local/src/apls/apls/gt_graph_to_wkt.py \
259-
--root_dir=/nfs/data/cosmiq/spacenet/competitions/SN5_roads/tiles_upload/train/AOI_8_Mumbai/
260-
261-
python /raid/local/src/apls/apls/gt_graph_to_wkt.py \
262-
--root_dir=/nfs/data/cosmiq/spacenet/competitions/SN5_roads/tiles_upload/train/AOI_8_Mumbai/
263-
264-
265-
266-
'''

0 commit comments

Comments
 (0)