Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC, Use asyncio for external programs, just prototype for now #235

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from
15 changes: 8 additions & 7 deletions wahoomc/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#!/usr/bin/python

# import official python packages
import asyncio
import logging

# import custom python packages
Expand Down Expand Up @@ -75,10 +76,12 @@ def run(run_level):
o_osm_maps = OsmMaps(o_osm_data)

# Filter tags from country osm.pbf files'
o_osm_maps.filter_tags_from_country_osm_pbf_files()
asyncio.run(o_osm_maps.filter_tags_from_country_osm_pbf_files())


# Generate land
o_osm_maps.generate_land()
asyncio.run(o_osm_maps.generate_land())


# Generate sea
o_osm_maps.generate_sea()
Expand All @@ -88,15 +91,13 @@ def run(run_level):
o_osm_maps.generate_elevation(o_input_data.use_srtm1)

# Split filtered country files to tiles
o_osm_maps.split_filtered_country_files_to_tiles()
asyncio.run(o_osm_maps.split_filtered_country_files_to_tiles())

# Merge splitted tiles with land and sea
o_osm_maps.merge_splitted_tiles_with_land_and_sea(
o_input_data.process_border_countries, o_input_data.contour)
asyncio.run(o_osm_maps.merge_splitted_tiles_with_land_and_sea(o_input_data.process_border_countries, o_input_data.contour))

# Creating .map files
o_osm_maps.create_map_files(o_input_data.save_cruiser,
o_input_data.tag_wahoo_xml)
asyncio.run(o_osm_maps.create_map_files(o_input_data.save_cruiser, o_input_data.tag_wahoo_xml))

# Zip .map.lzma files
o_osm_maps.make_and_zip_files('.map.lzma', o_input_data.zip_folder)
Expand Down
Loading
Loading