|
40 | 40 | def main(): |
41 | 41 | ''' |
42 | 42 | Usage Instructions: |
43 | | - - Set the list of paths to the vector tiles `staged_dir_paths_list` |
44 | | - - Choose one of the paths from the last step, remove the head node |
45 | | - from the `staged_dir_paths_list` and set it as the `merged_dir_path` |
| 43 | + - Enter the HEAD node (lowest # node) at the end of the path for `merged_dir_path` |
| 44 | + - Enter all worker nodes (all other nodes) at the end of the paths that make |
| 45 | + up `staged_dir_paths_list` |
46 | 46 | ''' |
47 | 47 |
|
48 | 48 | ####################### |
49 | 49 | #### Change me 😁 #### |
50 | 50 | ####################### |
51 | 51 | # todo -- get files from dirs automatically, using os.lsdir(). |
52 | 52 | #BASE_DIR = '/scratch/bbou/julietcohen/IWP/output/...' |
53 | | - merged_dir_path = f"{IWP_CONFIG['dir_staged']}cn___" # this path SHOULD NOT be in the `staged_dir_paths_list` |
| 53 | + merged_dir_path = f"{IWP_CONFIG['dir_staged']}gpub020" # this path SHOULD NOT be in the `staged_dir_paths_list` |
54 | 54 | staged_dir_paths_list = [ |
55 | | - f"{IWP_CONFIG['dir_staged']}cn___", |
56 | | - f"{IWP_CONFIG['dir_staged']}cn___", |
57 | | - f"{IWP_CONFIG['dir_staged']}cn___", |
58 | | - # f"{IWP_CONFIG['dir_staged']}cn___", |
59 | | - # f"{IWP_CONFIG['dir_staged']}cn___", |
60 | | - # f"{IWP_CONFIG['dir_staged']}cn___", |
61 | | - # f"{IWP_CONFIG['dir_staged']}cn___", |
62 | | - # f"{IWP_CONFIG['dir_staged']}cn___", |
63 | | - # f"{IWP_CONFIG['dir_staged']}cn___", |
64 | | - # f"{IWP_CONFIG['dir_staged']}cn___", |
65 | | - # f"{IWP_CONFIG['dir_staged']}cn___", |
66 | | - # f"{IWP_CONFIG['dir_staged']}cn___", |
67 | | - # f"{IWP_CONFIG['dir_staged']}cn___", |
68 | | - # f"{IWP_CONFIG['dir_staged']}cn___", |
69 | | - # f"{IWP_CONFIG['dir_staged']}cn___", |
| 55 | + f"{IWP_CONFIG['dir_staged']}gpub041", |
| 56 | + #f"{IWP_CONFIG['dir_staged']}gpub041", |
| 57 | + #f"{IWP_CONFIG['dir_staged']}gpub041", |
| 58 | + #f"{IWP_CONFIG['dir_staged']}gpub038", |
| 59 | + #f"{IWP_CONFIG['dir_staged']}gpub027", |
| 60 | + #f"{IWP_CONFIG['dir_staged']}gpub028", |
| 61 | + #f"{IWP_CONFIG['dir_staged']}gpub029", |
| 62 | + #f"{IWP_CONFIG['dir_staged']}gpub030", |
| 63 | + #f"{IWP_CONFIG['dir_staged']}gpub031", |
| 64 | + #f"{IWP_CONFIG['dir_staged']}gpub032", |
| 65 | + #f"{IWP_CONFIG['dir_staged']}gpub033", |
| 66 | + #f"{IWP_CONFIG['dir_staged']}gpub034", |
| 67 | + #f"{IWP_CONFIG['dir_staged']}gpub035", |
| 68 | + #f"{IWP_CONFIG['dir_staged']}gpub036", |
| 69 | + #f"{IWP_CONFIG['dir_staged']}gpub037", |
| 70 | + #f"{IWP_CONFIG['dir_staged']}gpub038", |
| 71 | + #f"{IWP_CONFIG['dir_staged']}gpub039", |
| 72 | + #f"{IWP_CONFIG['dir_staged']}gpub040", |
| 73 | + #f"{IWP_CONFIG['dir_staged']}gpub041", |
| 74 | + #f"{IWP_CONFIG['dir_staged']}gpub___", |
70 | 75 | ] |
71 | 76 | ############################## |
72 | 77 | #### END OF Change me 😁 #### |
@@ -338,11 +343,9 @@ def merge_tile(incoming_tile_in_path, incoming_tile_out_path, isDestructive, sta |
338 | 343 | dedup_method = stager.config.get_deduplication_method() |
339 | 344 | if dedup_method is not None: |
340 | 345 | mode = 'w' |
341 | | - ## concatenate the geodataframes: |
342 | | - ## for IWP data, we do not set the config to dedup at staging |
343 | | - ## so combine_and_deduplicate() does NOT deduplicate here, |
344 | | - ## we are just ensuring that the tiles within the head node |
345 | | - ## contains all the polygons for that tile, regardless of which node |
| 346 | + ## concatenate the geodataframes and identify duplicates: |
| 347 | + ## ensuring that the tiles within the head node contains |
| 348 | + ## all the polygons for that tile, regardless of which node |
346 | 349 | ## processed each polygon |
347 | 350 | incoming_gdf = stager.combine_and_deduplicate( |
348 | 351 | incoming_gdf, incoming_tile_out_path) |
|
0 commit comments