(points, epsg_in, epsg_out)
return points_converted
Converts from one spatial reference to another using the epsg codes
    
    KV WRL 2018

    Arguments:
    -----------
    points: np.array or list of np.ndarray
        array with 2 columns (rows first and columns second)
    epsg_in: int
        epsg code of the spatial reference in which the input is
    epsg_out: int
        epsg code of the spatial reference in which the output will be            
                
    Returns:    
    -----------
    points_converted: np.array or list of np.array 
        converted coordinates from epsg_in to epsg_out
Converts from one spatial reference to another using the epsg codes
    
    KV WRL 2018
Converts from one spatial reference to another using the epsg codes KV WRL 2018
def convert_epsg(points, epsg_in, epsg_out):
    """
    Converts from one spatial reference to another using the epsg codes
    
    KV WRL 2018

    Arguments:
    -----------
    points: np.array or list of np.ndarray
        array with 2 columns (rows first and columns second)
    epsg_in: int
        epsg code of the spatial reference in which the input is
    epsg_out: int
        epsg code of the spatial reference in which the output will be            
                
    Returns:    
    -----------
    points_converted: np.array or list of np.array 
        converted coordinates from epsg_in to epsg_out
        
    """
    
    # define input and output spatial references
    inSpatialRef = osr.SpatialReference()
    inSpatialRef.ImportFromEPSG(epsg_in)
    outSpatialRef = osr.SpatialReference()
    outSpatialRef.ImportFromEPSG(epsg_out)
    # create a coordinates transform
    coordTransform = osr.CoordinateTransformation(inSpatialRef, outSpatialRef)
    # if list of arrays
    if type(points) is list:
        points_converted = []
        # iterate over the list
        for i, arr in enumerate(points): 
            points_converted.append(np.array(coordTransform.TransformPoints(arr)))
    # if single array
    elif type(points) is np.ndarray:
        points_converted = np.array(coordTransform.TransformPoints(points))  
    else:
        raise Exception('invalid input type')

    return points_converted
def convert_epsg ( points , epsg_in , epsg_out ) : # define input and output spatial references inSpatialRef = osr . SpatialReference ( ) inSpatialRef . ImportFromEPSG ( epsg_in ) outSpatialRef = osr . SpatialReference ( ) outSpatialRef . ImportFromEPSG ( epsg_out ) # create a coordinates transform coordTransform = osr . CoordinateTransformation ( inSpatialRef , outSpatialRef ) # if list of arrays if type ( points ) is list : points_converted = [ ] # iterate over the list for i , arr in enumerate ( points ) : points_converted . append ( np . array ( coordTransform . TransformPoints ( arr ) ) ) # if single array elif type ( points ) is np . ndarray : points_converted = np . array ( coordTransform . TransformPoints ( points ) ) else : raise Exception ( 'invalid input type' ) return points_converted