Commit ec607a99213f8951f314513aa29b2e1d4c1d835a

Authored by Edmar Moretti
1 parent c1312628

--no commit message

aplicmap/estadosl.map
@@ -23,7 +23,7 @@ LAYER @@ -23,7 +23,7 @@ LAYER
23 CLASS 23 CLASS
24 NAME " " 24 NAME " "
25 STYLE 25 STYLE
26 - WIDTH 2 26 + WIDTH 3
27 COLOR 255 255 0 27 COLOR 255 255 0
28 OUTLINECOLOR -1 -1 -1 28 OUTLINECOLOR -1 -1 -1
29 END 29 END
aplicmap/estadosldebian.map
@@ -23,7 +23,7 @@ LAYER @@ -23,7 +23,7 @@ LAYER
23 CLASS 23 CLASS
24 NAME " " 24 NAME " "
25 STYLE 25 STYLE
26 - WIDTH 2 26 + WIDTH 3
27 COLOR 255 255 0 27 COLOR 255 255 0
28 OUTLINECOLOR -1 -1 -1 28 OUTLINECOLOR -1 -1 -1
29 END 29 END
aplicmap/estadoslfedora.map
@@ -23,7 +23,7 @@ LAYER @@ -23,7 +23,7 @@ LAYER
23 CLASS 23 CLASS
24 NAME " " 24 NAME " "
25 STYLE 25 STYLE
26 - WIDTH 2 26 + WIDTH 3
27 COLOR 255 255 0 27 COLOR 255 255 0
28 OUTLINECOLOR -1 -1 -1 28 OUTLINECOLOR -1 -1 -1
29 END 29 END
aplicmap/estadoslwindows.map
@@ -24,7 +24,7 @@ LAYER @@ -24,7 +24,7 @@ LAYER
24 TITLE "estadosl+0" 24 TITLE "estadosl+0"
25 NAME " " 25 NAME " "
26 STYLE 26 STYLE
27 - WIDTH 22 27 + WIDTH 3
28 COLOR 255 255 0 28 COLOR 255 255 0
29 OUTLINECOLOR -1 -1 -1 29 OUTLINECOLOR -1 -1 -1
30 END 30 END
classesphp/classe_analise.php
@@ -1059,6 +1059,7 @@ $locaplic - Localização do I3geo. @@ -1059,6 +1059,7 @@ $locaplic - Localização do I3geo.
1059 $layer = $this->mapa->getlayerbyname($tema); 1059 $layer = $this->mapa->getlayerbyname($tema);
1060 $layer->set("template","none.htm"); 1060 $layer->set("template","none.htm");
1061 $layer->set("status",MS_DEFAULT); 1061 $layer->set("status",MS_DEFAULT);
  1062 + $items = pegaItens($layer);
1062 if($layer->type == MS_LAYER_RASTER) 1063 if($layer->type == MS_LAYER_RASTER)
1063 { 1064 {
1064 $lineo = $spts[0]->line(0); 1065 $lineo = $spts[0]->line(0);
@@ -1066,7 +1067,7 @@ $locaplic - Localização do I3geo. @@ -1066,7 +1067,7 @@ $locaplic - Localização do I3geo.
1066 $layer->queryByPoint($pt, 0, 0); 1067 $layer->queryByPoint($pt, 0, 0);
1067 } 1068 }
1068 $layers[] = $layer; 1069 $layers[] = $layer;
1069 - $items = pegaItens($layer); 1070 +
1070 if(!$items) 1071 if(!$items)
1071 {return "erro ao obter a lista de itens do tema $layer->name";} 1072 {return "erro ao obter a lista de itens do tema $layer->name";}
1072 $listaItens[$layer->name] = $items; 1073 $listaItens[$layer->name] = $items;
@@ -1332,6 +1333,7 @@ nome do layer criado com o buffer. @@ -1332,6 +1333,7 @@ nome do layer criado com o buffer.
1332 function criaBuffer($distancia,$locaplic,$unir="nao",$wkt="") 1333 function criaBuffer($distancia,$locaplic,$unir="nao",$wkt="")
1333 { 1334 {
1334 set_time_limit(180); 1335 set_time_limit(180);
  1336 + $items = pegaItens($this->layer);
1335 //error_reporting(E_ALL); 1337 //error_reporting(E_ALL);
1336 //para manipular dbf 1338 //para manipular dbf
1337 if($this->dbaseExiste == false){ 1339 if($this->dbaseExiste == false){
@@ -1348,7 +1350,7 @@ nome do layer criado com o buffer. @@ -1348,7 +1350,7 @@ nome do layer criado com o buffer.
1348 carregaquery2($this->arquivo,$this->layer,$this->mapa); 1350 carregaquery2($this->arquivo,$this->layer,$this->mapa);
1349 $sopen = $this->layer->open(); 1351 $sopen = $this->layer->open();
1350 if($sopen == MS_FAILURE){return "erro";} 1352 if($sopen == MS_FAILURE){return "erro";}
1351 - $items = pegaItens($this->layer); 1353 +
1352 $this->layer->open(); 1354 $this->layer->open();
1353 $res_count = $this->layer->getNumresults(); 1355 $res_count = $this->layer->getNumresults();
1354 $buffers = array(); 1356 $buffers = array();
@@ -1560,6 +1562,7 @@ $locaplic - Localização do I3geo. @@ -1560,6 +1562,7 @@ $locaplic - Localização do I3geo.
1560 function criaCentroide($locaplic) 1562 function criaCentroide($locaplic)
1561 { 1563 {
1562 if(!$this->layer){return "erro";} 1564 if(!$this->layer){return "erro";}
  1565 + $items = pegaItens($this->layer);
1563 set_time_limit(180); 1566 set_time_limit(180);
1564 //para manipular dbf 1567 //para manipular dbf
1565 if($this->dbaseExiste == false){ 1568 if($this->dbaseExiste == false){
@@ -1574,7 +1577,7 @@ $locaplic - Localização do I3geo. @@ -1574,7 +1577,7 @@ $locaplic - Localização do I3geo.
1574 carregaquery2($this->arquivo,$this->layer,$this->mapa); 1577 carregaquery2($this->arquivo,$this->layer,$this->mapa);
1575 $sopen = $this->layer->open(); 1578 $sopen = $this->layer->open();
1576 if($sopen == MS_FAILURE){return "erro";} 1579 if($sopen == MS_FAILURE){return "erro";}
1577 - $items = pegaItens($this->layer); 1580 +
1578 $this->layer->open(); 1581 $this->layer->open();
1579 $res_count = $this->layer->getNumresults(); 1582 $res_count = $this->layer->getNumresults();
1580 $centroides = array(); 1583 $centroides = array();
@@ -1600,7 +1603,6 @@ $locaplic - Localização do I3geo. @@ -1600,7 +1603,6 @@ $locaplic - Localização do I3geo.
1600 //gera o novo arquivo shape file 1603 //gera o novo arquivo shape file
1601 // cria o shapefile 1604 // cria o shapefile
1602 $novoshpf = ms_newShapefileObj($nomeshp, MS_SHP_POINT); 1605 $novoshpf = ms_newShapefileObj($nomeshp, MS_SHP_POINT);
1603 - $items = pegaItens($this->layer);  
1604 // cria o dbf 1606 // cria o dbf
1605 $def = $this->criaDefDb($items); 1607 $def = $this->criaDefDb($items);
1606 if($this->dbaseExiste == false) 1608 if($this->dbaseExiste == false)
classesphp/classe_atributos.php
@@ -100,7 +100,7 @@ $ext - (opcional) extensão geográfica que será aplicada ao mapa @@ -100,7 +100,7 @@ $ext - (opcional) extensão geográfica que será aplicada ao mapa
100 */ 100 */
101 function __construct($map_file="",$tema="",$locaplic="",$ext="") 101 function __construct($map_file="",$tema="",$locaplic="",$ext="")
102 { 102 {
103 - //error_reporting(E_ALL); 103 + error_reporting(0);
104 if (!function_exists('ms_newMapObj')) {return false;} 104 if (!function_exists('ms_newMapObj')) {return false;}
105 if(file_exists($locaplic."/funcoes_gerais.php")) 105 if(file_exists($locaplic."/funcoes_gerais.php"))
106 include_once($locaplic."/funcoes_gerais.php"); 106 include_once($locaplic."/funcoes_gerais.php");
@@ -1270,13 +1270,68 @@ $listaDeTemas - (opcional) Lista com os códigos dos temas que serão identificado @@ -1270,13 +1270,68 @@ $listaDeTemas - (opcional) Lista com os códigos dos temas que serão identificado
1270 $n[] = array("alias"=>"Link WMS","valor"=>"getfeatureinfo padrão do serviço","link"=>$res2,"img"=>""); 1270 $n[] = array("alias"=>"Link WMS","valor"=>"getfeatureinfo padrão do serviço","link"=>$res2,"img"=>"");
1271 return array($n); 1271 return array($n);
1272 } 1272 }
  1273 +
  1274 + $itens = $layer->getmetadata("ITENS"); // itens
  1275 + $itensdesc = $layer->getmetadata("ITENSDESC"); // descrição dos itens
  1276 + $lks = $layer->getmetadata("ITENSLINK"); // link dos itens
  1277 + $itemimg = $layer->getmetadata("ITEMIMG"); //indica um item que será utilizado para colocar um ícone
  1278 + $locimg = $layer->getmetadata("IMGLOC"); //indica o local onde estão os ícones
  1279 + $tips = $layer->getmetadata("TIP");
  1280 + $itensLayer = pegaItens($layer);
  1281 + $nitens = count($itensLayer);
  1282 + if($itens == "")
  1283 + {$itens = $itensLayer;}
  1284 + else
  1285 + {$itens = explode(",",$itens);}
  1286 +
  1287 + if($itensdesc == "")
  1288 + {$itensdesc = $itensLayer;}//array_fill(0, $nitens-1,'');}
  1289 + else
  1290 + {$itensdesc = explode(",",$itensdesc);}
  1291 +
  1292 + if($lks == "")
  1293 + {$lks = array_fill(0, $nitens-1,'');}
  1294 + else
  1295 + {$lks = explode(",",$lks);}
  1296 +
  1297 + if($itemimg == "")
  1298 + {$itemimg = array_fill(0, $nitens-1,'');}
  1299 + else
  1300 + {$itemimg = explode(",",$itemimg);}
  1301 +
  1302 + if($locimg == "")
  1303 + {$locimg = array_fill(0, $nitens-1,'');}
  1304 + else
  1305 + {$locimg = explode(",",$locimg);}
  1306 + $tips = str_replace(" ",",",$tips);
  1307 + $tips = explode(",",$tips);
  1308 + //o retorno deve ser do tipo TIP
  1309 + if($etip == true)
  1310 + {
  1311 + $temp = array_combine($itens,$itensdesc);
  1312 + $templ = array_combine($itens,$lks);
  1313 + $tempimg = array_combine($itens,$itemimg);
  1314 + $temploc = array_combine($itens,$locimg);
  1315 + $itensdesc = array();
  1316 + $itens = array();
  1317 + $lks = array();
  1318 + $itemimg = array();
  1319 + $locimg = array();
  1320 + foreach($tips as $t)
  1321 + {
  1322 + $itens[] = $t;
  1323 + if($temp[$t] != ""){$itensdesc[] = $temp[$t];}else{$itensdesc[] = $t;}
  1324 + if($templ[$t] != ""){$lks[] = $templ[$t];}else{$lks[] = "";}
  1325 + if($tempimg[$t] != ""){$itemimg[] = $tempimg[$t];}else{$itemimg[] = "";}
  1326 + if($temploc[$t] != ""){$locimg[] = $temploc[$t];}else{$locimg[] = "";}
  1327 + }
  1328 + }
1273 if(($layer->connectiontype != MS_WMS) && ($layer->type == MS_LAYER_RASTER)) 1329 if(($layer->connectiontype != MS_WMS) && ($layer->type == MS_LAYER_RASTER))
1274 { 1330 {
1275 $layer->set("toleranceunits",MS_PIXELS); 1331 $layer->set("toleranceunits",MS_PIXELS);
1276 $layer->set("tolerance",$resolucao); 1332 $layer->set("tolerance",$resolucao);
1277 $ident = @$layer->queryByPoint($pt, 0, 0); //0.01); 1333 $ident = @$layer->queryByPoint($pt, 0, 0); //0.01);
1278 } 1334 }
1279 - //error_reporting(E_ALL);  
1280 if (($layer->type == MS_LAYER_POINT) || ($layer->type == MS_LAYER_LINE) || ($layer->type == MS_LAYER_CHART)) 1335 if (($layer->type == MS_LAYER_POINT) || ($layer->type == MS_LAYER_LINE) || ($layer->type == MS_LAYER_CHART))
1281 { 1336 {
1282 $layer->set("toleranceunits",MS_PIXELS); 1337 $layer->set("toleranceunits",MS_PIXELS);
@@ -1291,64 +1346,9 @@ $listaDeTemas - (opcional) Lista com os códigos dos temas que serão identificado @@ -1291,64 +1346,9 @@ $listaDeTemas - (opcional) Lista com os códigos dos temas que serão identificado
1291 } 1346 }
1292 if ($ident == MS_SUCCESS) 1347 if ($ident == MS_SUCCESS)
1293 { 1348 {
1294 - $itens = $layer->getmetadata("ITENS"); // itens  
1295 - $itensdesc = $layer->getmetadata("ITENSDESC"); // descrição dos itens  
1296 - $lks = $layer->getmetadata("ITENSLINK"); // link dos itens  
1297 - $itemimg = $layer->getmetadata("ITEMIMG"); //indica um item que será utilizado para colocar um ícone  
1298 - $locimg = $layer->getmetadata("IMGLOC"); //indica o local onde estão os ícones  
1299 - $tips = $layer->getmetadata("TIP");  
1300 - $itensLayer = pegaItens($layer);  
1301 - //var_dump($itensLayer);exit;  
1302 - $nitens = count($itensLayer);  
1303 - if($itens == "")  
1304 - {$itens = $itensLayer;}  
1305 - else  
1306 - {$itens = explode(",",$itens);}  
1307 -  
1308 - if($itensdesc == "")  
1309 - {$itensdesc = $itensLayer;}//array_fill(0, $nitens-1,'');}  
1310 - else  
1311 - {$itensdesc = explode(",",$itensdesc);}  
1312 -  
1313 - if($lks == "")  
1314 - {$lks = array_fill(0, $nitens-1,'');}  
1315 - else  
1316 - {$lks = explode(",",$lks);}  
1317 -  
1318 - if($itemimg == "")  
1319 - {$itemimg = array_fill(0, $nitens-1,'');}  
1320 - else  
1321 - {$itemimg = explode(",",$itemimg);}  
1322 -  
1323 - if($locimg == "")  
1324 - {$locimg = array_fill(0, $nitens-1,'');}  
1325 - else  
1326 - {$locimg = explode(",",$locimg);}  
1327 - $tips = str_replace(" ",",",$tips);  
1328 - $tips = explode(",",$tips);  
1329 - //o retorno deve ser do tipo TIP  
1330 - if($etip == true)  
1331 - {  
1332 - $temp = array_combine($itens,$itensdesc);  
1333 - $templ = array_combine($itens,$lks);  
1334 - $tempimg = array_combine($itens,$itemimg);  
1335 - $temploc = array_combine($itens,$locimg);  
1336 - $itensdesc = array();  
1337 - $itens = array();  
1338 - $lks = array();  
1339 - $itemimg = array();  
1340 - $locimg = array();  
1341 - foreach($tips as $t)  
1342 - {  
1343 - $itens[] = $t;  
1344 - if($temp[$t] != ""){$itensdesc[] = $temp[$t];}else{$itensdesc[] = $t;}  
1345 - if($templ[$t] != ""){$lks[] = $templ[$t];}else{$lks[] = "";}  
1346 - if($tempimg[$t] != ""){$itemimg[] = $tempimg[$t];}else{$itemimg[] = "";}  
1347 - if($temploc[$t] != ""){$locimg[] = $temploc[$t];}else{$locimg[] = "";}  
1348 - }  
1349 - }  
1350 - $res_count = $layer->getNumresults(); 1349 + $ident = @$layer->queryByPoint($pt, 1, -1);
1351 $sopen = $layer->open(); 1350 $sopen = $layer->open();
  1351 + $res_count = $layer->getNumresults();
1352 if($sopen == MS_FAILURE){return "erro";} 1352 if($sopen == MS_FAILURE){return "erro";}
1353 for ($i = 0; $i < $res_count; ++$i) 1353 for ($i = 0; $i < $res_count; ++$i)
1354 { 1354 {
classesphp/classe_selecao.php
@@ -494,6 +494,7 @@ $valor - Valor. @@ -494,6 +494,7 @@ $valor - Valor.
494 */ 494 */
495 function selecaoAtributos2($filtro,$tipo) 495 function selecaoAtributos2($filtro,$tipo)
496 { 496 {
  497 + $items = pegaItens($this->layer);
497 if ($tipo == "novo") 498 if ($tipo == "novo")
498 { 499 {
499 $this->selecaoLimpa(); 500 $this->selecaoLimpa();
@@ -518,12 +519,13 @@ $valor - Valor. @@ -518,12 +519,13 @@ $valor - Valor.
518 } 519 }
519 $this->mapa->freequery($indxlayer); 520 $this->mapa->freequery($indxlayer);
520 */ 521 */
  522 +
521 $shp_atual = array(); 523 $shp_atual = array();
522 if($this->qyfileTema != "" && file_exists($this->qyfileTema)) 524 if($this->qyfileTema != "" && file_exists($this->qyfileTema))
523 {$shp_atual = $this->unserializeQ($this->qyfileTema);} 525 {$shp_atual = $this->unserializeQ($this->qyfileTema);}
524 526
525 $shpi = array(); 527 $shpi = array();
526 - $items = pegaItens($this->layer); 528 +
527 $filtro = str_replace("|","'",$filtro); 529 $filtro = str_replace("|","'",$filtro);
528 if ($this->layer->connectiontype == MS_POSTGIS) 530 if ($this->layer->connectiontype == MS_POSTGIS)
529 { 531 {
@@ -666,10 +668,11 @@ Inverte seleção do tema. @@ -666,10 +668,11 @@ Inverte seleção do tema.
666 function selecaoInverte() 668 function selecaoInverte()
667 { 669 {
668 if(!$this->layer){return "erro";} 670 if(!$this->layer){return "erro";}
  671 + $items = pegaItens($this->layer);
669 if (file_exists($this->qyfile)) 672 if (file_exists($this->qyfile))
670 {$this->mapa->loadquery($this->qyfile);} 673 {$this->mapa->loadquery($this->qyfile);}
671 $indxlayer = $this->layer->index; 674 $indxlayer = $this->layer->index;
672 - $items = pegaItens($this->layer); 675 +
673 /* 676 /*
674 $res_count = $this->layer->getNumresults(); 677 $res_count = $this->layer->getNumresults();
675 $shp_atual = array(); 678 $shp_atual = array();
classesphp/classe_temas.php
@@ -797,8 +797,9 @@ $nome - nome que será dado a geometria @@ -797,8 +797,9 @@ $nome - nome que será dado a geometria
797 $ext = $this->mapa->extent; 797 $ext = $this->mapa->extent;
798 $sb = $this->mapa->scalebar; 798 $sb = $this->mapa->scalebar;
799 $sb->set("status",MS_OFF); 799 $sb->set("status",MS_OFF);
800 - carregaquery2($this->arquivo,$this->layer,$this->mapa); 800 +
801 $items = pegaItens($this->layer); 801 $items = pegaItens($this->layer);
  802 + carregaquery2($this->arquivo,$this->layer,$this->mapa);
802 $sopen = $this->layer->open(); 803 $sopen = $this->layer->open();
803 if($sopen == MS_FAILURE){return "erro";} 804 if($sopen == MS_FAILURE){return "erro";}
804 805