def METHOD_NAME(self):
    '''
    Generator which yields tuples like:
    (node_id, lat, lon, {way_id: way_props})
    '''
    i = 0
    node_ids = array.array('l')
    node_counts = array.array('i')
    for element_id, props, deps in parse_osm(self.filename, dependencies=True):
        props = {safe_decode(k): safe_decode(v) for k, v in six.iteritems(props)}
        if element_id.startswith('node'):
            node_id = long(element_id.split(':')[-1])
            node_ids.append(node_id)
            node_counts.append(0)
            self.node_props.Put(safe_encode(node_id), json.dumps(props))
        elif element_id.startswith('way'):
            # Don't care about the ordering of the nodes, and want uniques e.g. for circular roads
            deps = set(deps)
            # Get node indices by binary search
            for node_id in deps:
                try:
                    node_index = self.binary_search(node_ids, node_id)
                except ValueError:
                    continue
                if node_index is None:
                    continue
                node_counts[node_index] += 1
        if i % 1000 == 0 and i > 0:
            self.logger.info('doing {}s, at {}'.format(element_id.split(':')[0], i))
        i += 1
    for i, count in enumerate(node_counts):
        if count > 1:
            self.node_ids.append(node_ids[i])
    del node_ids
    del node_counts
    i = 0
    for element_id, props, deps in parse_osm(self.filename, dependencies=True):
        if element_id.startswith('node'):
            node_id = long(element_id.split(':')[-1])
            node_index = self.binary_search(self.node_ids, node_id)
        elif element_id.startswith('way'):
            props = {safe_decode(k): safe_decode(v) for k, v in six.iteritems(props)}
            way_id = long(element_id.split(':')[-1])
            props['id'] = way_id
            for node_id in deps:
                node_index = self.binary_search(self.node_ids, node_id)
                if node_index is not None:
                    self.intersection_edges_nodes.append(node_id)
                    self.intersection_edges_ways.append(way_id)
                    self.way_props.Put(safe_encode(way_id), json.dumps(props))
        if i % 1000 == 0 and i > 0:
            self.logger.info('second pass, doing {}s, at {}'.format(element_id.split(':')[0], i))
        i += 1
    i = 0
    indices = numpy.argsort(self.intersection_edges_nodes)
    self.intersection_edges_nodes = numpy.fromiter((self.intersection_edges_nodes[i] for i in indices), dtype=numpy.uint64)
    self.intersection_edges_ways = numpy.fromiter((self.intersection_edges_ways[i] for i in indices), dtype=numpy.uint64)
    del indices
    idx = 0
    # Need to make a copy here otherwise will change dictionary size during iteration
    for node_id, g in groupby(self.intersection_edges_nodes):
        group_len = sum((1 for j in g))
        node_props = json.loads(self.node_props.Get(safe_encode(node_id)))
        way_indices = self.intersection_edges_ways[idx:idx + group_len]
        all_ways = [json.loads(self.way_props.Get(safe_encode(w))) for w in way_indices]
        way_names = set()
        ways = []
        for way in all_ways:
            if way['name'] in way_names:
                continue
            ways.append(way)
            way_names.add(way['name'])
        idx += group_len
        if i % 1000 == 0 and i > 0:
            self.logger.info('checking intersections, did {}'.format(i))
        i += 1
        if len(ways) > 1:
            node_index = self.binary_search(self.node_ids, node_id)
            yield self.node_ids[node_index], node_props, ways