Commit 3dd956b99e0bf2bbe9603cb58e185b22124299e0

Authored by Edmar Moretti
1 parent 4c638031

teste do vinde

README.md
... ... @@ -6,6 +6,8 @@ Arquivos antigos e outras informações, veja em: https://softwarepublico.gov.br
6 6  
7 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 11 # Guia rápido de instalação
10 12  
11 13 ## Windows
... ... @@ -38,11 +40,11 @@ Para obter o código do i3Geo você tem duas opções, a primeira utiliza simple
38 40 * No terminal digite a sequência de comandos:
39 41  
40 42 mkdir i3geo
41   -
  43 +
42 44 cd i3geo
43   -
  45 +
44 46 git -c http.sslVerify=false clone http://softwarepublico.gov.br/gitlab/i3geo/i3geo.git .
45   -
  47 +
46 48 Não esqueça o ponto no final da linha acima.
47 49  
48 50 ## Linux (baseado em Ubuntu)
... ... @@ -52,23 +54,23 @@ Instale os softwares necesários para configurar o servidor web com PHP5, Mapser
52 54 No terminal, digite a sequência de comandos abaixo.
53 55  
54 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 58 sudo apt-get install php5-mbstring
57   -
  59 +
58 60 sudo apt-get install proj-epsg
59   -
  61 +
60 62 sudo a2enmod cgi
61   -
  63 +
62 64 sudo service apache2 restart
63   -
  65 +
64 66 sudo mkdir /var/www/html/i3geo
65   -
  67 +
66 68 sudo mkdir /tmp/ms_tmp
67   -
  69 +
68 70 sudo ln -s /tmp/ms_tmp /var/www/html/ms_tmp
69   -
  71 +
70 72 Teste a instalação digitando no seu navegador web http://localhost
71   -
  73 +
72 74 ### i3Geo
73 75  
74 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 89 * No terminal digite a sequência de comandos:
88 90  
89 91 sudo apt-get install git-core
90   -
  92 +
91 93 cd /var/www/html/i3geo
92   -
  94 +
93 95 sudo git -c http.sslVerify=false clone http://softwarepublico.gov.br/gitlab/i3geo/i3geo.git .
94   -
  96 +
95 97 Não esqueça o ponto no final da linha acima.
96 98  
97 99 ### Permissões
... ... @@ -99,7 +101,7 @@ Não esqueça o ponto no final da linha acima.
99 101 Para uso local você pode modificar de forma mais liberal as permissões dos arquivos. No terminal digite:
100 102  
101 103 sudo chmod -R 777 /var/www/html/i3geo
102   -
  104 +
103 105 sudo chmod -R 777 /var/www/html/ms_tmp
104 106  
105 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 111 Abra o terminal e digite os seguintes comandos (no Linux pode ser necessário usar `sudo`):
110 112  
111 113 git stash
112   -
  114 +
113 115 git -c http.sslVerify=false pull
114   -
  116 +
115 117 git stash pop
... ...
admin/admin.db
No preview for this file type
ferramentas/vinde/wmsindejson.php
1 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 2 include(dirname(__FILE__)."/../../ms_configura.php");
21 3 include($locaplic."/classesphp/funcoes_gerais.php");
22 4 $agora = intval(time() / 10000);
... ... @@ -48,15 +30,6 @@ $convert = explode(&quot;\n&quot;, $resultado);
48 30  
49 31 $n = count($convert);
50 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 33 $busca = array(
61 34 array("layers","format:"),
62 35 array("format","transparent:"),
... ... @@ -72,8 +45,6 @@ for ($i=0;$i&lt;$n;$i++){
72 45  
73 46 $pt = "/(new OpenLayers\.Layer\.WMS\(\')(.*)',\s'(.*)',\s{/";
74 47 preg_match_all($pt, $linha, $matches);
75   - //echo "<pre>";
76   - //var_dump($matches);exit;
77 48 $nomeLayer = $matches[2][0];////converte($matches[2][0]);
78 49 $layer[] = $nomeLayer;
79 50 $parametros = array();
... ... @@ -110,18 +81,11 @@ for ($i=0;$i&lt;$n;$i++){
110 81 $layers[$i] = $layer;
111 82 }
112 83 }
113   -
114   -//separa os grupos
115   -//echo "<pre>";
116   -//var_dump($grupos);exit;
117 84 $chaves = array_keys($grupos);
118 85 sort($chaves);
119   -//echo count($chaves);exit;
120 86 $arvore = array();
121 87 foreach($chaves as $chave){
122   - //echo $chave."\n";
123 88 $hs = explode("/",$chave);
124   - //echo count($hs);
125 89 $d = $hs;
126 90 array_shift($d);
127 91 if(array_key_exists(0,$hs) && array_key_exists($hs[0],$arvore)){
... ... @@ -131,8 +95,6 @@ foreach($chaves as $chave){
131 95 $arvore[$hs[0]] = noi($d,array());
132 96 }
133 97 }
134   -//var_dump($arvore);
135   -//exit;
136 98 $final = array(
137 99 "layers"=>$layers,
138 100 "arvore"=>$arvore
... ... @@ -147,16 +109,10 @@ echo json_encode($final,true);
147 109 if(extension_loaded('zlib')){
148 110 ob_end_flush();
149 111 }
150   -
151   -//echo json_encode($novalinha,true);
152   -//echo "{".implode($novalinha,",")."}";
153   -//echo "[".$novalinha[0]."]";
154 112 function noi($n,$l){
155 113 global $layers;
156   - //var_dump($n);
157 114 $d = $n;
158 115 array_shift($d);
159   - //echo count($n);
160 116 if(count($n) > 1){
161 117 if(array_key_exists(0,$n) && array_key_exists($n[0],$l)){
162 118 if(is_array($n[1])){
... ... @@ -172,15 +128,11 @@ function noi($n,$l){
172 128 $l[$n[0]] = noi($d,$l);
173 129 return $l;
174 130 }
175   - //$n[1] = $layers[$n[0]];
176 131 return $n;
177 132 }
178 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 136 return $texto;
185 137 }
186 138 ?>
... ...