pyroSAR/gamma/auxil.py
def slc_corners(parfile):
    """
    extract the corner coordinates of a SAR scene
    
    Parameters
    ----------
    parfile: str
        the GAMMA parameter file to read coordinates from

    Returns
    -------
    dict of float
        a dictionary with keys xmin, xmax, ymin, ymax
    """
    out, err = process(['SLC_corners', parfile], void=False)
    pts = {}
    for line in out.split('\n'):
        if line.startswith('min. latitude'):
            pts['ymin'], pts['ymax'] = [float(x) for x in
                                        re.findall('[0-9]+\.[0-9]+', line)]
        elif line.startswith('min. longitude'):
            pts['xmin'], pts['xmax'] = [float(x) for x in
                                        re.findall('[0-9]+\.[0-9]+', line)]
    return pts

    extract the corner coordinates of a SAR scene
    
    Parameters
    ----------
    parfile: str
        the GAMMA parameter file to read coordinates from

    Returns
    -------
    dict of float
        a dictionary with keys xmin, xmax, ymin, ymax
    
extract the corner coordinates of a SAR scene
Parameters

str
the GAMMA parameter file to read coordinates from

Returns

dict of float
a dictionary with keys xmin, xmax, ymin, ymax
extract the corner coordinates of a SAR scene Parameters str the GAMMA parameter file to read coordinates from Returns dict of float a dictionary with keys xmin xmax ymin ymax
def slc_corners(parfile):
    out, err = process(['SLC_corners', parfile], void=False)
    pts = {}
    for line in out.split('\n'):
        if line.startswith('min. latitude'):
            pts['ymin'], pts['ymax'] = [float(x) for x in
                                        re.findall('[0-9]+\.[0-9]+', line)]
        elif line.startswith('min. longitude'):
            pts['xmin'], pts['xmax'] = [float(x) for x in
                                        re.findall('[0-9]+\.[0-9]+', line)]
    return pts
def slc_corners ( parfile ) : out , err = process ( [ 'SLC_corners' , parfile ] , void = False ) pts = { } for line in out . split ( '\n' ) : if line . startswith ( 'min. latitude' ) : pts [ 'ymin' ] , pts [ 'ymax' ] = [ float ( x ) for x in re . findall ( '[0-9]+\.[0-9]+' , line ) ] elif line . startswith ( 'min. longitude' ) : pts [ 'xmin' ] , pts [ 'xmax' ] = [ float ( x ) for x in re . findall ( '[0-9]+\.[0-9]+' , line ) ] return pts
extract the corner coordinates of a SAR scene
Parameters
extract the corner coordinates of a SAR scene Parameters
"""
    extract the corner coordinates of a SAR scene
    
    Parameters
    ----------
    parfile: str
        the GAMMA parameter file to read coordinates from

    Returns
    -------
    dict of float
        a dictionary with keys xmin, xmax, ymin, ymax
    """
parfile