pycrs/elements/ellipsoids.py
def find(ellipsname, crstype, strict=False):
    """
    Search for a ellipsoid name located in this module.

    Arguments:

    - **ellipsname**: The ellipsoid name to search for.
    - **crstype**: Which CRS naming convention to search (different
        CRS formats have different names for the same ellipsoid).
    - **strict** (optional): If False, ignores minor name mismatches
        such as underscore or character casing, otherwise must be exact
        match (defaults to False). 
    """
    if not strict:
        ellipsname = ellipsname.lower().replace(" ","_")
    for itemname,item in globals().items():
        if itemname.startswith("_") or itemname == 'Ellipsoid':
            continue
        try:
            if hasattr(item.name, crstype):
                itemname = getattr(item.name, crstype)
                if not strict:
                    itemname = itemname.lower().replace(" ","_")
                if ellipsname == itemname:
                    return item
        except:
            pass
    else:
        return None
def find(ellipsname, crstype, strict=False):
    if not strict:
        ellipsname = ellipsname.lower().replace(" ","_")
    for itemname,item in globals().items():
        if itemname.startswith("_") or itemname == 'Ellipsoid':
            continue
        try:
            if hasattr(item.name, crstype):
                itemname = getattr(item.name, crstype)
                if not strict:
                    itemname = itemname.lower().replace(" ","_")
                if ellipsname == itemname:
                    return item
        except:
            pass
    else:
        return None
def find ( ellipsname , crstype , strict = False ) : if not strict : ellipsname = ellipsname . lower ( ) . replace ( " " , "_" ) for itemname , item in globals ( ) . items ( ) : if itemname . startswith ( "_" ) or itemname == 'Ellipsoid' : continue try : if hasattr ( item . name , crstype ) : itemname = getattr ( item . name , crstype ) if not strict : itemname = itemname . lower ( ) . replace ( " " , "_" ) if ellipsname == itemname : return item except : pass else : return None
Search for a ellipsoid name located in this module.

    Arguments:

    - **ellipsname**: The ellipsoid name to search for.
    - **crstype**: Which CRS naming convention to search (different
        CRS formats have different names for the same ellipsoid).
    - **strict** (optional): If False, ignores minor name mismatches
        such as underscore or character casing, otherwise must be exact
        match (defaults to False).
Search for a ellipsoid name located in this module .