import random


def generate_random_coordinate(min_lat=-90,max_lat=90,min_lon=-180,max_lon=180,precision=6,seed=None):
    
    """Generate a random coordinate of defined precision within bounds.
    
    Parameters
    ----------
    min_lat : float (optional)
      minimum latitude in decimal degrees
    max_lat : float (optional)
      maximum latitude in decimal degrees
    min_lon : float (optional)
      minimum longitude in decimal degrees
    max_lat : float (optional)
      maximum longitude in decimal degrees
    precision : int (optional)
      number of digits to round to after decimal
    seed : int (optional)
      if set to int, sets random.seed(seed)
      
    Returns
    -------
    coord : tuple
      tuple of form (latitude,longitude)
    """
    
    if(isinstance(seed,int)):
        random.seed(seed)
    
    latitude = round(random.uniform(min_lat,max_lat),precision)
    
    longitude = round(random.uniform(min_lon,max_lon),precision)
    
    coord = (latitude,longitude)
    
    return coord