Skip to content

Commit

Permalink
Add option --no-fast-sweep-skip
Browse files Browse the repository at this point in the history
  • Loading branch information
Hannah Bast committed May 17, 2024
1 parent a7e0833 commit 25ae0fb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scripts/spatialjoin-evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,10 @@ def evaluate_all(args: argparse.Namespace):
options = [all_options[int(i)] for i in args.option_indexes.split(",")]

# Try all combinations of the options.
sweep_mode = " --no-fast-sweep-skip" if args.no_fast_sweep_skip else ""
for name, combination in all_combinations(options):
cmd = (f"cat {args.basename}.spatialjoin-input.tsv |"
f" spatialjoin {combination}"
f" spatialjoin{sweep_mode} {combination}"
f" --contains \" ogc:sfContains \""
f" --covers \" ogc:sfCovers \""
f" --intersects \" ogc:sfIntersects \""
Expand Down Expand Up @@ -216,7 +217,7 @@ def sort_key(pair):
search_paths = (list(Path(".").glob("*.spatialjoin-input.tsv")) +
list(Path(".").glob("*.spatialjoin-evaluation.tsv")))
for p in search_paths:
basenames.add(re.sub("\\..*$", "", p.name))
basenames.add(re.sub("\\.spatialjoin-[a-z]+\\.tsv*$", "", p.name))

# Parse command line arguments.
parser = argparse.ArgumentParser()
Expand All @@ -236,6 +237,9 @@ def sort_key(pair):
default="0,1,2,3,4",
help="Comma-separated list of option indexes "
"(default: 0,1,2,3,4)")
parser.add_argument("--no-fast-sweep-skip", action="store_true",
default=False,
help="Call spatialjoin with --no-fast-sweep-skip")
argcomplete.autocomplete(parser, always_complete_options="long")
args = parser.parse_args()

Expand Down

0 comments on commit 25ae0fb

Please sign in to comment.