Skip to content

Commit

Permalink
Skip most unknown locations
Browse files Browse the repository at this point in the history
  • Loading branch information
betatim committed Jul 16, 2019
1 parent 38591e2 commit b9e5e15
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sentinel2.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,11 @@ def sentinel2_bot(
src.read(window=Window(4392, 4392, 1098 * 2, 1098 * 2))
)

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

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

0 comments on commit b9e5e15

Please sign in to comment.