Commit f49badc8ebd478af6ac895f3425b230e47001620
1 parent
8e10e956
Exists in
master
and in
7 other branches
--no commit message
Showing
6 changed files
with
92 additions
and
14 deletions
Show diff stats
admin/admin.db
No preview for this file type
admin/php/classe_metaestat.php
@@ -487,7 +487,7 @@ class Metaestat{ | @@ -487,7 +487,7 @@ class Metaestat{ | ||
487 | * @param valor de opacidade do layer | 487 | * @param valor de opacidade do layer |
488 | * @return array("mapfile"=>,"layer"=>,"titulolayer"=>) | 488 | * @return array("mapfile"=>,"layer"=>,"titulolayer"=>) |
489 | */ | 489 | */ |
490 | - function mapfileMedidaVariavel($id_medida_variavel,$filtro="",$todasascolunas = 0,$tipolayer="polygon",$titulolayer="",$id_classificacao="",$agruparpor="",$codigo_tipo_regiao="",$opacidade="",$suportaWMST = false){ | 490 | + function mapfileMedidaVariavel($id_medida_variavel,$filtro="",$todasascolunas = 0,$tipolayer="polygon",$titulolayer="",$id_classificacao="",$agruparpor="",$codigo_tipo_regiao="",$opacidade="",$suportaWMST=false){ |
491 | //para permitir a inclusao de filtros, o fim do sql e marcado com /*FW*//*FW*/ | 491 | //para permitir a inclusao de filtros, o fim do sql e marcado com /*FW*//*FW*/ |
492 | //indicando onde deve comecar e terminar uma possivel clausula where | 492 | //indicando onde deve comecar e terminar uma possivel clausula where |
493 | //ou com /*FA*//*FA*/ | 493 | //ou com /*FA*//*FA*/ |
@@ -549,6 +549,7 @@ class Metaestat{ | @@ -549,6 +549,7 @@ class Metaestat{ | ||
549 | $titulolayer = mb_convert_encoding($sql["titulo"],"ISO-8859-1",mb_detect_encoding($sql["titulo"])); | 549 | $titulolayer = mb_convert_encoding($sql["titulo"],"ISO-8859-1",mb_detect_encoding($sql["titulo"])); |
550 | } | 550 | } |
551 | //pega os parametros caso seja um mapfile para WMS-time | 551 | //pega os parametros caso seja um mapfile para WMS-time |
552 | + | ||
552 | if($suportaWMST == true){ | 553 | if($suportaWMST == true){ |
553 | $resolucao = $this->listaResolucaoWMST($id_medida_variavel); | 554 | $resolucao = $this->listaResolucaoWMST($id_medida_variavel); |
554 | } | 555 | } |
@@ -1700,11 +1701,17 @@ class Metaestat{ | @@ -1700,11 +1701,17 @@ class Metaestat{ | ||
1700 | return $this->execSQL($sql,$codigo_estat_conexao); | 1701 | return $this->execSQL($sql,$codigo_estat_conexao); |
1701 | } | 1702 | } |
1702 | function listaResolucaoWMST($id_medida_variavel){ | 1703 | function listaResolucaoWMST($id_medida_variavel){ |
1703 | - $parametros = $this->listaParametro($id_medida_variavel,"","",true); | 1704 | + $parametros = $this->listaParametro($id_medida_variavel,"","",true,true); |
1705 | + //var_dump($parametros);exit; | ||
1704 | //faz o sql para pegar os valores e definir a resolucao | 1706 | //faz o sql para pegar os valores e definir a resolucao |
1705 | - | 1707 | + foreach($parametros as $parametro){ |
1708 | + | ||
1709 | + } | ||
1706 | //se for apenas do tipo anual | 1710 | //se for apenas do tipo anual |
1707 | } | 1711 | } |
1712 | + function listaParametro2CampoData(){ | ||
1713 | + | ||
1714 | + } | ||
1708 | /** | 1715 | /** |
1709 | * Lista os dados de um ou de todos os parametros relacionados a uma medida de variavel | 1716 | * Lista os dados de um ou de todos os parametros relacionados a uma medida de variavel |
1710 | * @param id da medida de variavel | 1717 | * @param id da medida de variavel |
@@ -1712,7 +1719,7 @@ class Metaestat{ | @@ -1712,7 +1719,7 @@ class Metaestat{ | ||
1712 | * @param id do pai (se definido, lista apenas os filhos deste) | 1719 | * @param id do pai (se definido, lista apenas os filhos deste) |
1713 | * @param bool indica se apenas parametros do tipo temporal serao retornados | 1720 | * @param bool indica se apenas parametros do tipo temporal serao retornados |
1714 | */ | 1721 | */ |
1715 | - function listaParametro($id_medida_variavel,$id_parametro_medida="",$id_pai="",$apenasTempo=false){ | 1722 | + function listaParametro($id_medida_variavel,$id_parametro_medida="",$id_pai="",$apenasTempo=false,$ordenaPeloPai=false){ |
1716 | $sql = "SELECT i3geoestat_parametro_medida.*,i3geoestat_medida_variavel.* "; | 1723 | $sql = "SELECT i3geoestat_parametro_medida.*,i3geoestat_medida_variavel.* "; |
1717 | $sql .= "FROM ".$this->esquemaadmin."i3geoestat_parametro_medida "; | 1724 | $sql .= "FROM ".$this->esquemaadmin."i3geoestat_parametro_medida "; |
1718 | $sql .= "INNER JOIN ".$this->esquemaadmin."i3geoestat_medida_variavel "; | 1725 | $sql .= "INNER JOIN ".$this->esquemaadmin."i3geoestat_medida_variavel "; |
@@ -1730,12 +1737,12 @@ class Metaestat{ | @@ -1730,12 +1737,12 @@ class Metaestat{ | ||
1730 | $sql .= " AND id_pai = $id_pai"; | 1737 | $sql .= " AND id_pai = $id_pai"; |
1731 | } | 1738 | } |
1732 | if($apenasTempo == true){ | 1739 | if($apenasTempo == true){ |
1733 | - $tempo = " i3geoestat_parametro_medida.tipo > 0 AND i3geoestat_parametro_medida.tipo < 5 "; | ||
1734 | - if($id_pai != ""){ | ||
1735 | - $sql .= " AND "; | ||
1736 | - } | 1740 | + $tempo = " AND i3geoestat_parametro_medida.tipo > 0 AND i3geoestat_parametro_medida.tipo < 5 "; |
1737 | $sql .= $tempo; | 1741 | $sql .= $tempo; |
1738 | - } | 1742 | + } |
1743 | + if($ordenaPeloPai == true){ | ||
1744 | + $sql .= " ORDER BY id_pai"; | ||
1745 | + } | ||
1739 | //echo $sql;exit; | 1746 | //echo $sql;exit; |
1740 | return $this->execSQL($sql,$id_parametro_medida); | 1747 | return $this->execSQL($sql,$id_parametro_medida); |
1741 | } | 1748 | } |
classesjs/classe_configura.js
@@ -216,7 +216,7 @@ i3GEO.configura = { | @@ -216,7 +216,7 @@ i3GEO.configura = { | ||
216 | { id:"omenudataFerramentas6b",text: $trad("t33"), url: "javascript:i3GEO.tema.dialogo.editaLegenda()"}, | 216 | { id:"omenudataFerramentas6b",text: $trad("t33"), url: "javascript:i3GEO.tema.dialogo.editaLegenda()"}, |
217 | { id:"omenudataFerramentas7b",text: $trad("t42"), url: "javascript:i3GEO.tema.dialogo.cortina()"}, | 217 | { id:"omenudataFerramentas7b",text: $trad("t42"), url: "javascript:i3GEO.tema.dialogo.cortina()"}, |
218 | { id:"omenudataFerramentas8b",text: $trad("t37a"), url: "javascript:i3GEO.tema.dialogo.graficotema()"}, | 218 | { id:"omenudataFerramentas8b",text: $trad("t37a"), url: "javascript:i3GEO.tema.dialogo.graficotema()"}, |
219 | - { id:"omenudataFerramentas9b",text: $trad("t37b"), url: "javascript:i3GEO.analise.dialogo.graficoInterativo()" }, | 219 | + { id:"omenudataFerramentas9b",text: $trad("t37b"), url: "javascript:i3GEO.analise.dialogo.graficoInterativo1()" }, |
220 | //cartogramas | 220 | //cartogramas |
221 | { id:"omenudataFerramentas0e",text: '<span style=color:gray;text-decoration:underline; ><b>'+$trad("x60")+'</b></span>',url: "#"}, | 221 | { id:"omenudataFerramentas0e",text: '<span style=color:gray;text-decoration:underline; ><b>'+$trad("x60")+'</b></span>',url: "#"}, |
222 | { id:"omenudataFerramentas1e",text: $trad("x57"), url: "javascript:i3GEO.mapa.dialogo.metaestat()"}, | 222 | { id:"omenudataFerramentas1e",text: $trad("x57"), url: "javascript:i3GEO.mapa.dialogo.metaestat()"}, |
@@ -1154,4 +1154,4 @@ i3GEO.configura = { | @@ -1154,4 +1154,4 @@ i3GEO.configura = { | ||
1154 | } | 1154 | } |
1155 | ]} | 1155 | ]} |
1156 | }; | 1156 | }; |
1157 | -//YAHOO.log("carregou classe configura", "Classes i3geo"); | ||
1158 | \ No newline at end of file | 1157 | \ No newline at end of file |
1158 | +//YAHOO.log("carregou classe configura", "Classes i3geo"); |
ferramentas/metaestat/index.js
@@ -143,7 +143,7 @@ i3GEOF.metaestat = { | @@ -143,7 +143,7 @@ i3GEOF.metaestat = { | ||
143 | icone: "imagens/gisicons/table.png" | 143 | icone: "imagens/gisicons/table.png" |
144 | },{ | 144 | },{ |
145 | titulo: "Gráfico interativo", | 145 | titulo: "Gráfico interativo", |
146 | - onclick: "i3GEO.analise.dialogo.graficoInterativo()", | 146 | + onclick: "i3GEO.analise.dialogo.graficoInterativo1()", |
147 | icone: "imagens/oxygen/22x22/view_statistics.png" | 147 | icone: "imagens/oxygen/22x22/view_statistics.png" |
148 | },{ | 148 | },{ |
149 | titulo: "Opacidade", | 149 | titulo: "Opacidade", |
ogc.php
@@ -179,7 +179,6 @@ if(!isset($tema)){ | @@ -179,7 +179,6 @@ if(!isset($tema)){ | ||
179 | } | 179 | } |
180 | $tipo = "intervalo"; | 180 | $tipo = "intervalo"; |
181 | } | 181 | } |
182 | - | ||
183 | //nome do mapfile que ficara em cache | 182 | //nome do mapfile que ficara em cache |
184 | $agora = intval(time() / 1000); | 183 | $agora = intval(time() / 1000); |
185 | $nomeMapfileTmp = $dir_tmp."/ogc_".md5($tema)."_".$agora.".map"; | 184 | $nomeMapfileTmp = $dir_tmp."/ogc_".md5($tema)."_".$agora.".map"; |
@@ -233,7 +232,7 @@ else{ | @@ -233,7 +232,7 @@ else{ | ||
233 | include("admin/php/classe_metaestat.php"); | 232 | include("admin/php/classe_metaestat.php"); |
234 | $m = new Metaestat(); | 233 | $m = new Metaestat(); |
235 | $m->nomecache = "ogcmetaestat".$id_medida_variavel; | 234 | $m->nomecache = "ogcmetaestat".$id_medida_variavel; |
236 | - $mapfileMetaestat = mapfileMedidaVariavel($id_medida_variavel,"",1,"","","","","","",true); | 235 | + $mapfileMetaestat = $m->mapfileMedidaVariavel($id_medida_variavel,"",1,"","","","","","",true); |
237 | $nmap = ms_newMapobj($mapfileMetaestat["mapfile"]); | 236 | $nmap = ms_newMapobj($mapfileMetaestat["mapfile"]); |
238 | } | 237 | } |
239 | else{ | 238 | else{ |
@@ -0,0 +1,72 @@ | @@ -0,0 +1,72 @@ | ||
1 | +MAP | ||
2 | + FONTSET "../symbols/fontes.txt" | ||
3 | + SYMBOLSET "../symbols/simbolosv6.sym" | ||
4 | + LAYER | ||
5 | + CONNECTION "user=postgres password=postgres dbname=geosaude host=localhost port=5432" | ||
6 | + CONNECTIONTYPE POSTGIS | ||
7 | + DATA "the_geom from ( SELECT ano,d.gid,d.pop_res_tot,d.co_municipio,g.no_cidade,g.co_uf,g.sg_uf,g.area_territorial,g.nu_ano_instalacao,st_setsrid(g.the_geom,4326) as the_geom FROM (SELECT * FROM ibge.populacao_residente ) as d, i3geo_metaestat.municipios as g WHERE d.co_municipio::text = g.co_municipio::text ) as foo using unique co_municipio using srid=4326" | ||
8 | + METADATA | ||
9 | + "METAESTAT_ID_MEDIDA_VARIAVEL" "" | ||
10 | + "CLASSE" "SIM" | ||
11 | + "permitekmz" "nao" | ||
12 | + "METAESTAT_CODIGO_TIPO_REGIAO" "" | ||
13 | + "permitedownload" "sim" | ||
14 | + "METAESTAT" "" | ||
15 | + "permitekml" "sim" | ||
16 | + "permiteogc" "sim" | ||
17 | + "TEMA" "População total (pol) Município Teste de WMS Time" | ||
18 | + "wms_title" "População total (pol) Município Teste de WMS Time" | ||
19 | + "wms_timeextent" "1970,1980,1991,2000" | ||
20 | + "wms_timeitem" "ano" | ||
21 | + "wms_timedefault" "1970" | ||
22 | + "wms_enable_request" "*" | ||
23 | + | ||
24 | + | ||
25 | + END # METADATA | ||
26 | + NAME "_lwmstime" | ||
27 | + STATUS DEFAULT | ||
28 | + TEMPLATE "none.htm" | ||
29 | + TILEITEM "location" | ||
30 | + TYPE POLYGON | ||
31 | + UNITS METERS | ||
32 | + FILTER (ano = 1970) #1970 1980 1991 2000 | ||
33 | + CLASS | ||
34 | + NAME "<= 6008" | ||
35 | + EXPRESSION ([pop_res_tot]<=6008) | ||
36 | + STYLE | ||
37 | + COLOR 255 255 255 | ||
38 | + OUTLINECOLOR 255 255 255 | ||
39 | + OUTLINEWIDTH 2 | ||
40 | + END # STYLE | ||
41 | + END # CLASS | ||
42 | + CLASS | ||
43 | + NAME "> 6008 e <= 11531" | ||
44 | + EXPRESSION (([pop_res_tot]>6008)and([pop_res_tot]<=11531)) | ||
45 | + STYLE | ||
46 | + COLOR 207 207 255 | ||
47 | + OUTLINECOLOR 255 255 255 | ||
48 | + OUTLINEWIDTH 2 | ||
49 | + END # STYLE | ||
50 | + END # CLASS | ||
51 | + CLASS | ||
52 | + NAME "> 11531 e <= 22638" | ||
53 | + EXPRESSION (([pop_res_tot]>11531)and([pop_res_tot]<=22638)) | ||
54 | + STYLE | ||
55 | + COLOR 160 160 255 | ||
56 | + OUTLINECOLOR 255 255 255 | ||
57 | + OUTLINEWIDTH 2 | ||
58 | + END # STYLE | ||
59 | + END # CLASS | ||
60 | + CLASS | ||
61 | + NAME "> 22638" | ||
62 | + EXPRESSION ([pop_res_tot]>22638) | ||
63 | + STYLE | ||
64 | + COLOR 114 114 255 | ||
65 | + OUTLINECOLOR 255 255 255 | ||
66 | + OUTLINEWIDTH 2 | ||
67 | + END # STYLE | ||
68 | + END # CLASS | ||
69 | + END # LAYER | ||
70 | + | ||
71 | +END # MAP | ||
72 | + |