@staticmethod
def _attributes(element):
    """Get OSM element atttributes and do some common type conversion"""
    result = {}
    for k, v in element.attrib.items():
        if k == 'uid':
            v = int(v)
        elif k == 'changeset':
            v = int(v)
        elif k == 'version':
            v = float(v)
        elif k == 'id':
            v = int(v)
        elif k == 'lat':
            v = float(v)
        elif k == 'lon':
            v = float(v)
        elif k == 'open':
            v = v == 'true'
        elif k == 'visible':
            v = v == 'true'
        elif k == 'ref':
            v = int(v)
        elif k == 'comments_count':
            v = int(v)
        result[k] = v
    return result
