diff --git a/region_similarity/export.py b/region_similarity/export.py index f384f95..8ff2750 100644 --- a/region_similarity/export.py +++ b/region_similarity/export.py @@ -125,7 +125,7 @@ def export_multiple_images(cells, job_dir, img, resolution, m): # Save URLs to a file random_hash = generate_random_hash() - url_file = Path("../public") / f"urls_{random_hash}.txt" + url_file = Path("./public") / f"urls_{random_hash}.txt" url_file.parent.mkdir(exist_ok=True) url_file.write_text("\n".join(urls)) @@ -174,7 +174,7 @@ def export_image(e, m): job_dir.mkdir(exist_ok=True) # Get the image based on the mode (clustering vs searching) - result = m.clustered if m.cluster else m.distances + result = m.clustered if m.cluster else m.average_distance # Get the features features = m.feature_img @@ -183,7 +183,7 @@ def export_image(e, m): img = ee.Image.cat([features, result]).reproject(crs='EPSG:4326', scale=1000) # Set the image resolution in meters - resolution = 100 + resolution = 1000 # Convert the image resolution from meters to degrees meters_per_degree = 111320 # Approximation at the equator diff --git a/region_similarity/search.py b/region_similarity/search.py index 22ec397..8e6a3b1 100644 --- a/region_similarity/search.py +++ b/region_similarity/search.py @@ -238,7 +238,7 @@ def cluster(e, m): # Create the training dataset training = m.feature_img.sample( region=m.qr, - scale=100, + scale=1000, numPixels=5_000, )