$geodeticDatum = array_key_exists('geodeticdatum', $_POST) ? $_POST['geodeticdatum'] : ''; $georeferenceSources = array_key_exists('georeferencesources', $_POST) ? $_POST['georeferencesources'] : ''; $georeferenceRemarks = array_key_exists('georeferenceremarks', $_POST) ? $_POST['georeferenceremarks'] : ''; $footprintWKT = array_key_exists('footprintwkt', $_POST) ? $_POST['footprintwkt'] : ''; $georeferenceVerificationStatus = array_key_exists('georeferenceverificationstatus', $_POST) ? $_POST['georeferenceverificationstatus'] : ''; $minimumElevationInMeters = array_key_exists('minimumelevationinmeters', $_POST) ? $_POST['minimumelevationinmeters'] : ''; $maximumElevationInMeters = array_key_exists('maximumelevationinmeters', $_POST) ? $_POST['maximumelevationinmeters'] : ''; $minimumElevationInFeet = array_key_exists('minimumelevationinfeet', $_POST) ? $_POST['minimumelevationinfeet'] : ''; $maximumElevationInFeet = array_key_exists('maximumelevationinfeet', $_POST) ? $_POST['maximumelevationinfeet'] : ''; if (!$georeferenceSources) { $georeferenceSources = 'georef batch tool ' . date('Y-m-d'); } if (!$georeferenceVerificationStatus) { $georeferenceVerificationStatus = 'reviewed - high confidence'; } $geoManager = new OccurrenceGeorefTools(); $geoManager->setCollId($collId); $editor = false; if ($isAdmin || array_key_exists("CollAdmin", $userRights) && in_array($collId, $userRights["CollAdmin"]) || array_key_exists("CollEditor", $userRights) && in_array($collId, $userRights["CollEditor"])) { $editor = true; } $statusStr = ''; $localArr; if ($editor && $submitAction) { if ($qCountry) { $geoManager->setQueryVariables('qcountry', $qCountry); } if ($qState) { $geoManager->setQueryVariables('qstate', $qState); } if ($qCounty) {
header("Content-Type: text/html; charset=" . $charset); $country = array_key_exists('country', $_REQUEST) ? $_REQUEST['country'] : ''; $state = array_key_exists('state', $_REQUEST) ? $_REQUEST['state'] : ''; $county = array_key_exists('county', $_REQUEST) ? $_REQUEST['county'] : ''; $locality = array_key_exists('locality', $_REQUEST) ? $_REQUEST['locality'] : ''; $submitAction = array_key_exists('submitaction', $_POST) ? $_POST['submitaction'] : ''; //Remove country, state, county from beginning of string if (!$country || !$state || !$county) { $locArr = explode(";", $locality); $locality = trim(array_pop($locArr)); //if(!$country && $locArr) $country = trim(array_shift($locArr)); //if(!$state && $locArr) $state = trim(array_shift($locArr)); //if(!$county && $locArr) $county = trim(array_shift($locArr)); } $locality = trim(preg_replace('/[\\[\\]\\)\\d\\.\\-,\\s]*$/', '', $locality), '( '); $geoManager = new OccurrenceGeorefTools(); $clones = $geoManager->getGeorefClones($locality, $country, $state, $county); $latCen = 41.0; $lngCen = -95.0; $coorArr = explode(";", $mappingBoundaries); if ($coorArr && count($coorArr) == 4) { $latCen = ($coorArr[0] + $coorArr[2]) / 2; $lngCen = ($coorArr[1] + $coorArr[3]) / 2; } ?> <html> <head> <title>Georeference Clone Tool</title> <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> <link href="<?php echo $clientRoot;