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