@@ -1948,6 +1948,8 @@ def tilequeue_batch_process(cfg, args):
19481948 queue_zoom = batch_yaml .get ('queue-zoom' )
19491949 assert queue_zoom , 'Missing batch queue-zoom config'
19501950
1951+ check_metatile_exists = bool (batch_yaml .get ('check-metatile-exists' ))
1952+
19511953 queue_coord = deserialize_coord (coord_str )
19521954 if not queue_coord :
19531955 print >> sys .stderr , 'Invalid coordinate: %s' % coord_str
@@ -1996,6 +1998,10 @@ def find_job_coords_for(coord, target_zoom):
19961998
19971999 batch_logger .begin_run (queue_coord )
19982000
2001+ layer = 'all'
2002+ zip_format = lookup_format_by_extension ('zip' )
2003+ assert zip_format
2004+
19992005 job_coords = find_job_coords_for (queue_coord , group_by_zoom )
20002006 for job_coord in job_coords :
20012007
@@ -2017,6 +2023,12 @@ def find_job_coords_for(coord, target_zoom):
20172023 nominal_zoom = coord .zoom + cfg .metatile_zoom
20182024 unpadded_bounds = coord_to_mercator_bounds (coord )
20192025
2026+ if check_metatile_exists :
2027+ existing_data = store .read_tile (coord , zip_format , layer )
2028+ if existing_data is not None :
2029+ batch_logger .metatile_already_exists (coord )
2030+ continue
2031+
20202032 try :
20212033 source_rows = fetch (nominal_zoom , unpadded_bounds )
20222034 feature_layers = convert_source_data_to_feature_layers (
0 commit comments