Commit 859fbf25 authored by Nicolas Garcia Ospina's avatar Nicolas Garcia Ospina
Browse files

Moved parsed args to main()

parent eabf480a
Pipeline #24251 failed with stage
in 44 seconds
......@@ -50,28 +50,26 @@ parser.add_argument(
)
args = parser.parse_args()
if args.in_bounds:
sw_lon, sw_lat, ne_lon, ne_lat = args.in_bounds
print(ne_lat)
elif args.in_file:
outline = gpd.read_file(args.in_file).to_crs("epsg:4326")
geometry = outline.envelope.values[0]
sw_lon, sw_lat, ne_lon, ne_lat = geometry.bounds
else:
raise ValueError("No input geometry found")
if args.zoom:
zoom = args.zoom
else:
zoom = 18
if args.output:
output = args.output
else:
output = "./output_quadkeys.txt"
def main():
if args.in_bounds:
sw_lon, sw_lat, ne_lon, ne_lat = args.in_bounds
print(ne_lat)
elif args.in_file:
outline = gpd.read_file(args.in_file).to_crs("epsg:4326")
geometry = outline.envelope.values[0]
sw_lon, sw_lat, ne_lon, ne_lat = geometry.bounds
else:
raise ValueError("No input geometry found")
if args.zoom:
zoom = args.zoom
else:
zoom = 18
if args.output:
output = args.output
else:
output = "./output_quadkeys.txt"
def main():
logger.info(
"Zoom level {} quadkeys will be created for the bounding "
"box {} {} {} {}.".format(zoom, sw_lon, sw_lat, ne_lon, ne_lat)
......
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