osm-garmin: various
This commit is contained in:
parent
8a2cafd2ee
commit
bcf7ff90d8
5 changed files with 75 additions and 39 deletions
|
@ -1,8 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
osm_source_prefix="https://download.geofabrik.de/"
|
||||
osm_source_suffix="-latest.osm.pbf"
|
||||
osm_source_name="geofabrik"
|
||||
|
||||
bounds_dir="/data/build/bounds"
|
||||
build_dir="/data/build/tmp"
|
||||
maps_dir="/data/build/osm"
|
||||
maps_dir="/data/build/osm/$osm_source_name"
|
||||
out_dir="/data/maps"
|
||||
styles_dir="/data/styles"
|
||||
tiles_dir="/data/build/tiles"
|
||||
|
@ -40,6 +44,14 @@ function check_osm_update() {
|
|||
echo $update
|
||||
}
|
||||
|
||||
function exec_mkgmap() {
|
||||
java -jar /opt/mkgmap/mkgmap.jar $@
|
||||
}
|
||||
|
||||
function exec_splitter() {
|
||||
java -jar /opt/splitter/splitter.jar $@
|
||||
}
|
||||
|
||||
function get_md5() {
|
||||
file="$1"
|
||||
echo "$(md5sum "$file" | cut -d' ' -f1)"
|
||||
|
@ -52,10 +64,10 @@ function get_md5_dir() {
|
|||
|
||||
function get_pbf_url() {
|
||||
region="$1"
|
||||
echo "https://download.geofabrik.de/$region-latest.osm.pbf"
|
||||
echo "${osm_source_prefix}${region}${osm_source_suffix}"
|
||||
}
|
||||
|
||||
function get_region_shortname() {
|
||||
region="$1"
|
||||
echo "$(echo "$region" | sed "s/\//./g")"
|
||||
echo "${region##*/}"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue