Skip to content

Commit b9e5e15

Browse files
committed
Skip most unknown locations
1 parent 38591e2 commit b9e5e15

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎sentinel2.py‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,11 @@ def sentinel2_bot(
246246
src.read(window=Window(4392, 4392, 1098 * 2, 1098 * 2))
247247
)
248248

249-
logging.info("Address: %s" % get_address(lat, lng))
249+
address = get_address(lat, lng)
250+
logging.info("Address: %s" % address)
251+
if address.startswith("Unknown location") and rng.random() > 0.1:
252+
logging.info("Skipping image because it is in an unknown location.")
253+
continue
250254

251255
# normal window
252256
rgb = np.stack([a.squeeze(0) for a in bands])

0 commit comments

Comments
 (0)