public Emage buildEmage(Timestamp lastEmageCreationTime, long windowSizeMS) {
		
		filterPointQueueByWindow(windowSizeMS);
		
		this.pointQueue.addAll(this.pointStream.getAndClearNewPointsQueue());		
		Iterator<STTPoint> pointIterator = this.pointQueue.iterator();
				
		GeoParams geoParams = this.pointStream.getGeoParams();
		
		//Initialize grid to correct values
		double[][] valueGrid = createEmptyValueGrid(geoParams, this.operator);
		
		//For holding the counts so we can compute the avg of each cell
		double[][] avgAssistGrid = createEmptyValueGrid(geoParams, Operator.AVG);
		
		while (pointIterator.hasNext()) {
			STTPoint currPoint = pointIterator.next();
						
			int x = getXIndex(geoParams, currPoint);
			int y = getYIndex(geoParams, currPoint);
						
			if (x>=0 && y >=0) {
				switch (this.operator) {
				case MAX:
					valueGrid[x][y] = Math.max(valueGrid[x][y], currPoint.getValue());
					break;
				case MIN:
					valueGrid[x][y] = Math.min(valueGrid[x][y], currPoint.getValue());
					break;
				case SUM:
					valueGrid[x][y] += currPoint.getValue();
					break;
				case COUNT:
					System.out.println("x: "+x+", y: "+y);
					System.out.println("x size: " + valueGrid.length + "y size: "+ valueGrid[0].length);
					System.out.println(currPoint);
					valueGrid[x][y]++;
					break;
				case AVG:
					double total = valueGrid[x][y]*avgAssistGrid[x][y];
					//Add one to the count from that cell, 
					valueGrid[x][y] = (total+currPoint.getValue())/++avgAssistGrid[x][y];
					break;
				}
			}
		}
		return new Emage(valueGrid, lastEmageCreationTime, new Timestamp(System.currentTimeMillis()), this.pointStream.getAuthFields(), 
				this.pointStream.getWrapperParams(), geoParams);
	}