Revision 2613
Added by sgarg about 19 years ago
src/perl/register-dataset.cgi | ||
---|---|---|
707 | 707 |
# and long mentioned in the config file. |
708 | 708 |
|
709 | 709 |
|
710 |
if($FORM::hasSpatial eq 'true'){ |
|
710 |
if($FORM::hasSpatial eq 'true' && $FORM::spatialRequired eq 'true'){
|
|
711 | 711 |
if ($FORM::useSiteCoord ) { |
712 | 712 |
push(@invalidParams, "The Data Registry doesn't have latitude and longitude information for the site that you chose. Please go back and enter the spatial information.") |
713 | 713 |
unless(hasContent($latDeg1) && hasContent($longDeg1)); |
... | ... | |
1245 | 1245 |
} |
1246 | 1246 |
} |
1247 | 1247 |
|
1248 |
if(hasContent($FORM::geogdesc) || ($FORM::latDeg1 != 0 && $FORM::longDeg1 != 0)) {
|
|
1248 |
if(hasContent($FORM::geogdesc) || ($FORM::latDeg1 < 91 && $FORM::latDeg1 > -1 && $FORM::longDeg1 < 181 && $FORM::longDeg1 > -1)) {
|
|
1249 | 1249 |
$cov .= "<geographicCoverage>\n"; |
1250 | 1250 |
|
1251 | 1251 |
if(hasContent($FORM::geogdesc)) { |
1252 | 1252 |
$cov .= "<geographicDescription>".normalize($FORM::geogdesc)."</geographicDescription>\n"; |
1253 | 1253 |
} |
1254 | 1254 |
|
1255 |
if($latDeg1 != 0 && $longDeg1 != 0) {
|
|
1255 |
if($latDeg1 < 91 && $latDeg1 > -1 && $longDeg1 < 181 && $longDeg1 > -1) {
|
|
1256 | 1256 |
$cov .= "<boundingCoordinates>\n"; |
1257 | 1257 |
# if the second latitude is missing, then set the second lat/long pair |
1258 | 1258 |
# equal to the first this makes a point appear like a rectangle |
1259 |
if ($FORM::useSiteCoord || ($FORM::latDeg2 == 0 && $FORM::latMin2 == 0 && $FORM::latSec2 == 0)) {
|
|
1259 |
if ($FORM::useSiteCoord || ($FORM::latDeg2 == "" && $FORM::latMin2 == "" && $FORM::latSec2 == "")) {
|
|
1260 | 1260 |
|
1261 | 1261 |
$latDeg2 = $latDeg1; |
1262 | 1262 |
$latMin2 = $latMin1; |
Also available in: Unified diff
Fix for 2214. Allow 0 in coordinates now.