Commit fc1c9bd9964af091222ebdedcbe69ebcb5aefc56
1 parent
ddb6f815
Exists in
master
and in
7 other branches
v6 - correção na ferramentaponto em poligono
Showing
1 changed file
with
8 additions
and
3 deletions
Show diff stats
classesphp/classe_analise.php
| @@ -136,12 +136,17 @@ $itens - array com os nomes originais das colunas | @@ -136,12 +136,17 @@ $itens - array com os nomes originais das colunas | ||
| 136 | return: | 136 | return: |
| 137 | {array} | 137 | {array} |
| 138 | */ | 138 | */ |
| 139 | - function criaDefDb($itens){ | 139 | + function criaDefDb($itens,$unico=true){ |
| 140 | $c = 0; | 140 | $c = 0; |
| 141 | $def = array(); | 141 | $def = array(); |
| 142 | foreach ($itens as $ni){ | 142 | foreach ($itens as $ni){ |
| 143 | $ni = strtoupper($ni); | 143 | $ni = strtoupper($ni); |
| 144 | - $def[] = array(substr($ni, 0, 8).$c,"C","254"); | 144 | + if($unico == true){ |
| 145 | + $def[] = array(substr($ni, 0, 8).$c,"C","254"); | ||
| 146 | + } | ||
| 147 | + else{ | ||
| 148 | + $def[] = array($ni,"C","254"); | ||
| 149 | + } | ||
| 145 | $c = $c + 1; | 150 | $c = $c + 1; |
| 146 | } | 151 | } |
| 147 | return $def; | 152 | return $def; |
| @@ -1020,7 +1025,7 @@ $locaplic - Localização do I3geo. | @@ -1020,7 +1025,7 @@ $locaplic - Localização do I3geo. | ||
| 1020 | $itemspt = pegaItens($layerPt); | 1025 | $itemspt = pegaItens($layerPt); |
| 1021 | //gera o novo arquivo shape file | 1026 | //gera o novo arquivo shape file |
| 1022 | // cria o dbf | 1027 | // cria o dbf |
| 1023 | - $def = $this->criaDefDb($itemspt); | 1028 | + $def = $this->criaDefDb($itemspt,false); |
| 1024 | //pega os itens dos temas poligonais | 1029 | //pega os itens dos temas poligonais |
| 1025 | $layersPol = array(); | 1030 | $layersPol = array(); |
| 1026 | $temas = explode(",",$temasPo); | 1031 | $temas = explode(",",$temasPo); |