Commit 051bfd86279dce27ea4532e4b9241e0c60d59dd6

Authored by Edmar Moretti
1 parent 30c3756d

--no commit message

Showing 1 changed file with 5 additions and 3 deletions   Show diff stats
ferramentas/melhorcaminho/exec.php
@@ -87,9 +87,9 @@ switch (strtoupper($funcao)) @@ -87,9 +87,9 @@ switch (strtoupper($funcao))
87 fclose($fp); 87 fclose($fp);
88 exec(dirname(__FILE__)."/better_path.py $y"); 88 exec(dirname(__FILE__)."/better_path.py $y");
89 //adiciona o shapefile 89 //adiciona o shapefile
  90 + include_once("../../classesphp/classe_mapa.php");
  91 + $m = new Mapa($map_file);
90 if(file_exists($pathresult."/".$prefixo."_best_path.shp")){ 92 if(file_exists($pathresult."/".$prefixo."_best_path.shp")){
91 - include_once("../../classesphp/classe_mapa.php");  
92 - $m = new Mapa($map_file);  
93 //adiciona ao mapa best_path 93 //adiciona ao mapa best_path
94 $retorno = $m->adicionaTemaSHP($pathresult."/".$prefixo."_best_path.shp"); 94 $retorno = $m->adicionaTemaSHP($pathresult."/".$prefixo."_best_path.shp");
95 $layer = $m->mapa->getlayerbyname($prefixo."_best_path.shp"); 95 $layer = $m->mapa->getlayerbyname($prefixo."_best_path.shp");
@@ -100,6 +100,8 @@ switch (strtoupper($funcao)) @@ -100,6 +100,8 @@ switch (strtoupper($funcao))
100 $estilo = $classe->getstyle(0); 100 $estilo = $classe->getstyle(0);
101 $cor = $estilo->color; 101 $cor = $estilo->color;
102 $cor->setRGB(255,0,0); 102 $cor->setRGB(255,0,0);
  103 + }
  104 + if(file_exists($pathresult."/".$prefixo."_xxxcartesian_straight_line_cost.shp")){
103 //cartesian_straight_line_cost 105 //cartesian_straight_line_cost
104 $retorno = $m->adicionaTemaSHP($pathresult."/".$prefixo."_cartesian_straight_line_cost.shp"); 106 $retorno = $m->adicionaTemaSHP($pathresult."/".$prefixo."_cartesian_straight_line_cost.shp");
105 $layer = $m->mapa->getlayerbyname($prefixo."_cartesian_straight_line_cost.shp"); 107 $layer = $m->mapa->getlayerbyname($prefixo."_cartesian_straight_line_cost.shp");
@@ -111,8 +113,8 @@ switch (strtoupper($funcao)) @@ -111,8 +113,8 @@ switch (strtoupper($funcao))
111 $cor = $estilo->color; 113 $cor = $estilo->color;
112 $cor->setRGB(255,0,255); 114 $cor->setRGB(255,0,255);
113 $estilo->set("width",2); 115 $estilo->set("width",2);
114 - $m->salva();  
115 } 116 }
  117 + $m->salva();
116 } 118 }
117 else{ 119 else{
118 $retorno = "<span style='color:red' >Erro. Arquivo raster n&atilde;o encontrado</span>"; 120 $retorno = "<span style='color:red' >Erro. Arquivo raster n&atilde;o encontrado</span>";