func southWest(file string) (p *LatLng, err error) {
	fnameParts := srtmParseName.FindStringSubmatch(file)
	if fnameParts == nil {
		return p, ErrInvalidHGTFileName
	}

	swLatitude, err := dToDecimal(fnameParts[1] + fnameParts[2])
	if err != nil {
		return p, errors.Wrap(err, "could not get Latitude from file name")
	}
	swLongitude, err := dToDecimal(fnameParts[3] + fnameParts[4])
	if err != nil {
		return p, errors.Wrap(err, "could not get Longitude from file name")
	}

	return &LatLng{
		Latitude:  swLatitude,
		Longitude: swLongitude,
	}, err
}
// sw returns the southwest point contained in a HGT file.
// Coordinates in the file are relative to this point
sw returns the southwest point contained in a HGT file.
Coordinates in the file are relative to this point
// sw returns the southwest point contained in a HGT file . // Coordinates in the file are relative to this point
func southWest(file string) (p *LatLng, err error) {
	fnameParts := srtmParseName.FindStringSubmatch(file)
	if fnameParts == nil {
		return p, ErrInvalidHGTFileName
	}
	swLatitude, err := dToDecimal(fnameParts[1] + fnameParts[2])
	if err != nil {
		return p, errors.Wrap(err, "could not get Latitude from file name")
	}
	swLongitude, err := dToDecimal(fnameParts[3] + fnameParts[4])
	if err != nil {
		return p, errors.Wrap(err, "could not get Longitude from file name")
	}
	return &LatLng{
		Latitude:  swLatitude,
		Longitude: swLongitude,
	}, err
}
func southWest ( file string ) ( p * LatLng , err error ) { fnameParts := srtmParseName . FindStringSubmatch ( file ) if fnameParts == nil { return p , ErrInvalidHGTFileName } swLatitude , err := dToDecimal ( fnameParts [ 1 ] + fnameParts [ 2 ] ) if err != nil { return p , errors . Wrap ( err , " " ) } swLongitude , err := dToDecimal ( fnameParts [ 3 ] + fnameParts [ 4 ] ) if err != nil { return p , errors . Wrap ( err , " " ) } return & LatLng { Latitude : swLatitude , Longitude : swLongitude , } , err }
sw returns the southwest point contained in a HGT file.
sw returns the southwest point contained in a HGT file .