Commit 23d166d6ecbd35252f5e39a2c8062bd6286f9c04

Authored by Edmar Moretti
1 parent a3b36d1c

--no commit message

classesphp/classe_legenda.php
@@ -357,10 +357,15 @@ array @@ -357,10 +357,15 @@ array
357 $linhas[$c]["totalreg"] = $total; 357 $linhas[$c]["totalreg"] = $total;
358 } 358 }
359 } 359 }
360 - if ($nc == 0) 360 + if ($layer->type == MS_LAYER_RASTER && $nc == 1)
361 { 361 {
362 $proc = ""; 362 $proc = "";
  363 + $linhas = array();
363 if($layer->num_processing > 0){$proc = $layer->getProcessing();} 364 if($layer->num_processing > 0){$proc = $layer->getProcessing();}
  365 + if($layer->type == MS_LAYER_RASTER && $proc == "")
  366 + {
  367 + $proc = array("RESAMPLE=NEAREST");
  368 + }
364 $linhas[] = array("tema"=>$l,"idclasse"=>"","nomeclasse"=>"","expressao"=>"","imagem"=>"","proc"=>$proc); 369 $linhas[] = array("tema"=>$l,"idclasse"=>"","nomeclasse"=>"","expressao"=>"","imagem"=>"","proc"=>$proc);
365 } 370 }
366 } 371 }
classesphp/classe_temas.php
@@ -142,7 +142,7 @@ $lista - lista de processos separados por | @@ -142,7 +142,7 @@ $lista - lista de processos separados por |
142 if(!$this->layer){return "erro";} 142 if(!$this->layer){return "erro";}
143 if ($this->layer->num_processing > 0) 143 if ($this->layer->num_processing > 0)
144 {$this->layer->clearProcessing();} 144 {$this->layer->clearProcessing();}
145 - $lista = str_replace('"',"",$lista); 145 + //$lista = str_replace('"',"",$lista);
146 $lista = explode("|",$lista); 146 $lista = explode("|",$lista);
147 foreach ($lista as $processo) 147 foreach ($lista as $processo)
148 {$this->layer->setprocessing($processo);} 148 {$this->layer->setprocessing($processo);}
ferramentas/legenda/index.js
@@ -144,16 +144,18 @@ function montaLegenda(retorno) @@ -144,16 +144,18 @@ function montaLegenda(retorno)
144 ajuda += " Você pode aplicar a escala em bandas individuais, para isso, utilize SCALE_n, por exemplo SCALE_1=AUTO SCALE_2=200,500." 144 ajuda += " Você pode aplicar a escala em bandas individuais, para isso, utilize SCALE_n, por exemplo SCALE_1=AUTO SCALE_2=200,500."
145 ajuda += "<br>Para escolher quais bandas ser&atilde;o utilizadas e qual sua ordem, utilize a op&ccedil;&atilde;o BANDAS." 145 ajuda += "<br>Para escolher quais bandas ser&atilde;o utilizadas e qual sua ordem, utilize a op&ccedil;&atilde;o BANDAS."
146 ajuda += " Utilize, por exemplo, BANDS=1,2,3 BANDS=1 ." 146 ajuda += " Utilize, por exemplo, BANDS=1,2,3 BANDS=1 ."
  147 + ajuda += " Para alterar o modo de amostragem, utilize RESAMPLE com uma das opções: AVERAGE,NEAREST ou BILINEAR."
147 var ins = "<br>Voc&ecirc; pode incluir processos na imagem para modificar as caracter&iacute;sticas de visualiza&ccedil;&atilde;o<br><br>Adicionar processo:"; 148 var ins = "<br>Voc&ecirc; pode incluir processos na imagem para modificar as caracter&iacute;sticas de visualiza&ccedil;&atilde;o<br><br>Adicionar processo:";
148 ins += "<select onchange=adicionaProcesso(this) >" 149 ins += "<select onchange=adicionaProcesso(this) >"
149 ins += "<option value='' >selecione o processo</option>" 150 ins += "<option value='' >selecione o processo</option>"
150 ins += "<option value='SCALE=' >Escala de cores</option>" 151 ins += "<option value='SCALE=' >Escala de cores</option>"
  152 + ins += "<option value='RESAMPLE=' >Reamostragem</option>"
151 ins += "<option value='BANDS=' >Bandas</option>" 153 ins += "<option value='BANDS=' >Bandas</option>"
152 ins += "<option value='COLOR_MATCH_THRESHOLD=' >Threshold</option>" 154 ins += "<option value='COLOR_MATCH_THRESHOLD=' >Threshold</option>"
153 ins += "<option value='NODATA=' >Nodata</option>" 155 ins += "<option value='NODATA=' >Nodata</option>"
154 ins += "</select><br>" 156 ins += "</select><br>"
155 ins += '<br><input class="executar" onclick="aplicaProcessos()" size="22" type="buttom" value="aplicar processos">' 157 ins += '<br><input class="executar" onclick="aplicaProcessos()" size="22" type="buttom" value="aplicar processos">'
156 - if(retorno.data[0].proc != "") 158 + if(retorno.data[0].proc == "")
157 {ins += "<div style=width:80% id=processos ></div>"} 159 {ins += "<div style=width:80% id=processos ></div>"}
158 else 160 else
159 { 161 {
@@ -194,7 +196,7 @@ function aplicaProcessos() @@ -194,7 +196,7 @@ function aplicaProcessos()
194 } 196 }
195 } 197 }
196 lista = lista.join("|") 198 lista = lista.join("|")
197 - lista = '"'+lista+'"' 199 + //lista = '"'+lista+'"'
198 var p = g_locaplic+"/classesphp/mapa_controle.php?g_sid="+g_sid+"&funcao=aplicaProcessos&lista="+lista+"&tema="+tema 200 var p = g_locaplic+"/classesphp/mapa_controle.php?g_sid="+g_sid+"&funcao=aplicaProcessos&lista="+lista+"&tema="+tema
199 var cp = new cpaint(); 201 var cp = new cpaint();
200 //cp.set_debug(2) 202 //cp.set_debug(2)
menutemas/admin.db
No preview for this file type
temas/cbersgeo.map
@@ -4,7 +4,7 @@ FONTSET &quot;../symbols/fontes.txt&quot; @@ -4,7 +4,7 @@ FONTSET &quot;../symbols/fontes.txt&quot;
4 LAYER 4 LAYER
5 DATA "c://ms4w/Apache/htdocs/geodados/cbersgeo.img" 5 DATA "c://ms4w/Apache/htdocs/geodados/cbersgeo.img"
6 METADATA 6 METADATA
7 - "classe" "SIM" 7 + "classe" "NAO"
8 "DOWNLOAD" "sim" 8 "DOWNLOAD" "sim"
9 "tema" "cbersgeo" 9 "tema" "cbersgeo"
10 END 10 END