osm-garmin: various
parent
38e497d0ac
commit
534fc63d32
|
@ -14,14 +14,15 @@ function build_gmap() {
|
||||||
# Change ID (currently is 63240000)
|
# Change ID (currently is 63240000)
|
||||||
|
|
||||||
region="$1"
|
region="$1"
|
||||||
style="$2"
|
region_id="$2"
|
||||||
|
style="$3"
|
||||||
|
|
||||||
region_shortname="$(get_region_shortname "$region")"
|
region_shortname="$(get_region_shortname "$region")"
|
||||||
generated_map_dir="$out_dir/$region_shortname/"
|
generated_map_dir="$out_dir/$region_shortname/"
|
||||||
|
|
||||||
bounds_dir_md5="$(get_md5_dir "$bounds_dir")"
|
bounds_dir_md5="$(get_md5_dir "$bounds_dir")"
|
||||||
map_md5="$(get_md5 "$maps_dir/$region_shortname.osm.pbf")"
|
map_md5="$(get_md5 "$maps_dir/$region_shortname.osm.pbf")"
|
||||||
style_md5="$(get_md5 "$style_dir/$style.TYP")"
|
style_md5="$(get_md5 "$styles_dir/$style.TYP")"
|
||||||
|
|
||||||
version="$(echo "$bounds_dir_md5|$map_md5|$style_md5" | md5sum | cut -d' ' -f1)"
|
version="$(echo "$bounds_dir_md5|$map_md5|$style_md5" | md5sum | cut -d' ' -f1)"
|
||||||
version_path="$generated_map_dir/version.txt"
|
version_path="$generated_map_dir/version.txt"
|
||||||
|
@ -40,12 +41,23 @@ function build_gmap() {
|
||||||
if [[ $build == "true" ]]; then
|
if [[ $build == "true" ]]; then
|
||||||
cd "$build_dir"
|
cd "$build_dir"
|
||||||
|
|
||||||
|
family_name=""
|
||||||
|
product_id="$region_id"
|
||||||
|
product_version="$(date --utc +%y%j%H%M)"
|
||||||
|
|
||||||
|
[[ -n $OSMGARMIN_MAP_FAMILY_NAME ]] && family_name="$OSMGARMIN_MAP_FAMILY_NAME"
|
||||||
|
|
||||||
exec_mkgmap \
|
exec_mkgmap \
|
||||||
--add-pois-to-areas \
|
--add-pois-to-areas \
|
||||||
|
--area-name="$region" \
|
||||||
--bounds="$bounds_dir" \
|
--bounds="$bounds_dir" \
|
||||||
|
--family-name="$family_name" \
|
||||||
--gmapsupp \
|
--gmapsupp \
|
||||||
--index \
|
--index \
|
||||||
|
--product-id="$product_id" \
|
||||||
|
--product-version="$product_version" \
|
||||||
--route \
|
--route \
|
||||||
|
--series-name="$family_name" \
|
||||||
$tiles_dir/$region_shortname/6324*.osm.pbf \
|
$tiles_dir/$region_shortname/6324*.osm.pbf \
|
||||||
"$styles_dir/$style.TYP"
|
"$styles_dir/$style.TYP"
|
||||||
|
|
||||||
|
@ -149,10 +161,13 @@ if [[ $is_updates == "true" ]]; then
|
||||||
echo "📒 Updating bounds..."
|
echo "📒 Updating bounds..."
|
||||||
update_bounds
|
update_bounds
|
||||||
|
|
||||||
|
region_id=1
|
||||||
|
|
||||||
for region in $regions_array; do
|
for region in $regions_array; do
|
||||||
if [[ "$(check_osm_region_exists "$region")" == "true" ]]; then
|
if [[ "$(check_osm_region_exists "$region")" == "true" ]]; then
|
||||||
echo "🔨 Building Garmin map: $region"
|
echo "🔨 Building Garmin map: $region"
|
||||||
build_gmap "$region" "$style"
|
build_gmap "$region" "$region_id" "$style"
|
||||||
|
((region_id++))
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue