From 6c349a1f02e6e2e9b9eb4d874f74d0ee474cfeb6 Mon Sep 17 00:00:00 2001 From: Edmar Moretti Date: Tue, 31 Jan 2012 14:19:35 +0000 Subject: [PATCH] --- admin/admin.db | Bin 75776 -> 0 bytes aplicmap/simptv6.map | 4 ++-- classesphp/classe_atributos.php | 8 ++++++-- classesphp/classe_legenda.php | 3 +-- classesphp/funcoes_gerais.php | 2 +- classesphp/graficos.php | 1 + documentacao/manual_de_usuario_do_i3geo.odt | Bin 6401336 -> 0 bytes ferramentas/tabela/relatorio.php | 21 ++++++++++++++------- mashups/openlayers.js.php | 3 ++- mashups/openlayers.php | 2 +- mashups/openlayers_compacto.js | 3 ++- mashups/openlayers_compacto.js.php | 3 ++- ogc.php | 3 ++- symbols/simbolosptv6.sym | 1 - temas/grid.map | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ testamapfile.php | 5 +++-- 16 files changed, 100 insertions(+), 22 deletions(-) create mode 100644 temas/grid.map diff --git a/admin/admin.db b/admin/admin.db index 397914f..ef0e6bb 100644 Binary files a/admin/admin.db and b/admin/admin.db differ diff --git a/aplicmap/simptv6.map b/aplicmap/simptv6.map index a059550..261f1ec 100644 --- a/aplicmap/simptv6.map +++ b/aplicmap/simptv6.map @@ -16,11 +16,11 @@ FONTSET "../symbols/fontes.txt" METADATA END STYLE - COLOR 0 0 0 + COLOR 0 0 0 MAXSIZE 500 MINSIZE 1 SIZE 8 - SYMBOL "seta" + SYMBOL "ponto" END END END diff --git a/classesphp/classe_atributos.php b/classesphp/classe_atributos.php index 70d8744..df157aa 100644 --- a/classesphp/classe_atributos.php +++ b/classesphp/classe_atributos.php @@ -199,15 +199,19 @@ $registro - Índice do registro que será consultado. function extensaoRegistro($registro) { if(!$this->layer){return "erro";} + //error_reporting(E_ALL); $this->layer->set("template","none.htm"); $this->layer->setfilter(""); $ext = ""; //procura o registro e pega a extensão geográfica - if($this->v == 6) - {$shape = $this->layer->getShape(new resultObj($registro));} + if($this->v == 6){ + $this->layer->open(); + $shape = $this->layer->getShape(new resultObj($registro)); + } else{ if (@$this->layer->open() == MS_SUCCESS) { + if (@$this->layer->queryByrect($this->mapa->extent) == MS_SUCCESS) { $this->layer->open(); diff --git a/classesphp/classe_legenda.php b/classesphp/classe_legenda.php index 68e1736..47b0445 100644 --- a/classesphp/classe_legenda.php +++ b/classesphp/classe_legenda.php @@ -519,7 +519,7 @@ String no formato HTML com as imagens dos símbolos { $versao = versao(); $versao = $versao["principal"]; - //error_reporting(E_ALL); + error_reporting(E_ALL); if ($tipo == 3){$tipo = 2;} //tipo raster if($imgdir == "") {$dir = $dir_tmp;} @@ -539,7 +539,6 @@ String no formato HTML com as imagens dos símbolos else {$mapatemp = ms_newMapObj($this->localaplicacao."/aplicmap/".$t);} $ins = ""; - $l = $mapatemp->getlayer(0); $novoss = dirname($this->mapa->symbolsetfilename)."\\".basename($mapatemp->symbolsetfilename); $this->mapa->setsymbolset($novoss); diff --git a/classesphp/funcoes_gerais.php b/classesphp/funcoes_gerais.php index 28c8f2a..795ee46 100644 --- a/classesphp/funcoes_gerais.php +++ b/classesphp/funcoes_gerais.php @@ -1208,7 +1208,7 @@ function pegaValoresM($mapa,$layer,$itens,$exclui="nulo",$selecionados="nao",$ch $nclasses = $layer->numclasses; if (@$layer->queryByrect($mapa->extent) == MS_SUCCESS) { - $layer->draw(); + //$layer->draw(); $sopen = $layer->open(); if($sopen == MS_FAILURE){return "erro";} $res_count = $layer->getNumresults(); diff --git a/classesphp/graficos.php b/classesphp/graficos.php index 18eb6f6..3a9db89 100644 --- a/classesphp/graficos.php +++ b/classesphp/graficos.php @@ -375,6 +375,7 @@ function iniciaDadosGrafico($map_file,$tema,$exclui,$itemclasses,$itemvalores,$t { global $interface; //pega os valores + //error_reporting(E_ALL); $map = ms_newMapObj($map_file); if($interface == "googlemaps") { diff --git a/documentacao/manual_de_usuario_do_i3geo.odt b/documentacao/manual_de_usuario_do_i3geo.odt index 7f4ae2c..145f4d6 100644 Binary files a/documentacao/manual_de_usuario_do_i3geo.odt and b/documentacao/manual_de_usuario_do_i3geo.odt differ diff --git a/ferramentas/tabela/relatorio.php b/ferramentas/tabela/relatorio.php index 574c691..e5eab68 100644 --- a/ferramentas/tabela/relatorio.php +++ b/ferramentas/tabela/relatorio.php @@ -145,7 +145,10 @@ if ($itemagruparel == "") $conta = 0; foreach($linhas as $v) { - echo "$v"; + if(is_numeric(trim($v))) + {echo "".number_format($v,2,",",".")."";} + else + {echo "$v";} if ($statrel == "true") { $v = trim($v); @@ -167,12 +170,12 @@ if ($itemagruparel == "") echo ""; echo "soma"; foreach($soma as $s) - echo "$s"; + echo "".number_format($s,2,",",".").""; echo ""; echo ""; echo "média"; foreach($soma as $s) - echo "".($s / $ocorrencias).""; + echo "".number_format(($s / $ocorrencias),2,",",".").""; echo ""; } echo ""; @@ -213,7 +216,10 @@ else $conta = 0; foreach($linhas as $v) { - echo "$v"; + if(is_numeric(trim($v))) + {echo "".number_format($v,2,",",".")."";} + else + {echo "$v";} if ($statrel == "true") { $v = trim($v); @@ -235,12 +241,12 @@ else echo ""; echo "soma"; foreach($soma as $s) - echo "$s"; + echo "".number_format($s,2,",",".").""; echo ""; echo ""; echo "média"; foreach($soma as $s) - echo "".($s / $ocorrencias).""; + echo "".number_format(($s / $ocorrencias),2,",",".").""; echo ""; } echo ""; @@ -249,8 +255,9 @@ else } function calculaarea($geo) { + global $postgis_con; $v = versao(); - if (($v["principal"] != 5) && ($postgis_con == "")) + if (($v["principal"] < 5) && ($postgis_con == "")) {return ("erro. É necessária uma versão maior que 5.0 do Mapserver.");} $g = $geo->towkt(); $shape = ms_shapeObjFromWkt($g); diff --git a/mashups/openlayers.js.php b/mashups/openlayers.js.php index 4c4f7f4..6ec81e2 100644 --- a/mashups/openlayers.js.php +++ b/mashups/openlayers.js.php @@ -44,7 +44,8 @@ i3GEO.editorOL = { ol_mma: new OpenLayers.Layer.WMS( "Base cartográfica", "http://mapas.mma.gov.br/cgi-bin/mapserv?map=/opt/www/html/webservices/baseraster.map&", - {layers:'baseraster',SRS:'EPSG:4291',FORMAT:'image/png'} + {layers:'baseraster',SRS:'EPSG:4291',FORMAT:'image/png'}, + {singleTile:true} ), ol_wms: new OpenLayers.Layer.WMS.Untiled( "OpenLayers WMS", diff --git a/mashups/openlayers.php b/mashups/openlayers.php index 56bb31f..e968484 100644 --- a/mashups/openlayers.php +++ b/mashups/openlayers.php @@ -147,7 +147,7 @@ if($temas != "") $visivel = "false"; if(in_array($tema,$visiveis)) {$visivel = "true";} - $objOpenLayers[] = 'new OpenLayers.Layer.WMS( "'.($layern->getmetadata("tema")).'", "../ogc.php?tema='.$tema.'&",{layers:"'.implode(",",$layers).'",transparent: "true", format: "image/png"},{visibility:'.$visivel.',isBaseLayer:'.$ebase.'})'; + $objOpenLayers[] = 'new OpenLayers.Layer.WMS( "'.($layern->getmetadata("tema")).'", "../ogc.php?tema='.$tema.'&",{layers:"'.implode(",",$layers).'",transparent: "true", format: "image/png"},{singleTile:true,visibility:'.$visivel.',isBaseLayer:'.$ebase.'})'; } else {echo $tema." não foi encontrado.
";} diff --git a/mashups/openlayers_compacto.js b/mashups/openlayers_compacto.js index c89dbe7..56c34eb 100644 --- a/mashups/openlayers_compacto.js +++ b/mashups/openlayers_compacto.js @@ -3056,7 +3056,8 @@ e_wsm: new OpenLayers.Layer.ArcGIS93Rest( ol_mma: new OpenLayers.Layer.WMS( "Base cartográfica", "http://mapas.mma.gov.br/cgi-bin/mapserv?map=/opt/www/html/webservices/baseraster.map&", -{layers:'baseraster',SRS:'EPSG:4291',FORMAT:'image/png'} +{layers:'baseraster',SRS:'EPSG:4291',FORMAT:'image/png'}, +{singleTile:true} ), ol_wms: new OpenLayers.Layer.WMS.Untiled( "OpenLayers WMS", diff --git a/mashups/openlayers_compacto.js.php b/mashups/openlayers_compacto.js.php index ce6438e..3fbc56c 100644 --- a/mashups/openlayers_compacto.js.php +++ b/mashups/openlayers_compacto.js.php @@ -3056,7 +3056,8 @@ e_wsm: new OpenLayers.Layer.ArcGIS93Rest( ol_mma: new OpenLayers.Layer.WMS( "Base cartográfica", "http://mapas.mma.gov.br/cgi-bin/mapserv?map=/opt/www/html/webservices/baseraster.map&", -{layers:'baseraster',SRS:'EPSG:4291',FORMAT:'image/png'} +{layers:'baseraster',SRS:'EPSG:4291',FORMAT:'image/png'}, +{singleTile:true} ), ol_wms: new OpenLayers.Layer.WMS.Untiled( "OpenLayers WMS", diff --git a/ogc.php b/ogc.php index b420615..b833164 100644 --- a/ogc.php +++ b/ogc.php @@ -116,12 +116,13 @@ if(isset($lista) && $lista == "temas") //cria o web service // include("classesphp/funcoes_gerais.php"); -error_reporting(E_ALL); +error_reporting(0); $versao = versao(); $versao = $versao["principal"]; $req = ms_newowsrequestobj(); $tipo = ""; $_GET = array_merge($_GET,$_POST); + if(isset($_GET["sld"]) || isset($_GET["filter"])) {$cache = false;} foreach ($_GET as $k=>$v) diff --git a/symbols/simbolosptv6.sym b/symbols/simbolosptv6.sym index 73333d3..6f9a28a 100644 --- a/symbols/simbolosptv6.sym +++ b/symbols/simbolosptv6.sym @@ -569,7 +569,6 @@ TYPE TRUETYPE FONT "arial" CHARACTER "#" ANTIALIAS TRUE -GAP 10 END diff --git a/temas/grid.map b/temas/grid.map new file mode 100644 index 0000000..27cbebc --- /dev/null +++ b/temas/grid.map @@ -0,0 +1,63 @@ +MAP + FONTSET "c:\ms4w\apache\htdocs\i3geo\symbols\fontes.txt" + SYMBOLSET "c:\ms4w\apache\htdocs\i3geo\symbols\simbolos.sym" + LAYER + METADATA + "ltempoitemimagem" "" + "cache" "SIM" + "CLASSE" "SIM" + "ltempoitemdescricao" "" + "palletestep" "" + "ltempoiteminicio" "" + "permitekmz" "sim" + "ltempoitemtip" "" + "description_template" "" + "ltempoitemtitulo" "" + "ltempoitemlink" "" + "palletefile" "" + "NOMEORIGINAL" "" + "permitedownload" "sim" + "ltempoformatodata" "" + "ltempoitemicone" "" + "download" "SIM" + "permitekml" "sim" + "permiteogc" "" + "convcaracter" "" + "TEMA" "grade de coordenadas" + "identifica" "NAO" + "editorsql" "" + "ltempoitemfim" "" + END + NAME "grid" + STATUS OFF + TYPE LINE +PROJECTION + "init=epsg:4291" +END + CLASS + NAME "Graticule" + COLOR 0 0 0 + LABEL + COLOR 255 0 0 + SIZE 8 + POSITION AUTO + PARTIALS FALSE + BUFFER 5 + OUTLINECOLOR 255 255 255 + END + END + GRID + LABELFORMAT "DDMM" + # LABELFORMAT '%g°' # dec degrees with symbol + MAXARCS 10 + MAXINTERVAL 5 + MAXSUBDIVIDE 2 + # LABELFORMAT '%7.0f m' # nice if a projected SRS used + # MININTERVAL 20000 + # MAXSUBDIVIDE 2 + END + + + END + +END \ No newline at end of file diff --git a/testamapfile.php b/testamapfile.php index 2d15c44..5427c5c 100644 --- a/testamapfile.php +++ b/testamapfile.php @@ -120,6 +120,7 @@ if (isset($map) && $map != "") function verifica($map,$solegenda) { global $tipo,$locaplic,$postgis_mapa,$versao,$base; + $mapUrl = $map; if ($tipo == "mini" && file_exists('temas/miniaturas/'.$map.".mini.png")) { Header("Content-type: image/png"); @@ -190,8 +191,8 @@ function verifica($map,$solegenda) eval($pegarext."(\$mapa);"); } else{ - if(file_exists($tema)) - {$nmapa = ms_newMapObj($tema);} + if(file_exists($mapUrl)) + {$nmapa = ms_newMapObj($mapUrl);} else{ if(@ms_newMapObj($locaplic."/".$tema)) { -- libgit2 0.21.2