osm-garmin: various
parent
ec42a5634a
commit
8a2cafd2ee
|
@ -49,26 +49,13 @@ function build_gmap() {
|
||||||
if [[ $build == "true" ]]; then
|
if [[ $build == "true" ]]; then
|
||||||
cd "$build_dir"
|
cd "$build_dir"
|
||||||
|
|
||||||
family_name="osm-garmin"
|
|
||||||
|
|
||||||
[[ -n $OSMGARMIN_MAP_FAMILY_NAME ]] && family_name="$OSMGARMIN_MAP_FAMILY_NAME"
|
|
||||||
|
|
||||||
description="$(echo "${region##*/}" | sed -e "s/-/ /g" | sed -e "s/\b\(.\)/\u\1/g" | sed -e "s/ /-/g")"
|
|
||||||
product_id="$region_id"
|
|
||||||
product_version="$version_id"
|
|
||||||
|
|
||||||
exec_mkgmap \
|
exec_mkgmap \
|
||||||
|
--description="$(echo "${region##*/}" | sed -e "s/-/ /g" | sed -e "s/\b\(.\)/\u\1/g" | sed -e "s/ /-/g")" \
|
||||||
--add-pois-to-areas \
|
--add-pois-to-areas \
|
||||||
--area-name="$region" \
|
|
||||||
--bounds="$bounds_dir" \
|
--bounds="$bounds_dir" \
|
||||||
--description="$description" \
|
|
||||||
--family-name="$family_name" \
|
|
||||||
--product-id="$product_id" \
|
|
||||||
--product-version="$product_version" \
|
|
||||||
--series-name="$family_name" \
|
|
||||||
--gmapsupp \
|
|
||||||
--index \
|
--index \
|
||||||
--route \
|
--route \
|
||||||
|
--gmapsupp \
|
||||||
$tiles_dir/$region_shortname/6324*.osm.pbf \
|
$tiles_dir/$region_shortname/6324*.osm.pbf \
|
||||||
"$styles_dir/$style.TYP"
|
"$styles_dir/$style.TYP"
|
||||||
|
|
||||||
|
@ -150,27 +137,33 @@ is_updates="false"
|
||||||
|
|
||||||
[[ $OSMGARMIN_FORCE_BUILD == "true" ]] && is_updates="true"
|
[[ $OSMGARMIN_FORCE_BUILD == "true" ]] && is_updates="true"
|
||||||
|
|
||||||
for region in $regions_array; do
|
if [[ $OSMGARMIN_SKIP_UPDATE_MAPS != "true" ]]; then
|
||||||
if [[ "$(check_osm_region_exists "$region")" == "true" ]]; then
|
for region in $regions_array; do
|
||||||
if [[ "$(check_osm_update "$region")" == "true" ]]; then
|
if [[ "$(check_osm_region_exists "$region")" == "true" ]]; then
|
||||||
echo "🌍 Updating OSM map: $region"
|
if [[ "$(check_osm_update "$region")" == "true" ]]; then
|
||||||
update_osm_map "$region"
|
echo "🌍 Updating OSM map: $region"
|
||||||
|
update_osm_map "$region"
|
||||||
|
|
||||||
echo "✂️ Building tiles: $region"
|
echo "✂️ Building tiles: $region"
|
||||||
update_tiles "$region"
|
update_tiles "$region"
|
||||||
|
|
||||||
[[ $is_updates == "false" ]] && is_updates="true"
|
[[ $is_updates == "false" ]] && is_updates="true"
|
||||||
|
else
|
||||||
|
echo "⚠️ No updates to \"$region\""
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo "⚠️ No updates to \"$region\""
|
echo "⚠️ Region \"$region\" does not exist"
|
||||||
fi
|
fi
|
||||||
else
|
done
|
||||||
echo "⚠️ Region \"$region\" does not exist"
|
else
|
||||||
fi
|
is_updates="true"
|
||||||
done
|
fi
|
||||||
|
|
||||||
if [[ $is_updates == "true" ]]; then
|
if [[ $is_updates == "true" ]]; then
|
||||||
echo "📒 Updating bounds..."
|
if [[ $OSMGARMIN_SKIP_UPDATE_BOUNDS != "true" ]]; then
|
||||||
update_bounds
|
echo "📒 Updating bounds..."
|
||||||
|
update_bounds
|
||||||
|
fi
|
||||||
|
|
||||||
region_id=1
|
region_id=1
|
||||||
|
|
||||||
|
|
|
@ -13,14 +13,7 @@ function wait() {
|
||||||
|
|
||||||
while :
|
while :
|
||||||
do
|
do
|
||||||
regions="europe/great-britain"
|
/app/build-gmap.sh "$OSMGARMIN_REGIONS" "$OSMGARMIN_STYLE"
|
||||||
style=""
|
|
||||||
first_run="true"
|
|
||||||
|
|
||||||
[[ -n "$OSMGARMIN_REGIONS" ]] && regions="$OSMGARMIN_REGIONS"
|
|
||||||
[[ -n "$OSMGARMIN_STYLE" ]] && style="$OSMGARMIN_STYLE"
|
|
||||||
|
|
||||||
/app/build-gmap.sh "$regions" "$style"
|
|
||||||
|
|
||||||
if [[ $? == 0 ]]; then
|
if [[ $? == 0 ]]; then
|
||||||
wait $sleep_time
|
wait $sleep_time
|
||||||
|
|
Loading…
Reference in New Issue