Commit 3dd956b99e0bf2bbe9603cb58e185b22124299e0

Authored by Edmar Moretti
1 parent 4c638031

teste do vinde

@@ -6,6 +6,8 @@ Arquivos antigos e outras informações, veja em: https://softwarepublico.gov.br @@ -6,6 +6,8 @@ Arquivos antigos e outras informações, veja em: https://softwarepublico.gov.br
6 6
7 Guia completo sobre instalação e administração do software, veja em: http://moodle.gvsig-training.com/mod/book/view.php?id=5025 7 Guia completo sobre instalação e administração do software, veja em: http://moodle.gvsig-training.com/mod/book/view.php?id=5025
8 8
  9 +Sobre segurança: http://moodle.gvsig-training.com/mod/book/view.php?id=5025&chapterid=116
  10 +
9 # Guia rápido de instalação 11 # Guia rápido de instalação
10 12
11 ## Windows 13 ## Windows
@@ -38,11 +40,11 @@ Para obter o código do i3Geo você tem duas opções, a primeira utiliza simple @@ -38,11 +40,11 @@ Para obter o código do i3Geo você tem duas opções, a primeira utiliza simple
38 * No terminal digite a sequência de comandos: 40 * No terminal digite a sequência de comandos:
39 41
40 mkdir i3geo 42 mkdir i3geo
41 - 43 +
42 cd i3geo 44 cd i3geo
43 - 45 +
44 git -c http.sslVerify=false clone http://softwarepublico.gov.br/gitlab/i3geo/i3geo.git . 46 git -c http.sslVerify=false clone http://softwarepublico.gov.br/gitlab/i3geo/i3geo.git .
45 - 47 +
46 Não esqueça o ponto no final da linha acima. 48 Não esqueça o ponto no final da linha acima.
47 49
48 ## Linux (baseado em Ubuntu) 50 ## Linux (baseado em Ubuntu)
@@ -52,23 +54,23 @@ Instale os softwares necesários para configurar o servidor web com PHP5, Mapser @@ -52,23 +54,23 @@ Instale os softwares necesários para configurar o servidor web com PHP5, Mapser
52 No terminal, digite a sequência de comandos abaixo. 54 No terminal, digite a sequência de comandos abaixo.
53 55
54 sudo apt-get install apache2 apache2-doc apache2-utils cgi-mapserver mapserver-bin sqlite libapache2-mod-php5 php5 php5-common php5-dev php5-curl php5-json php5-gd php5-odbc php5-pgsql php5-sqlite php5-ps php5-xmlrpc php5-xsl php5-imagick php5-mapscript 56 sudo apt-get install apache2 apache2-doc apache2-utils cgi-mapserver mapserver-bin sqlite libapache2-mod-php5 php5 php5-common php5-dev php5-curl php5-json php5-gd php5-odbc php5-pgsql php5-sqlite php5-ps php5-xmlrpc php5-xsl php5-imagick php5-mapscript
55 - 57 +
56 sudo apt-get install php5-mbstring 58 sudo apt-get install php5-mbstring
57 - 59 +
58 sudo apt-get install proj-epsg 60 sudo apt-get install proj-epsg
59 - 61 +
60 sudo a2enmod cgi 62 sudo a2enmod cgi
61 - 63 +
62 sudo service apache2 restart 64 sudo service apache2 restart
63 - 65 +
64 sudo mkdir /var/www/html/i3geo 66 sudo mkdir /var/www/html/i3geo
65 - 67 +
66 sudo mkdir /tmp/ms_tmp 68 sudo mkdir /tmp/ms_tmp
67 - 69 +
68 sudo ln -s /tmp/ms_tmp /var/www/html/ms_tmp 70 sudo ln -s /tmp/ms_tmp /var/www/html/ms_tmp
69 - 71 +
70 Teste a instalação digitando no seu navegador web http://localhost 72 Teste a instalação digitando no seu navegador web http://localhost
71 - 73 +
72 ### i3Geo 74 ### i3Geo
73 75
74 Para obter o código do i3Geo você tem duas opções, a primeira utiliza simplesmente o download de um arquivo e a segunda utiliza o Git. A vantagem da segunda opção é que você poderá atualizar sua instalação de forma mais fácil. 76 Para obter o código do i3Geo você tem duas opções, a primeira utiliza simplesmente o download de um arquivo e a segunda utiliza o Git. A vantagem da segunda opção é que você poderá atualizar sua instalação de forma mais fácil.
@@ -87,11 +89,11 @@ Após a instalação, digite no navegador web http://localhost/i3geo @@ -87,11 +89,11 @@ Após a instalação, digite no navegador web http://localhost/i3geo
87 * No terminal digite a sequência de comandos: 89 * No terminal digite a sequência de comandos:
88 90
89 sudo apt-get install git-core 91 sudo apt-get install git-core
90 - 92 +
91 cd /var/www/html/i3geo 93 cd /var/www/html/i3geo
92 - 94 +
93 sudo git -c http.sslVerify=false clone http://softwarepublico.gov.br/gitlab/i3geo/i3geo.git . 95 sudo git -c http.sslVerify=false clone http://softwarepublico.gov.br/gitlab/i3geo/i3geo.git .
94 - 96 +
95 Não esqueça o ponto no final da linha acima. 97 Não esqueça o ponto no final da linha acima.
96 98
97 ### Permissões 99 ### Permissões
@@ -99,7 +101,7 @@ Não esqueça o ponto no final da linha acima. @@ -99,7 +101,7 @@ Não esqueça o ponto no final da linha acima.
99 Para uso local você pode modificar de forma mais liberal as permissões dos arquivos. No terminal digite: 101 Para uso local você pode modificar de forma mais liberal as permissões dos arquivos. No terminal digite:
100 102
101 sudo chmod -R 777 /var/www/html/i3geo 103 sudo chmod -R 777 /var/www/html/i3geo
102 - 104 +
103 sudo chmod -R 777 /var/www/html/ms_tmp 105 sudo chmod -R 777 /var/www/html/ms_tmp
104 106
105 ### Atualização do código 107 ### Atualização do código
@@ -109,7 +111,7 @@ Válido apenas se você não é um desenvolvedor do i3Geo e não tenha feito che @@ -109,7 +111,7 @@ Válido apenas se você não é um desenvolvedor do i3Geo e não tenha feito che
109 Abra o terminal e digite os seguintes comandos (no Linux pode ser necessário usar `sudo`): 111 Abra o terminal e digite os seguintes comandos (no Linux pode ser necessário usar `sudo`):
110 112
111 git stash 113 git stash
112 - 114 +
113 git -c http.sslVerify=false pull 115 git -c http.sslVerify=false pull
114 - 116 +
115 git stash pop 117 git stash pop
admin/admin.db
No preview for this file type
ferramentas/vinde/wmsindejson.php
1 <?php 1 <?php
2 -exit;  
3 -/*  
4 -echo  
5 -'[  
6 - "2013 - Agricultura Irrigada",  
7 - "http://www.geoservicos.inde.gov.br/geoserver/wms",  
8 - {  
9 - "layers": "MPOG:Agricultura_Irrigada",  
10 - "format": "image/png",  
11 - "transparent": true  
12 - }  
13 -]  
14 -';  
15 -*/  
16 -/*  
17 - * new OpenLayers.Layer.WMS('2013 - Agricultura Irrigada', 'http://www.geoservicos.inde.gov.br/geoserver/wms', {layers: 'MPOG:Agricultura_Irrigada', format: 'image/png', transparent: true}, {isBaseLayer: false, visibility: false, group: 'Planejamento/Planejamento/2013 - Agricultura Irrigada', metadataURL: 'http://www.metadados.inde.gov.br/geonetwork/srv/br/metadata.show.embedded?uuid=045663f7-5691-447a-8d06-ab692522328c', legendURL: 'http://www.geoservicos.inde.gov.br/geoserver/wms?service=WMS&version=1.1.0&request=GetLegendGraphic&layer=MPOG:Agricultura_Irrigada&format=image/png',kmlURL: 'http://www.geoservicos.inde.gov.br/geoserver/wms?service=WMS&version=1.1.0&request=GetMap&layers=MPOG:Agricultura_Irrigada&width=1024&height=768&bbox=-74,-34,-29,6&format=application/vnd.google-earth.kmz+xml',sldtema: '','maxExtent': new OpenLayers.Bounds(-55.389,-22.229,-37.808,-2.922), isBaseGroup: false, displayInLayerSwitcher: false, removable: false, groupOfKeeper: 'MP/2013 - Agricultura Irrigada', groupOfTheme: 'Planejamento/Planejamento/2013 - Agricultura Irrigada'}),  
18 - */  
19 -  
20 include(dirname(__FILE__)."/../../ms_configura.php"); 2 include(dirname(__FILE__)."/../../ms_configura.php");
21 include($locaplic."/classesphp/funcoes_gerais.php"); 3 include($locaplic."/classesphp/funcoes_gerais.php");
22 $agora = intval(time() / 10000); 4 $agora = intval(time() / 10000);
@@ -48,15 +30,6 @@ $convert = explode(&quot;\n&quot;, $resultado); @@ -48,15 +30,6 @@ $convert = explode(&quot;\n&quot;, $resultado);
48 30
49 $n = count($convert); 31 $n = count($convert);
50 $layers = array(); 32 $layers = array();
51 -//$novalinha[] = "var servicosINDE = [";  
52 -//$convert= array(" new OpenLayers.Layer.WMS('2013 - Agricultura Irrigada', 'http://www.geoservicos.inde.gov.br/geoserver/wms',  
53 -//{layers: 'MPOG:Agricultura_Irrigada', format: 'image/png', transparent: true},  
54 -//{isBaseLayer: false, visibility: false, group: 'Planejamento/Planejamento/2013 - Agricultura Irrigada',  
55 -//metadataURL: 'http://www.metadados.inde.gov.br/geonetwork/srv/br/metadata.show.embedded?uuid=045663f7-5691-447a-8d06-ab692522328c',  
56 -//legendURL: 'http://www.geoservicos.inde.gov.br/geoserver/wms?service=WMS&version=1.1.0&request=GetLegendGraphic&layer=MPOG:Agricultura_Irrigada&format=image/png',  
57 -//kmlURL: 'http://www.geoservicos.inde.gov.br/geoserver/wms?service=WMS&version=1.1.0&request=GetMap&layers=MPOG:Agricultura_Irrigada&width=1024&height=768&bbox=-74,-34,-29,6&format=application/vnd.google-earth.kmz+xml',sldtema: '',  
58 -//'maxExtent': new OpenLayers.Bounds(-55.389,-22.229,-37.808,-2.922), isBaseGroup: false, displayInLayerSwitcher: false, removable: false, groupOfKeeper: 'MP/2013 - Agricultura Irrigada', groupOfTheme: 'Planejamento/Planejamento/2013 - Agricultura Irrigada'}),  
59 -  
60 $busca = array( 33 $busca = array(
61 array("layers","format:"), 34 array("layers","format:"),
62 array("format","transparent:"), 35 array("format","transparent:"),
@@ -72,8 +45,6 @@ for ($i=0;$i&lt;$n;$i++){ @@ -72,8 +45,6 @@ for ($i=0;$i&lt;$n;$i++){
72 45
73 $pt = "/(new OpenLayers\.Layer\.WMS\(\')(.*)',\s'(.*)',\s{/"; 46 $pt = "/(new OpenLayers\.Layer\.WMS\(\')(.*)',\s'(.*)',\s{/";
74 preg_match_all($pt, $linha, $matches); 47 preg_match_all($pt, $linha, $matches);
75 - //echo "<pre>";  
76 - //var_dump($matches);exit;  
77 $nomeLayer = $matches[2][0];////converte($matches[2][0]); 48 $nomeLayer = $matches[2][0];////converte($matches[2][0]);
78 $layer[] = $nomeLayer; 49 $layer[] = $nomeLayer;
79 $parametros = array(); 50 $parametros = array();
@@ -110,18 +81,11 @@ for ($i=0;$i&lt;$n;$i++){ @@ -110,18 +81,11 @@ for ($i=0;$i&lt;$n;$i++){
110 $layers[$i] = $layer; 81 $layers[$i] = $layer;
111 } 82 }
112 } 83 }
113 -  
114 -//separa os grupos  
115 -//echo "<pre>";  
116 -//var_dump($grupos);exit;  
117 $chaves = array_keys($grupos); 84 $chaves = array_keys($grupos);
118 sort($chaves); 85 sort($chaves);
119 -//echo count($chaves);exit;  
120 $arvore = array(); 86 $arvore = array();
121 foreach($chaves as $chave){ 87 foreach($chaves as $chave){
122 - //echo $chave."\n";  
123 $hs = explode("/",$chave); 88 $hs = explode("/",$chave);
124 - //echo count($hs);  
125 $d = $hs; 89 $d = $hs;
126 array_shift($d); 90 array_shift($d);
127 if(array_key_exists(0,$hs) && array_key_exists($hs[0],$arvore)){ 91 if(array_key_exists(0,$hs) && array_key_exists($hs[0],$arvore)){
@@ -131,8 +95,6 @@ foreach($chaves as $chave){ @@ -131,8 +95,6 @@ foreach($chaves as $chave){
131 $arvore[$hs[0]] = noi($d,array()); 95 $arvore[$hs[0]] = noi($d,array());
132 } 96 }
133 } 97 }
134 -//var_dump($arvore);  
135 -//exit;  
136 $final = array( 98 $final = array(
137 "layers"=>$layers, 99 "layers"=>$layers,
138 "arvore"=>$arvore 100 "arvore"=>$arvore
@@ -147,16 +109,10 @@ echo json_encode($final,true); @@ -147,16 +109,10 @@ echo json_encode($final,true);
147 if(extension_loaded('zlib')){ 109 if(extension_loaded('zlib')){
148 ob_end_flush(); 110 ob_end_flush();
149 } 111 }
150 -  
151 -//echo json_encode($novalinha,true);  
152 -//echo "{".implode($novalinha,",")."}";  
153 -//echo "[".$novalinha[0]."]";  
154 function noi($n,$l){ 112 function noi($n,$l){
155 global $layers; 113 global $layers;
156 - //var_dump($n);  
157 $d = $n; 114 $d = $n;
158 array_shift($d); 115 array_shift($d);
159 - //echo count($n);  
160 if(count($n) > 1){ 116 if(count($n) > 1){
161 if(array_key_exists(0,$n) && array_key_exists($n[0],$l)){ 117 if(array_key_exists(0,$n) && array_key_exists($n[0],$l)){
162 if(is_array($n[1])){ 118 if(is_array($n[1])){
@@ -172,15 +128,11 @@ function noi($n,$l){ @@ -172,15 +128,11 @@ function noi($n,$l){
172 $l[$n[0]] = noi($d,$l); 128 $l[$n[0]] = noi($d,$l);
173 return $l; 129 return $l;
174 } 130 }
175 - //$n[1] = $layers[$n[0]];  
176 return $n; 131 return $n;
177 } 132 }
178 function converte($texto) 133 function converte($texto)
179 { 134 {
180 - //if (!mb_detect_encoding($texto,"UTF-8",false))  
181 - //{  
182 - $texto = mb_convert_encoding($texto,"ISO-8859-1","AUTO");  
183 - //} 135 + $texto = mb_convert_encoding($texto,"ISO-8859-1","AUTO");
184 return $texto; 136 return $texto;
185 } 137 }
186 ?> 138 ?>