An error occurred while loading the file. Please try again.
-
Cresson Remi authored153d4e68
import argparse
import scenes.indexation as indexation
import gdal
import scenes.utils as utils
import scenes.drs as drs
# Arguments
parser = argparse.ArgumentParser(description="Test",)
parser.add_argument("--root_dir", help="Root directory containing MS and PAN folders", required=True)
parser.add_argument("--roi", required=True)
params = parser.parse_args()
# Find pairs of DIMAPS
scenes = drs.get_spot67_scenes(params.root_dir)
# spatial index
print("Indexation...")
idx = indexation.Index(scenes)
# search
print("search roi")
gdal_ds = gdal.Open(params.roi)
bbox = utils.get_bbox_wgs84(gdal_ds)
matches = idx.find(bbox_wgs84=bbox)
print("{} scenes found.".format(len(matches)))
#for scene_match in matches:
# print(scene_match)