Skip to content

Latest commit

 

History

History
27 lines (22 loc) · 862 Bytes

README.md

File metadata and controls

27 lines (22 loc) · 862 Bytes

srtm

Go library for reading Shuttle Radar Topography Mission (SRTM) HGT files

GoDoc Go Report Card Build Status

package main

import (
	"github.com/jda/srtm"
	"log"
)

func main() {
	geo, err := srtm.ReadFile("srtm/testdata/S46W067.hgt")
	if err != nil {
		log.Fatal(err)
	}
	p := geo[30]
	log.Printf("Lat: %.4f, Lng: %.4f, Elevation: %d", p.Latitude, p.Longitude, p.Elevation)
}

Limitations

  1. Until issue #3 is resolved, only 1-arcsecond tiles are supported.