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,6 +137,7 @@ is_updates="false"
|
||||||
|
|
||||||
[[ $OSMGARMIN_FORCE_BUILD == "true" ]] && is_updates="true"
|
[[ $OSMGARMIN_FORCE_BUILD == "true" ]] && is_updates="true"
|
||||||
|
|
||||||
|
if [[ $OSMGARMIN_SKIP_UPDATE_MAPS != "true" ]]; then
|
||||||
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
|
||||||
if [[ "$(check_osm_update "$region")" == "true" ]]; then
|
if [[ "$(check_osm_update "$region")" == "true" ]]; then
|
||||||
|
@ -167,10 +155,15 @@ for region in $regions_array; do
|
||||||
echo "⚠️ Region \"$region\" does not exist"
|
echo "⚠️ Region \"$region\" does not exist"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
else
|
||||||
|
is_updates="true"
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ $is_updates == "true" ]]; then
|
if [[ $is_updates == "true" ]]; then
|
||||||
|
if [[ $OSMGARMIN_SKIP_UPDATE_BOUNDS != "true" ]]; then
|
||||||
echo "📒 Updating bounds..."
|
echo "📒 Updating bounds..."
|
||||||
update_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