Remap id 14 to 13
This commit is contained in:
parent
8a536f6969
commit
1a51eccd16
@ -54,13 +54,15 @@ $terrainstrings = [
|
|||||||
11 => "Cropland",
|
11 => "Cropland",
|
||||||
12 => "Bare Ground",
|
12 => "Bare Ground",
|
||||||
13 => "Urban and Built",
|
13 => "Urban and Built",
|
||||||
14 => "Urban and Built"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
if ($failtowater) {
|
if ($failtowater) {
|
||||||
$terrainid = 0;
|
$terrainid = 0;
|
||||||
} else {
|
} else {
|
||||||
$terrainid = (int) $database->select('terrain', 'type', ["AND" => ["latitude" => $finallat, "longitude" => $finallong]])[0];
|
$terrainid = (int) $database->select('terrain', 'type', ["AND" => ["latitude" => $finallat, "longitude" => $finallong]])[0];
|
||||||
|
if ($terrainid == 14) {
|
||||||
|
$terrainid = 13;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$out = ["status" => "OK", "type" => $terrainid, "latitude" => $finallat, "longitude" => $finallong, "name" => $terrainstrings[$terrainid]];
|
$out = ["status" => "OK", "type" => $terrainid, "latitude" => $finallat, "longitude" => $finallong, "name" => $terrainstrings[$terrainid]];
|
||||||
echo json_encode($out);
|
echo json_encode($out);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user