Commit f13fd05e authored by Danijel Schorlemmer's avatar Danijel Schorlemmer Committed by Nicolas Garcia Ospina
Browse files

Apply 9 suggestion(s) to 2 file(s)

parent 80c78fb8
Pipeline #27911 passed with stage
in 3 minutes and 10 seconds
......@@ -48,7 +48,7 @@ parser.add_argument(
const=1,
type=int,
default=18,
help="Set zoom level of output tiles, default=18",
help="Set zoom level of output tiles, default: 18",
)
parser.add_argument(
"-output",
......@@ -56,8 +56,8 @@ parser.add_argument(
nargs="?",
const=1,
default="./output_quadkeys.txt",
help="""Set the output filepath and extension as
text or CSV filepath, default=./output_quadkeys.txt""",
help="""Set the output file path and extension as
text or CSV file path, default: ./output_quadkeys.txt""",
)
args = parser.parse_args()
......@@ -65,8 +65,8 @@ args = parser.parse_args()
def main():
if args.in_bounds:
sw_lon, sw_lat, ne_lon, ne_lat = args.in_bounds
assert sw_lon < ne_lon, "West longitude is greater than East longitude"
assert sw_lat < ne_lat, "South latitude is greater than North latitude"
assert sw_lon < ne_lon, "West longitude is greater than east longitude"
assert sw_lat < ne_lat, "South latitude is greater than north latitude"
elif args.in_file:
outline = gpd.read_file(args.in_file).to_crs("epsg:4326")
geometry = outline.envelope.values[0]
......
......@@ -42,7 +42,7 @@ parser.add_argument(
const=1,
type=int,
default=18,
help="Set zoom level of output tiles, default=18",
help="Set zoom level of output tiles, default: 18",
)
parser.add_argument(
"-max_batches",
......@@ -67,8 +67,8 @@ parser.add_argument(
nargs="?",
const=1,
default="./output_quadkeys.txt",
help="""Set the output filepath and extension as
text or CSV filepath, default=./output_quadkeys.txt""",
help="""Set the output file path and extension as
text or CSV file path, default: ./output_quadkeys.txt""",
)
args = parser.parse_args()
......@@ -162,7 +162,7 @@ def main():
# Remove possible duplicated quadkeys
flat_list_ids = list(set([item for sublist in data for item in sublist]))
if len(flat_list_ids) > 0:
logger.info("Writing {} Quadkeys to {}".format(len(flat_list_ids), args.output))
logger.info("Writing {} quadkeys to {}".format(len(flat_list_ids), args.output))
outfile = open(args.output, "w")
if args.output[-3:] == "csv":
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment