Commit 6e784ddcc3919c549ca90e1f698675d1ad6c8f5a
1 parent
f341fc83
Exists in
master
and in
7 other branches
--no commit message
Showing
1 changed file
with
14 additions
and
11 deletions
Show diff stats
classesphp/classe_analise.php
| @@ -1385,16 +1385,14 @@ class Analise | @@ -1385,16 +1385,14 @@ class Analise | ||
| 1385 | 1385 | ||
| 1386 | nome do layer criado com o buffer. | 1386 | nome do layer criado com o buffer. |
| 1387 | */ | 1387 | */ |
| 1388 | - function criaBuffer($distancia,$locaplic,$unir="nao",$wkt="",$multiplicar=1,$itemdistancia="") | ||
| 1389 | - { | 1388 | + function criaBuffer($distancia,$locaplic,$unir="nao",$wkt="",$multiplicar=1,$itemdistancia=""){ |
| 1390 | set_time_limit(180); | 1389 | set_time_limit(180); |
| 1391 | error_reporting(0); | 1390 | error_reporting(0); |
| 1392 | - if($this->nome != "") | ||
| 1393 | - { | 1391 | + if($this->nome != ""){ |
| 1394 | $items = pegaItens($this->layer); | 1392 | $items = pegaItens($this->layer); |
| 1395 | } | 1393 | } |
| 1396 | - else | ||
| 1397 | - {$items = array(); | 1394 | + else{ |
| 1395 | + $items = array(); | ||
| 1398 | } | 1396 | } |
| 1399 | //para manipular dbf | 1397 | //para manipular dbf |
| 1400 | if($this->dbaseExiste == false){ | 1398 | if($this->dbaseExiste == false){ |
| @@ -1455,12 +1453,11 @@ class Analise | @@ -1455,12 +1453,11 @@ class Analise | ||
| 1455 | // cria o dbf | 1453 | // cria o dbf |
| 1456 | $def = $this->criaDefDb($items); | 1454 | $def = $this->criaDefDb($items); |
| 1457 | $def[] = array("i3geo","C","254"); | 1455 | $def[] = array("i3geo","C","254"); |
| 1458 | - if($this->dbaseExiste == false) | ||
| 1459 | - { | 1456 | + if($this->dbaseExiste == false){ |
| 1460 | $db = xbase_create($nomeshp.".dbf", $def);xbase_close($db); | 1457 | $db = xbase_create($nomeshp.".dbf", $def);xbase_close($db); |
| 1461 | } | 1458 | } |
| 1462 | - else | ||
| 1463 | - {$db = dbase_create($nomeshp.".dbf", $def);dbase_close($db); | 1459 | + else{ |
| 1460 | + $db = dbase_create($nomeshp.".dbf", $def);dbase_close($db); | ||
| 1464 | } | 1461 | } |
| 1465 | //acrescenta os pontos no novo shapefile | 1462 | //acrescenta os pontos no novo shapefile |
| 1466 | $dbname = $nomeshp.".dbf"; | 1463 | $dbname = $nomeshp.".dbf"; |
| @@ -1472,7 +1469,12 @@ class Analise | @@ -1472,7 +1469,12 @@ class Analise | ||
| 1472 | { | 1469 | { |
| 1473 | foreach ($items as $ni) | 1470 | foreach ($items as $ni) |
| 1474 | { | 1471 | { |
| 1475 | - $reg[] = $this->truncaS($shapes[$i]->values[$ni]); | 1472 | + if(!empty($shapes[$i]->values[$ni])){ |
| 1473 | + $reg[] = $this->truncaS($shapes[$i]->values[$ni]); | ||
| 1474 | + } | ||
| 1475 | + else{ | ||
| 1476 | + $reg[] = ""; | ||
| 1477 | + } | ||
| 1476 | } | 1478 | } |
| 1477 | $reg[] = $i; | 1479 | $reg[] = $i; |
| 1478 | $novoshpf->addShape($buffers[$i]); | 1480 | $novoshpf->addShape($buffers[$i]); |
| @@ -1480,6 +1482,7 @@ class Analise | @@ -1480,6 +1482,7 @@ class Analise | ||
| 1480 | xbase_add_record($db,$reg); | 1482 | xbase_add_record($db,$reg); |
| 1481 | else | 1483 | else |
| 1482 | dbase_add_record($db,$reg); | 1484 | dbase_add_record($db,$reg); |
| 1485 | + | ||
| 1483 | $reg = array(); | 1486 | $reg = array(); |
| 1484 | } | 1487 | } |
| 1485 | if($this->dbaseExiste == false) | 1488 | if($this->dbaseExiste == false) |