Skip to content

Commit

Permalink
Merge pull request #47 from hotosm/fix-extract
Browse files Browse the repository at this point in the history
If --extract is used, it needs to be passed to split_by_square()
  • Loading branch information
spwoodcock authored Aug 9, 2024
2 parents de44503 + dc64ad7 commit 272cf90
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions fmtm_splitter/splitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -778,11 +778,22 @@ def main(args_list: list[str] | None = None):
raise ValueError(err)

if args.meters:
split_by_square(
args.boundary,
meters=args.meters,
outfile=args.outfile,
)
if args.extract:
file = open(args.extract, "r")
data = geojson.load(file)
file.close()
split_by_square(
args.boundary,
meters=args.meters,
osm_extract=data,
outfile=args.outfile,
)
else:
split_by_square(
args.boundary,
meters=args.meters,
outfile=args.outfile,
)
elif args.number:
split_by_sql(
args.boundary,
Expand Down

0 comments on commit 272cf90

Please sign in to comment.