Commit 798714c427a1963c0937f007b2a4e98c97bc4cdd

Authored by Edmar Moretti
1 parent 6e7defbc

Limpeza do diretório "aplicmap" removendo-se mapfiles sem uso

classesphp/classe_analise.php
... ... @@ -1183,10 +1183,6 @@ function distanciaptpt($temaorigem,$temadestino,$temaoverlay,$locaplic,$itemorig
1183 1183 $novoshpf->free();
1184 1184 xbase_close($db);
1185 1185 //adiciona no mapa atual o novo tema
1186   - if (strtoupper(substr(PHP_OS, 0, 3) == 'WIN'))
1187   - {$mapt = ms_newMapObj($locaplic."\\aplicmap\\novotema.map");}
1188   - else
1189   - {$mapt = ms_newMapObj($locaplic."/aplicmap/novotema.map");}
1190 1186 $novolayer = criaLayer($this->mapa,MS_LAYER_LINE,MS_DEFAULT,("Distancias (".$nomefinal.")"),$metaClasse="SIM");
1191 1187 $novolayer->set("data",$nomeshp.".shp");
1192 1188 $novolayer->setmetadata("DOWNLOAD","SIM");
... ... @@ -1303,10 +1299,6 @@ nome do layer criado com o buffer.
1303 1299 $novoshpf->free();
1304 1300 xbase_close($db);
1305 1301 //adiciona no mapa atual o novo tema
1306   - if (strtoupper(substr(PHP_OS, 0, 3) == 'WIN'))
1307   - {$mapt = ms_newMapObj($locaplic."\\aplicmap\\novotema.map");}
1308   - else
1309   - {$mapt = ms_newMapObj($locaplic."/aplicmap/novotema.map");}
1310 1302 $novolayer = criaLayer($this->mapa,MS_LAYER_POLYGON,MS_DEFAULT,("Buffer (".$nomebuffer.")"),$metaClasse="SIM");
1311 1303 $novolayer->set("data",$nomeshp.".shp");
1312 1304 $novolayer->setmetadata("DOWNLOAD","SIM");
... ... @@ -1392,10 +1384,6 @@ $locaplic - Localização do I3geo.
1392 1384 $novoshpf->free();
1393 1385 xbase_close($db);
1394 1386 //adiciona no mapa atual o novo tema
1395   - if (strtoupper(substr(PHP_OS, 0, 3) == 'WIN'))
1396   - {$mapt = ms_newMapObj($locaplic."\\aplicmap\\novotema.map");}
1397   - else
1398   - {$mapt = ms_newMapObj($locaplic."/aplicmap/novotema.map");}
1399 1387 $novolayer = criaLayer($this->mapa,MS_LAYER_POINT,MS_DEFAULT,("Centróide (".$nomeCentroides.")"),$metaClasse="SIM");
1400 1388 $novolayer->set("data",$nomeshp.".shp");
1401 1389 $novolayer->setmetadata("DOWNLOAD","SIM");
... ...
classesphp/classe_mapa.php
... ... @@ -1125,12 +1125,12 @@ Include:
1125 1125 //limpa selecao
1126 1126 if (file_exists($this->qyfile))
1127 1127 {unlink ($this->qyfile);}
1128   - $nmap = ms_newMapObj($locaplic."/aplicmap/novotema.map");
1129   - $layer = $nmap->getlayerbyname("novotema");
1130   - //$layer->set("name",nomeRandomico());
  1128 + $layer = ms_newLayerObj($this->mapa);
1131 1129 $layer->set("status",MS_DEFAULT);
1132 1130 if($nomecamada == "default")
1133 1131 $nomecamada = $tema;
  1132 + $layer->setmetadata("CLASSE","SIM");
  1133 + $layer->setmetadata("TEXTO","NAO");
1134 1134 $layer->setmetadata("tema",$nomecamada);
1135 1135 $layer->setmetadata("nomeoriginal",$tema); //nome original do layer no web service
1136 1136 $layer->setmetadata("tipooriginal",$tiporep);
... ... @@ -1140,8 +1140,8 @@ Include:
1140 1140 if ($tiporep == "linear")
1141 1141 {
1142 1142 $layer->set("type",MS_LAYER_LINE);
1143   - $classe = $layer->getclass(0);
1144   - $estilo = $classe->getstyle(0);
  1143 + $classe = ms_newClassObj($layer);
  1144 + $estilo = ms_newStyleObj($classe);
1145 1145 $cor = $estilo->color;
1146 1146 $cor->setRGB(-1,-1,-1);
1147 1147 }
... ... @@ -1210,21 +1210,10 @@ Include:
1210 1210 }
1211 1211 $layer->setmetadata("wms_format",$im);
1212 1212 $layer->setmetadata("wfs","nao");
1213   - //verifica se o serviço tem wfs
1214   - /*
1215   - $wfs = existeWFS();
1216   - if ($wfs != "nao")
1217   - {
1218   - $layer->setmetadata("wfs","sim");
1219   - //$existeWFS = existeTemaWFS();
1220   - //if ($existeWFS == "sim")
1221   - //{$layer->setmetadata("wfs","sim");}
1222   - }
1223   - */
1224 1213 $layer->setmetadata("wfs","nao");
1225 1214 $c = $layer->offsite;
1226 1215 $c->setrgb(255,255,255);
1227   - ms_newLayerObj($this->mapa, $layer);
  1216 +
1228 1217 $of = $this->mapa->outputformat;
1229 1218 $of->set("imagemode",MS_IMAGEMODE_RGB);
1230 1219 $this->salva();
... ...
classesphp/funcoes_gerais.php
... ... @@ -1776,10 +1776,6 @@ function criaSHP($tema,$map_file,$locaplic,$dir_tmp,$nomeRand=TRUE)
1776 1776 $nomeshp = $dir_tmp."/".$novonomelayer;
1777 1777 if(file_exists($nomeshp.".shp"))
1778 1778 {return $nomeshp;}
1779   - if (strtoupper(substr(PHP_OS, 0, 3) == 'WIN'))
1780   - {$mapt = ms_newMapObj($locaplic."\\aplicmap\\novotema.map");}
1781   - else
1782   - {$mapt = ms_newMapObj($locaplic."/aplicmap/novotema.map");}
1783 1779 $novoshpf = ms_newShapefileObj($nomeshp, $tipol);
1784 1780 $novoshpf->free();
1785 1781 //se for do tipo features
... ... @@ -1833,12 +1829,8 @@ function criaSHP($tema,$map_file,$locaplic,$dir_tmp,$nomeRand=TRUE)
1833 1829 $existesel = carregaquery($map_file,&$layer,&$map);
1834 1830 if ($existesel == "nao")
1835 1831 {@$layer->queryByrect($map->extent);}
1836   -
1837 1832 //pega cada registro
1838 1833 $res_count = $layer->getNumresults();
1839   -
1840   - //echo $res_count;exit;
1841   -
1842 1834 if ($res_count > 0)
1843 1835 {
1844 1836 $sopen = $layer->open();
... ...
ferramentas/upload/upload.php
... ... @@ -43,8 +43,7 @@ if (isset($_FILES['i3GEOuploadshp']['name']))
43 43 if($status == 1)
44 44 {
45 45 echo "<p class='paragrafo' >Arquivo enviado. Adicionando tema...</p>";
46   - $mapt = ms_newMapObj($locaplic."/aplicmap/novotema.map");
47   - $novolayer = $mapt->getLayerByName("novotema");
  46 + $novolayer = ms_newLayerObj($mapa);
48 47 $novolayer->set("data",$dirmap."/".$_FILES['i3GEOuploadshp']['name']);
49 48 $novolayer->set("name",$_FILES['i3GEOuploadshp']['name']);
50 49 $novolayer->setmetadata("TEMA",$_FILES['i3GEOuploadshp']['name']);
... ... @@ -56,15 +55,19 @@ if (isset($_FILES[&#39;i3GEOuploadshp&#39;][&#39;name&#39;]))
56 55 if ($tipo == 3){$novolayer->set("type",MS_LAYER_LINE);}
57 56 if ($tipo == 5){$novolayer->set("type",MS_LAYER_POLYGON);}
58 57 $novolayer->setmetadata("TEMALOCAL","SIM");
  58 + $novolayer->setmetadata("CLASSE","SIM");
  59 + $novolayer->setmetadata("TEXTO","NAO");
59 60 //if (($tipo != 3) and ($tipo != 8 )){$novolayer->set("type",0);}
60 61 $novolayer->setfilter("");
61   - $classe = $novolayer->getclass(0);
62   - $estilo = $classe->getstyle(0);
  62 + $classe = ms_newClassObj($novolayer);
  63 + $estilo = ms_newStyleObj($classe);
63 64 if ($tipo == 1)
64 65 {
65 66 $estilo->set("symbolname","ponto");
66 67 $estilo->set("size",6);
67 68 }
  69 + $estilo->color->setrgb(200,50,0);
  70 + $estilo->outlinecolor->setrgb(0,0,0);
68 71 // le os itens
69 72 $novolayer->set("status",MS_DEFAULT);
70 73 $abriu = $novolayer->open();
... ... @@ -77,7 +80,7 @@ if (isset($_FILES[&#39;i3GEOuploadshp&#39;][&#39;name&#39;]))
77 80 $novolayer->setmetadata("ITENSDESC",$its);
78 81 $novolayer->set("template","none.htm");
79 82 }
80   - if($uploadEPSG != "")
  83 + if(isset($uploadEPSG) && $uploadEPSG != "")
81 84 {$novolayer->setProjection("init=epsg:".$uploadEPSG);}
82 85 $adiciona = ms_newLayerObj($mapa, $novolayer);
83 86 $salvo = $mapa->save($map_file);
... ...
ferramentas/uploaddbf/upload.php
... ... @@ -108,17 +108,20 @@ if (isset($_FILES[&#39;i3GEOuploaddbffile&#39;][&#39;name&#39;]))
108 108 }
109 109 }
110 110 $shapefileObj->free();
111   - $mapt = ms_newMapObj($locaplic."/aplicmap/novotema.map");
112   - $novolayer = $mapt->getLayerByName("novotema");
  111 + $novolayer = ms_newLayerObj($mapa);
113 112 $novolayer->set("data",$nomeshp);
114 113 $novolayer->set("name",basename($nomeshp));
115 114 $novolayer->setmetadata("TEMA",basename($nomeshp));
116 115 $novolayer->setmetadata("DOWNLOAD","SIM");
117 116 $novolayer->setmetadata("TEMALOCAL","SIM");
  117 + $novolayer->setmetadata("CLASSE","SIM");
  118 + $novolayer->setmetadata("TEXTO","NAO");
118 119 $novolayer->set("type",MS_LAYER_POINT);
119 120 $novolayer->setfilter("");
120   - $classe = $novolayer->getclass(0);
121   - $estilo = $classe->getstyle(0);
  121 + $classe = ms_newClassObj($novolayer);
  122 + $estilo = ms_newStyleObj($classe);
  123 + $estilo->color->setrgb(200,50,0);
  124 + $estilo->outlinecolor->setrgb(0,0,0);
122 125 $estilo->set("symbolname","ponto");
123 126 $estilo->set("size",6);
124 127 // le os itens
... ... @@ -133,7 +136,7 @@ if (isset($_FILES[&#39;i3GEOuploaddbffile&#39;][&#39;name&#39;]))
133 136 $novolayer->setmetadata("ITENSDESC",$its);
134 137 $novolayer->set("template","none.htm");
135 138 }
136   - if($uploaddbfEPSG != "")
  139 + if(isset($uploadEPSG) && $uploaddbfEPSG != "")
137 140 {$novolayer->setProjection("init=epsg:".$uploaddbfEPSG);}
138 141 $adiciona = ms_newLayerObj($mapa, $novolayer);
139 142 $salvo = $mapa->save($map_file);
... ...
ferramentas/uploadgpx/upload.php
... ... @@ -38,8 +38,7 @@ if (isset($_FILES[&#39;i3GEOuploadgpx&#39;][&#39;name&#39;]))
38 38 if($status == 1)
39 39 {
40 40 echo "<p class='paragrafo' >Arquivo enviado. Adicionando tema...</p>";
41   - $mapt = ms_newMapObj($locaplic."/aplicmap/novotema.map");
42   - $novolayer = $mapt->getLayerByName("novotema");
  41 + $novolayer = ms_newLayerObj($mapa);
43 42 $tipos = array("waypoints","routes","tracks","route_points","track_points");
44 43 foreach($tipos as $tipo){
45 44 $novolayer->set("connection",$dirmap."/".$_FILES['i3GEOuploadgpx']['name']);
... ... @@ -51,6 +50,8 @@ if (isset($_FILES[&#39;i3GEOuploadgpx&#39;][&#39;name&#39;]))
51 50 $novolayer->set("name",$nome.$tipo);
52 51 $novolayer->setmetadata("TEMA",$_FILES['i3GEOuploadgpx']['name']." ".$tipo);
53 52 $novolayer->setmetadata("DOWNLOAD","SIM");
  53 + $novolayer->setmetadata("CLASSE","SIM");
  54 + $novolayer->setmetadata("TEXTO","NAO");
54 55 if($tipo == "waypoints" || $tipo == "route_points" ||$tipo == "track_points")
55 56 {$novolayer->set("type",MS_LAYER_POINT);}
56 57 else
... ... @@ -58,17 +59,19 @@ if (isset($_FILES[&#39;i3GEOuploadgpx&#39;][&#39;name&#39;]))
58 59 $novolayer->set("data",$tipo);
59 60 $novolayer->setmetadata("TEMALOCAL","SIM");
60 61 $novolayer->setfilter("");
61   - $classe = $novolayer->getclass(0);
62   - $estilo = $classe->getstyle(0);
  62 + $classe = ms_newClassObj($novolayer);
  63 + $estilo = ms_newStyleObj($classe);
63 64 if($tipo == "waypoints" || $tipo == "route_points" ||$tipo == "track_points")
64 65 {
65 66 $estilo->set("symbolname","ponto");
66 67 $estilo->set("size",6);
67 68 }
  69 + $estilo->color->setrgb(200,50,0);
  70 + $estilo->outlinecolor->setrgb(0,0,0);
68 71 // le os itens
69 72 $novolayer->set("status",MS_DEFAULT);
70 73 $novolayer->set("template","none.htm");
71   - if($uploadEPSG != "")
  74 + if(isset($uploadEPSG) && $uploadEPSG != "")
72 75 {$novolayer->setProjection("init=epsg:".$uploadEPSG);}
73 76 $adiciona = ms_newLayerObj($mapa, $novolayer);
74 77 }
... ...
guia_de_migracao.txt
... ... @@ -16,6 +16,8 @@ Para a versão 4.5
16 16 http://localhost/i3geo/ms_criamapa.php?interface=zerocal.htm ou
17 17 http://localhost/i3geo/interface/zerocal.htm
18 18  
  19 + A pasta "images" foi removida e as imagens movidas para a pasta "imagens\depreciado"
  20 +
19 21  
20 22  
21 23 -------------------------------------------------------------------------------------------------
... ...