-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
citizenfish
committed
Jan 31, 2024
1 parent
f361192
commit a1a8533
Showing
5 changed files
with
128 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import os | ||
import sys | ||
import logging | ||
sys.path.append(os.path.abspath('lib')) | ||
from tools import OSZoomStack, Splitter, Mkgmap, GetMaxOSMID, OSMMerge, OSMSort, GPKG2OSM | ||
|
||
extract_bbox = [134340, 20297, 407049, 164276] | ||
osm_core_file = './build/data/devon-latest.osm.pbf' | ||
|
||
output_dir = './build/output' | ||
splitter_dir = './build/splitter' | ||
styles_dir = './style/mkgmap_styles' | ||
typ_file = './style/typ_files/mkgmap-typ-files/bikepack.txt' | ||
precomp_sea = './build/data/sea/sea-latest.zip' | ||
bounds = './build/data/bounds/bounds-latest.zip' | ||
highest_id = 11267580680 | ||
logging.basicConfig(level=logging.INFO) | ||
|
||
# Step 1 - Get the Max ID of our OSM data | ||
mx = GetMaxOSMID() | ||
if not highest_id: | ||
logging.info(f"Getting max ID from {osm_core_file}") | ||
mx.apply_file(osm_core_file) | ||
logging.info(f'Highest ID = {mx.max_id}') | ||
|
||
# Step 2 - Download Zoomstack data and extract contours to OSM format | ||
|
||
o = OSZoomStack(bbox=extract_bbox, max_id=mx.max_id) | ||
file = o.get_zoomstack() | ||
zoomstack_output = o.make_osm() | ||
mx.reset() | ||
mx.apply_file(zoomstack_output) | ||
logging.info(f'Highest Zoomstack ID = {mx.max_id}') | ||
|
||
# Step 3 | ||
|
||
# STILL in construction |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters