@SuppressWarnings("unchecked")
	public synchronized long generateNodeId(String key, Coordinate c, List<String[]> tags, List<String> shapes){

		Coordinate coor = new Coordinate(round(c.x,7), round(c.y,7));

		Long id = null;

		if (totalNodes.get(key) == null)
			totalNodes.put(key, new ConcurrentHashMap<NodeOsm, Long>());

		if (!totalNodes.get(key).isEmpty())
			id = totalNodes.get(key).get(new NodeOsm(coor));
		if (id != null){
			NodeOsm n = ((NodeOsm) getKeyFromValue((Map< String, Map<Object, Long>>) ((Object) totalNodes), key, id));
			if (tags != null)
				n.addTags(tags);
			n.addShapes(shapes);
			return id;
		}
		else{
			idnode--;
			NodeOsm n = new NodeOsm(coor);
			if (tags != null)
				n.addTags(tags);
			n.setShapes(shapes);
			totalNodes.get(key).putIfAbsent(n, idnode);
			return idnode;
		}
	}