This file is indexed.

/usr/sbin/geographiclib-datasets-download is in geographiclib-tools 1.8-2.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
#!/bin/bash
#
# Copyright (C) 2010 Francesco P. Lovergine <frankie@debian.org>
# 
# This script shamely predates my previous GMT coast lines download script.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3, 
# as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
#

usage() { 
	cat <<EOF
usage: $0 [egm84_30|egm84_15|egm96_15|egm96_5|egm2k8_5|egm2k8_2.5|egm2k8_1|all] 

This program can be used to download the earth Geoid models used by 
GeographicLib and the GeoidEval tool to compute the EGM geoid heights by 
interpolation at different grid size. Note that by default the EGM96 
Geoid is used with a 5' grid, but you can use any of the following 
models and resolutions, with different resolts in approximation errors:

                                  bilinear error    cubic error
   name         geoid    grid     max     rms       max     rms
   egm84-30     EGM84    30'      1.546m  70mm      0.274m  14mm
   egm84-15     EGM84    15'      0.413m  18mm      0.020m   1mm
   egm96-15     EGM96    15'      1.152m  40mm      0.169m   7mm
   egm96-5      EGM96     5'      0.140m   5mm      0.003m   1mm
   egm2008-5    EGM2008   5'      0.478m  12mm      0.294m   5mm
   egm2008-2_5  EGM2008   2.5'    0.135m   3mm      0.031m   1mm
   egm2008-1    EGM2008   1'      0.025m   1mm      0.003m   1mm

EOF
}

set -e

if [ $(id -u) -ne 0 ]; then
	echo "Run this script as root"
	exit 1
fi

if [ $(which bunzip2|wc -l) -eq 0 ]; then
    echo "Please install bzip2 before using this script"
    exit 6
fi

# List of currently available data grids
ALL="egm96-5 egm96-15 egm84-30 egm84-15 egm2008-5 egm2008-2_5 egm2008-1"

# Default is downloading EGM96 geoid with 5' grid
if [ $# -eq 0 ]; then
	FILE=egm96-5
else
	case "$1" in
		egm84_30)
			FILE=egm84-30
			;;
		egm84_15)
			FILE=egm84-15
			;;
		egm96_15)
			FILE=egm96-15
			;;
		egm96_5)
			FILE=egm96-5
			;;
		egm2k8_5)
			FILE=egm2008-5
			;;
		egm2k8_2.5)
			FILE=egm2008-2_5
			;;
		egm2k8_1)
			FILE=egm2008-1
			;;
		all)
			FILE=all
			;;
		help|-h|--help)
			usage
			exit 5
			;;
		*)
			echo "Unknown argument '$1'" && usage
			exit 4
			;;
	esac
fi

SHARE_DIR=/usr/share/geographiclib
if [ ! -d $SHARE_DIR ]; then
	echo "Geographiclib target directory $SHARE_DIR not found"
	exit 2
fi
TMPDIR=`mktemp -t -d geographiclib-geoid.XXXXXXXX` || exit 3

get_file() {
    URL="http://downloads.sourceforge.net/project/geographiclib/geoids-distrib/$1.tar.bz2?use_mirror=autoselect"
    ARCHIVE=$TMPDIR/$1.tar.bz2
    if [ -x /usr/bin/wget ]; then
        GET_IT="wget --progress=bar -O$ARCHIVE $URL"
    else if [ -x /usr/bin/curl ]; then
                GET_IT="curl --progress-bar -o$ARCHIVE $URL"
         fi
    fi
    echo $GET_IT && $GET_IT && tar xojvf $ARCHIVE -C $SHARE_DIR
}

if [ "$FILE" != "all" ]; then
    get_file $FILE
else
    for f in $ALL 
    do
        get_file $f
    done
fi

rm -rf $TMPDIR

cat <<EOF

Geoid grid(s) downloaded and installed under $SHARE_DIR/geoids.

EOF

exit 0