def region(lat, lon):
    if -45 <= lat and lat < -25 and -180 <= lon and lon < -175:
        # southern hemisphere, near dateline
        return 'Islands'
    
    elif 15 <= lat and lat < 30 and -180 <= lon and lon < -150:
        # around hawaii
        return 'Islands'
    
    elif -60 <= lat and lat < -35 and -40 <= lon and lon < 80:
        # south atlantic ocean
        return 'Islands'
    
    elif -35 <= lat and lat < -5 and -30 <= lon and lon < -5:
        # mid-atlantic, between africa and south america
        return 'Islands'
    
    elif -60 <= lat and lat < -40 and 155 <= lon and lon < 180:
        # southern half of new zealand
        return 'Islands'
    
    elif -40 <= lat and lat < -25 and 165 <= lon and lon < 180:
        # northern half of new zealand
        return 'Islands'
    
    if 15 <= lat and lat < 61 and -170 <= lon and lon < -40:
        return 'North_America'
    
    elif -60 <= lat and lat < 15 and -95 <= lon and lon < -30:
        return 'South_America'
    
    elif -35 <= lat and lat < 35 and -30 <= lon and lon < 60:
        return 'Africa'
    
    elif -20 <= lat and lat < -15 and 60 <= lon and lon < 65:
        return 'Africa'
    
    elif 35 <= lat and lat < 40 and -35 <= lon and lon < -20:
        return 'Africa'
    
    elif -10 <= lat and lat < 61 and -15 <= lon and lon < 180:
        return 'Eurasia'
    
    elif -10 <= lat and lat < 61 and -180 <= lon and lon < -135:
        return 'Eurasia'
    
    elif -15 <= lat and lat < -10 and 95 <= lon and lon < 100:
        return 'Eurasia'
    
    elif -45 <= lat and lat < -10 and 110 <= lon and lon < 180:
        return 'Australia'
    
    raise ValueError('Unknown location: %s, %s' % (lat, lon))
Return the SRTM3 region name of a given lat, lon.
dataset/ETHPy150Open migurski/DEM-Tools/Hillup/data/SRTM3.py/region