}
$bandHelper = new DiscreteBandHelper(DiscreteBandHelper::LABEL_TYPE_BAND, $bandSchema);
$ozoneBand = $bandHelper->getBand();
$bandHashMap = new Java("java.util.HashMap");
foreach ($ozoneBand as $key => $val) {
    $bandHashMap->put($key, doubleval($val));
}
$start = microtime(true);
$outFile = '';
$queryTime = 0;
$responseObject = false;
if ($responseObject === false) {
    $outFile = '/tmp/binaryout.png';
    $driver = new Java('LatLongInterpolation.LatLngDriver', $bandHashMap);
    $r = $driver->getContours($allData['ozoneStations'], $allData['windStations'], $allData['ozoneValues'], $allData['windSpeed'], $allData['windDirection'], $stepSize);
    $responseObject = prepareResponseObject(java_values($r), '1233444000');
}
if (!empty($allData['ozoneStations'])) {
    for ($i = 0; $i < count($allData['ozoneStations']); $i++) {
        $lat = $errorData[$i]['lat'];
        $lng = $errorData[$i]['lng'];
        $o3 = $allData['ozoneValues'][0][$i];
        $siteDesc = "({$lat},{$lng})|{$errorData[$i]['err']}";
        $responseObject['station'][] = array('lat' => $lat, 'lng' => $lng, 'o3' => $o3, 'desc' => $siteDesc);
    }
}
$end = microtime(true);
include_once 'nebula/dochead.inc';
echo "<pre>Using Band Schema '" . $bandHelper->getSchemeId() . "' " . implode(",", $ozoneBand) . "\n";
echo "Min value: {$min}\n";
echo "Mean : {$mean}\n";
$queryManager = new QueryManager();
$allData = $queryManager->getMonthlyAvg($monthStartEpoch, $monthEndEpoch);
$bandSchema = 4;
$bandHelper = new DiscreteBandHelper(DiscreteBandHelper::LABEL_TYPE_BAND, $bandSchema);
$ozoneBand = $bandHelper->getBand();
$bandHashMap = new Java("java.util.HashMap");
foreach ($ozoneBand as $key => $val) {
    $bandHashMap->put($key, doubleval($val));
}
$start = microtime(true);
$outFile = '';
$queryTime = 0;
$outFile = '/tmp/binaryout.png';
$driver = new Java('LatLongInterpolation.LatLngDriver', $bandHashMap);
$r = $driver->getContours($allData['ozoneStations'], $allData['windStations'], $allData['ozoneValues'], $allData['windSpeed'], $allData['windDirection'], $stepSize);
$responseObject = prepareResponseObject(java_values($r), $monthStartEpoch);
if (!empty($allData['ozoneStations'])) {
    for ($i = 0; $i < count($allData['ozoneStations']); $i++) {
        $lat = $allData['ozoneStations'][$i][0];
        $lng = $allData['ozoneStations'][$i][1];
        $o3 = $allData['ozoneValues'][0][$i];
        $siteDesc = "({$lat},{$lng})|{$allData['ozoneValues'][0][$i]}";
        $responseObject['station'][] = array('lat' => $lat, 'lng' => $lng, 'o3' => $o3, 'desc' => $siteDesc);
    }
}
$end = microtime(true);
include_once 'nebula/dochead.inc';
echo "<pre>Using Band Schema '" . $bandHelper->getSchemeId() . "' " . implode(",", $ozoneBand) . "\n";
print "Execution Time : " . ($end - $start) . "sec\n";
print "</pre>";
if (!empty($outFile)) {
$responseObject = $contourDataStore->retrieveContour($timestamp);
if (!empty($responseObject)) {
    $fsCacheDetected = true;
    $responseObject = json_decode($responseObject, true);
}
$outFile = '';
$queryTime = 0;
if ($responseObject === false) {
    $outFile = '/tmp/binaryout.png';
    $driver = new Java('LatLongInterpolation.LatLngDriver', $bandHashMap);
    $queryStart = microtime(true);
    $allData = $queryManager->getDataForWindBasedInterpolation($timestamp, 6, true);
    $queryTime = microtime(true) - $queryStart;
    $r = $driver->getContours($allData['ozoneStations'], $allData['windStations'], $allData['ozoneValues'], $allData['windSpeed'], $allData['windDirection'], $stepSize);
    //$r = $driver->drive();
    $responseObject = prepareResponseObject(java_values($r), $timestamp);
}
$stationData = array();
if ($fetchStationData) {
    $queryStart = microtime(true);
    $stationData = $queryManager->getOzoneForTimestamp($timestamp);
    $queryTime += microtime(true) - $queryStart;
}
if ($fetchStationData && !empty($stationData)) {
    for ($i = 0; $i < count($stationData); $i++) {
        $o3_flag = $stationData[$i][4];
        if ($o3_flag != 'K') {
            continue;
        }
        $lat = $stationData[$i][1];
        $lng = $stationData[$i][2];