exit(0); } date_default_timezone_set("America/Chicago"); // central time require_once 'http://localhost:8080/JavaBridgeTemplate621/java/Java.inc'; include_once 'ozonemaps/php-helpers/QueryManager.php'; include_once 'ozonemaps/php-helpers/GridConfig.php'; include_once 'ozonemaps/php-helpers/ContourCacheHelper.php'; include_once 'ozonemaps/php-helpers/DiscreteBandHelper.php'; include_once 'ozonemaps/php-helpers/ResponseHelper.php'; if (is_numeric($argv[1]) && is_numeric($argv[2])) { $timestamp = getBoundaryTimestamp($argv[1]); if (doubleval($argv[2]) == -1) { $txnAt = -1; } else { $txnAt = getBoundaryTimestamp($argv[2]); } } else { echo "Usage: " . $argv[0] . " <epoch> <txnepoch> [<bandScheme>]\n"; echo "Force: " . $argv[0] . " <epoch> -1 [<bandScheme>]\n"; exit(0); } $bandScheme = !empty($argv[3]) && is_numeric($argv[3]) ? intval($argv[3]) : 0; $grid = array(); $queryTime = 0; $bandHelper = new DiscreteBandHelper(DiscreteBandHelper::LABEL_TYPE_BAND, $bandScheme); $ozoneBand = $bandHelper->getBand(); $bandHashMap = new Java("java.util.HashMap"); foreach ($ozoneBand as $key => $val) { $bandHashMap->put($key, doubleval($val)); }
if ($useLatestDataWhenFail == 1) { $timestamp = $queryManager->latestGridAvailableTime(); } else { if ($requestType == 'json') { sendJsonResponse(array(), $timestamp, $timestamp2, "No timestamp specified"); exit(0); } else { echo "<pre># Error: no timesamp specified</pre>\n"; exit(1); } } } $timestamp2 = $timestamp; // initialize to $timestamp if (isset($_REQUEST['timestamp2']) && is_numeric($_REQUEST['timestamp2'])) { $timestamp2 = getBoundaryTimestamp($_REQUEST['timestamp2']); } if ($timestamp2 < $timestamp) { $tmp = $timestamp; $timestamp = $timestamp2; $timestamp2 = $tmp; } if ($timestamp2 - $timestamp >= MAX_SNAPSHOTS * $interval) { $timestamp2 = $timestamp + (MAX_SNAPSHOTS - 1) * $interval; $errMsg = "timestamp2 clipped to {$timestamp2}"; } // parse lat/lng pairs $latlon = !empty($_REQUEST['latlng']) ? explode(":", $_REQUEST['latlng']) : array(); $pointsOfInterest = array(); foreach ($latlon as $oneLatLon) { $onePoint = explode(',', $oneLatLon);
// if argument parameters empty, just redirect to index if (empty($argv)) { header("Location:/test/ozonemaps/"); exit(0); } elseif (count($argv) < 2) { echo "Usage: " . $argv[0] . " <epoch>\n"; exit(0); } date_default_timezone_set("America/Chicago"); // central time require_once 'http://localhost:8082/JavaBridge/java/Java.inc'; include_once 'nebula/QueryManager.php'; include_once 'nebula/GridConfig.php'; include_once 'nebula/DiscreteBandHelper.php'; if (is_numeric($argv[1])) { $timestamp = getBoundaryTimestamp($argv[1]); } else { echo "Usage: " . $argv[0] . " <epoch>\n"; exit(0); } $bandScheme = 0; $start = microtime(true); $grid = array(); $bandHelper = new DiscreteBandHelper(DiscreteBandHelper::LABEL_TYPE_BAND, $bandScheme); $ozoneBand = $bandHelper->getBand(); $bandHashMap = new Java("java.util.HashMap"); foreach ($ozoneBand as $key => $val) { $bandHashMap->put($key, doubleval($val)); } $driver = new Java('LatLongInterpolation.LatLngDriver', $bandHashMap); $driver->setWriteDebugImages(false);