def _load_layermap(layermapfile):
    """
    Load layermap information from layermapfile (Foundry techfile can be used)
    Parameters
    ----------
    layermapfile : str
        layermap filename
        example can be found in default.layermap or see below
        #technology layer information
        #layername  layerpurpose stream# datatype
        text        drawing 100 0
        prBoundary  drawing 101 0
        metal1      M1      drawing 50  0
        metal1      M1      pin     50  10
        metal2      M2      drawing 51  0
        metal2      M2      pin     51  10
    Returns
    -------
    dict
        constructed layermap information
    """
    layermap = dict()
    f = open(layermapfile, 'r')
    for line in f:
        tokens = line.split()
        if not len(tokens) == 0:
            if not tokens[0].startswith('#'):
                name = tokens[0]
                #if not layermap.has_key(name):
                if name not in layermap:
                    layermap[name] = dict()
                layermap[name][tokens[1]] = [int(tokens[2]), int(tokens[3])]
    return layermap