double getAreaInSquareKilometers(int cellId) {
        if ((cellId < 0) || (cellId >= mesh.countCells())) {
            return 0;
        }
        if (mesh.isPentagon(cellId)) {
            return getAreaOfHexagonalCellInSquareKilometers() * 5.0 / 6.0;
        } else {
            return getAreaOfHexagonalCellInSquareKilometers();
        }
    }