func ReadFile(file string) (sw *LatLng, squareSize int, elevations []int16, err error) {
	f, err := os.Open(file)
	if err != nil {
		return sw, squareSize, elevations, err
	}
	defer f.Close()

	if strings.HasSuffix(file, ".gz") {
		rdr, err := gzip.NewReader(f)
		if err != nil {
			return sw, squareSize, elevations, err
		}
		defer rdr.Close()
		bytes, err := ioutil.ReadAll(rdr)
		if err != nil {
			return sw, squareSize, elevations, err
		}
		return Read(file, bytes)
	}
	bytes, err := ioutil.ReadAll(f)
	if err != nil {
		return sw, squareSize, elevations, err
	}
	return Read(file, bytes)
}
// ReadFile is a helper func around Read that reads a SRTM file, decompressing
// if necessary, and returns  SRTM elevation data
ReadFile is a helper func around Read that reads a SRTM file, decompressing
if necessary, and returns  SRTM elevation data
// ReadFile is a helper func around Read that reads a SRTM file decompressing // if necessary and returns SRTM elevation data
func ReadFile(file string) (sw *LatLng, squareSize int, elevations []int16, err error) {
	f, err := os.Open(file)
	if err != nil {
		return sw, squareSize, elevations, err
	}
	defer f.Close()
	if strings.HasSuffix(file, ".gz") {
		rdr, err := gzip.NewReader(f)
		if err != nil {
			return sw, squareSize, elevations, err
		}
		defer rdr.Close()
		bytes, err := ioutil.ReadAll(rdr)
		if err != nil {
			return sw, squareSize, elevations, err
		}
		return Read(file, bytes)
	}
	bytes, err := ioutil.ReadAll(f)
	if err != nil {
		return sw, squareSize, elevations, err
	}
	return Read(file, bytes)
}
func ReadFile ( file string ) ( sw * LatLng , squareSize int , elevations [ ] int16 , err error ) { f , err := os . Open ( file ) if err != nil { return sw , squareSize , elevations , err } defer f . Close ( ) if strings . HasSuffix ( file , " " ) { rdr , err := gzip . NewReader ( f ) if err != nil { return sw , squareSize , elevations , err } defer rdr . Close ( ) bytes , err := ioutil . ReadAll ( rdr ) if err != nil { return sw , squareSize , elevations , err } return Read ( file , bytes ) } bytes , err := ioutil . ReadAll ( f ) if err != nil { return sw , squareSize , elevations , err } return Read ( file , bytes ) }
ReadFile is a helper func around Read that reads a SRTM file, decompressing
if necessary, and returns  SRTM elevation data
ReadFile is a helper func around Read that reads a SRTM file decompressing if necessary and returns SRTM elevation data