step one
This commit is contained in:
parent
7a8d5d13fa
commit
9e663db9dc
68 changed files with 5647 additions and 2958 deletions
|
|
@ -71,9 +71,10 @@ func (d *Dataset) getCell(latIdx, lngIdx int) int16 {
|
|||
return int16(binary.LittleEndian.Uint16(d.mm[off : off+2]))
|
||||
}
|
||||
|
||||
// Get returns the interpolated elevation in metres at the given coordinates.
|
||||
// lat: -90 to +90, lng: 0 to 360 (or -180 to 180, will be normalised).
|
||||
func (d *Dataset) Get(lat, lng float64) float64 {
|
||||
// Elevation returns the bilinearly-interpolated ground elevation in metres at
|
||||
// the given coordinates. lat is in [-90, +90]; lng accepts either [0, 360) or
|
||||
// [-180, 180) and is normalised internally.
|
||||
func (d *Dataset) Elevation(lat, lng float64) float64 {
|
||||
// Normalise longitude to [0, 360)
|
||||
if lng < 0 {
|
||||
lng += 360
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue