REFERER = $_SERVER['HTTP_REFERER'];
$this->ACTION = V::get('action', '', $_GET, '');
}
public function defaultAction() {
SE_Layout::gora();
SE_Layout::menu();
?>
ACTION) {
case "verifyPoints":
$this->verifyPoints();
break;
}
?>
reinstall();
die('OK');
}
public function reinstall() {
}
private function verifyPoints() {
$points = DB::getPDO()->fetchall("select `ID`, `EPSG`, x(`the_geom`) as `gx`, y(`the_geom`) as `gy`, `x`, `y` from `" . self::TABLE . "`");
$errors = [];
foreach ($points as $point) {
if ($point['x'] && $point['y']) {
if ($point['gx'] && $point['gy']) {
try {
$test = epsgConversion::LatLonToPUWGWGS84($point['gx'], $point['gy']);
} catch (Exception $e) {
SE_Layout::alert('danger', $e->getMessage());
}
if ((abs($point['x'] - $test->x) > 1 ) || (abs($point['y'] - $test->y) > 1) || ($point['EPSG'] != $test->epsg)) {
$error = "[{$point['ID']}] x = x) > 1) ? "red" : "green") .
";'>{$point['x']} ({$test->x}), y = y) > 1) ? "red" : "green") .
";'>{$point['y']} ({$test->y}), epsg = epsg) ? "red" : "green") .
";'>{$point['EPSG']}" . (($point['EPSG'] != $test->epsg) ? " ({$test->epsg})" : "");
$errors[] = $error;
}
}
}
}
?>