(origin, orientation, length)
return transect
Create a transect given an origin, orientation and length.
    Points are spaced at 1m intervals.
    
    KV WRL 2018
    
    Arguments:
    -----------
    origin: np.array
        contains the X and Y coordinates of the origin of the transect
    orientation: int
        angle of the transect (anti-clockwise from North) in degrees
    length: int
        length of the transect in metres
        
    Returns:    
    -----------
    transect: np.array
        contains the X and Y coordinates of the transect
Create a transect given an origin, orientation and length.
    Points are spaced at 1m intervals.
    
    KV WRL 2018
    
    Arguments:
    -----------
    origin: np.array
        contains the X and Y coordinates of the origin of the transect
    orientation: int
        angle of the transect (anti-clockwise from North) in degrees
    length: int
        length of the transect in metres
        
    Returns:    
    -----------
    transect: np.array
        contains the X and Y coordinates of the transect
Create a transect given an origin orientation and length . Points are spaced at 1m intervals . KV WRL 2018 Arguments : ----------- origin : np . array contains the X and Y coordinates of the origin of the transect orientation : int angle of the transect ( anti - clockwise from North ) in degrees length : int length of the transect in metres Returns : ----------- transect : np . array contains the X and Y coordinates of the transect
def create_transect(origin, orientation, length):
    """
    Create a transect given an origin, orientation and length.
    Points are spaced at 1m intervals.
    
    KV WRL 2018
    
    Arguments:
    -----------
    origin: np.array
        contains the X and Y coordinates of the origin of the transect
    orientation: int
        angle of the transect (anti-clockwise from North) in degrees
    length: int
        length of the transect in metres
        
    Returns:    
    -----------
    transect: np.array
        contains the X and Y coordinates of the transect
        
    """   
    
    # origin of the transect
    x0 = origin[0]
    y0 = origin[1]
    # orientation of the transect
    phi = (90 - orientation)*np.pi/180 
    # create a vector with points at 1 m intervals
    x = np.linspace(0,length,length+1)
    y = np.zeros(len(x))
    coords = np.zeros((len(x),2))
    coords[:,0] = x
    coords[:,1] = y 
    # translate and rotate the vector using the origin and orientation
    tf = transform.EuclideanTransform(rotation=phi, translation=(x0,y0))
    transect = tf(coords)
                
    return transect
def create_transect ( origin , orientation , length ) : # origin of the transect x0 = origin [ 0 ] y0 = origin [ 1 ] # orientation of the transect phi = ( 90 - orientation ) * np . pi / 180 # create a vector with points at 1 m intervals x = np . linspace ( 0 , length , length + 1 ) y = np . zeros ( len ( x ) ) coords = np . zeros ( ( len ( x ) , 2 ) ) coords [ : , 0 ] = x coords [ : , 1 ] = y # translate and rotate the vector using the origin and orientation tf = transform . EuclideanTransform ( rotation = phi , translation = ( x0 , y0 ) ) transect = tf ( coords ) return transect