Commit 28be4dfbe83bba5d5ccbbb04ebfcfba59b6bf3a4
1 parent
6eba7ce7
Exists in
master
and in
7 other branches
Implantação de criação automática de classes em layers raster por meio de uma pa…
…lete de cores. Foram criados novos metadados para definir o arquivo com a palete e foram feitas alterações na função autoclasses.
Showing
7 changed files
with
195 additions
and
84 deletions
Show diff stats
admin/js/editormapfile.js
| ... | ... | @@ -782,6 +782,10 @@ function montaEditorMetadados(dados) |
| 782 | 782 | titulo:"Download",id:"",value:dados.download,tipo:"text",div:"<div id=cDownload ></div>"}, |
| 783 | 783 | {ajuda:"Endereço de um arquivo para download dos dados (caminho completo no servidor). Se definido, o sistema irá usar esse arquivo ao invés de gerar os dados, quando o usuário clicar nas opções de download. Se não for definido, o arquivo de download é gerado diretamente do original, convertendo do banco ou copiando o arquivo definido em DATA.", |
| 784 | 784 | titulo:"Arquivo download",id:"arquivodownload",value:dados.arquivodownload,tipo:"text"}, |
| 785 | + {ajuda:"A palete é válida apenas para temas RASTER. Entre com o endereço do arquivo no servidor. Veja exemplo em i3geo/localhost/symbols/testepalete.txt", | |
| 786 | + titulo:"Arquivo com palete de cores (opcional e serve apenas para temas raster)",id:"palletefile",value:dados.palletefile,tipo:"text"}, | |
| 787 | + {ajuda:"Quantas cores em cada nível da palete. Veja exemplo em i3geo/localhost/symbols/testepalete.txt", | |
| 788 | + titulo:"Passo (opcional e serve apenas para temas raster)",id:"palletestep",value:dados.palletestep,tipo:"text"}, | |
| 785 | 789 | {ajuda:"Indica se as classes serão mostradas ou não na legenda. Por padrão é SIM.", |
| 786 | 790 | titulo:"Classe",id:"",value:dados.classe,tipo:"text",div:"<div id=cClasse ></div>"}, |
| 787 | 791 | {ajuda:"Indica se o tema é mostrado no mapa mas não nas listas da legenda e na guia 'temas'", |
| ... | ... | @@ -1142,7 +1146,7 @@ function salvarDadosEditor(tipo,codigoMap,codigoLayer,indiceClasse,indiceEstilo, |
| 1142 | 1146 | {alert("Valor de escala incorreto");return;} |
| 1143 | 1147 | } |
| 1144 | 1148 | |
| 1145 | - var campos = new Array("arquivodownload","aplicaextensao","classestamanho","classessimbolo","classescor","classesnome","classesitem","mensagem","identifica","extensao","escondido","download","escala","tema","classe","tip","itenslink","itens","itensdesc") | |
| 1149 | + var campos = new Array("palletefile","palettestep","arquivodownload","aplicaextensao","classestamanho","classessimbolo","classescor","classesnome","classesitem","mensagem","identifica","extensao","escondido","download","escala","tema","classe","tip","itenslink","itens","itensdesc") | |
| 1146 | 1150 | var par = "&codigoMap="+codigoMap+"&codigoLayer="+codigoLayer |
| 1147 | 1151 | var prog = "../php/editormapfile.php?funcao=alterarMetadados" |
| 1148 | 1152 | } | ... | ... |
admin/php/editormapfile.php
| ... | ... | @@ -529,6 +529,8 @@ function pegaMetadados() |
| 529 | 529 | $dados["classestamanho"] = $layer->getmetadata("classestamanho"); |
| 530 | 530 | $dados["aplicaextensao"] = $layer->getmetadata("aplicaextensao"); |
| 531 | 531 | $dados["arquivodownload"] = $layer->getmetadata("arquivodownload"); |
| 532 | + $dados["palletefile"] = $layer->getmetadata("palletefile"); | |
| 533 | + $dados["palletestep"] = $layer->getmetadata("palletestep"); | |
| 532 | 534 | $dados["codigoMap"] = $codigoMap; |
| 533 | 535 | $dados["codigoLayer"] = $codigoLayer; |
| 534 | 536 | $dados["colunas"] = implode(" ,",pegaItens($layer)); |
| ... | ... | @@ -536,7 +538,7 @@ function pegaMetadados() |
| 536 | 538 | } |
| 537 | 539 | function alterarMetadados() |
| 538 | 540 | { |
| 539 | - global $arquivodownload,$codigoMap,$codigoLayer,$locaplic,$aplicaextensao,$classestamanho,$classessimbolo,$classescor,$classesnome,$classesitem,$mensagem,$identifica,$extensao,$escondido,$download,$escala,$tema,$classe,$tip,$itenslink,$itens,$itensdesc; | |
| 541 | + global $palletestep,$palletefile,$arquivodownload,$codigoMap,$codigoLayer,$locaplic,$aplicaextensao,$classestamanho,$classessimbolo,$classescor,$classesnome,$classesitem,$mensagem,$identifica,$extensao,$escondido,$download,$escala,$tema,$classe,$tip,$itenslink,$itens,$itensdesc; | |
| 540 | 542 | $dados = array(); |
| 541 | 543 | $mapfile = $locaplic."/temas/".$codigoMap.".map"; |
| 542 | 544 | $mapa = ms_newMapObj($mapfile); |
| ... | ... | @@ -560,6 +562,8 @@ function alterarMetadados() |
| 560 | 562 | $layer->setmetadata("classestamanho",$classestamanho); |
| 561 | 563 | $layer->setmetadata("aplicaextensao",$aplicaextensao); |
| 562 | 564 | $layer->setmetadata("arquivodownload",$arquivodownload); |
| 565 | + $layer->setmetadata("palletefile",$palletefile); | |
| 566 | + $layer->setmetadata("palletestep",$palletestep); | |
| 563 | 567 | $mapa->save($mapfile); |
| 564 | 568 | removeCabecalho($mapfile); |
| 565 | 569 | return "ok"; | ... | ... |
classesphp/funcoes_gerais.php
| ... | ... | @@ -1972,102 +1972,164 @@ function autoClasses(&$nlayer,$mapa) |
| 1972 | 1972 | $nlayer->set("connection",$postgis_mapa); |
| 1973 | 1973 | $substituicon = "sim"; |
| 1974 | 1974 | } |
| 1975 | - } | |
| 1976 | - if($nlayer->getmetadata("classesitem") == "") | |
| 1977 | - {return;} | |
| 1978 | - $itemnome = $nlayer->getmetadata("classesnome"); | |
| 1979 | - $itemid = $nlayer->getmetadata("classesitem"); | |
| 1980 | - $itemcor = $nlayer->getmetadata("classescor"); | |
| 1981 | - $itemsimbolo = $nlayer->getmetadata("classesimbolo"); | |
| 1982 | - $itemtamanho = $nlayer->getmetadata("classestamanho"); | |
| 1983 | - $classeoriginal = $nlayer->getclass(0); | |
| 1984 | - // | |
| 1985 | - //pega a extensao geografica que devera ser utilizada | |
| 1975 | + } | |
| 1986 | 1976 | // |
| 1987 | - $prjMapa = $mapa->getProjection(); | |
| 1988 | - $prjTema = $nlayer->getProjection(); | |
| 1989 | - $ret = $nlayer->getmetadata("extensao"); | |
| 1990 | - if ($ret == "") | |
| 1977 | + //gera classes automaticamente (temas vetoriais) | |
| 1978 | + if($nlayer->getmetadata("classesitem") != "") | |
| 1991 | 1979 | { |
| 1992 | - $ret = $nlayer->getextent(); | |
| 1993 | - //reprojeta o retangulo | |
| 1994 | - if (($prjTema != "") && ($prjMapa != $prjTema)) | |
| 1980 | + $itemnome = $nlayer->getmetadata("classesnome"); | |
| 1981 | + $itemid = $nlayer->getmetadata("classesitem"); | |
| 1982 | + $itemcor = $nlayer->getmetadata("classescor"); | |
| 1983 | + $itemsimbolo = $nlayer->getmetadata("classesimbolo"); | |
| 1984 | + $itemtamanho = $nlayer->getmetadata("classestamanho"); | |
| 1985 | + $classeoriginal = $nlayer->getclass(0); | |
| 1986 | + // | |
| 1987 | + //pega a extensao geografica que devera ser utilizada | |
| 1988 | + // | |
| 1989 | + $prjMapa = $mapa->getProjection(); | |
| 1990 | + $prjTema = $nlayer->getProjection(); | |
| 1991 | + $ret = $nlayer->getmetadata("extensao"); | |
| 1992 | + if ($ret == "") | |
| 1993 | + { | |
| 1994 | + $ret = $nlayer->getextent(); | |
| 1995 | + //reprojeta o retangulo | |
| 1996 | + if (($prjTema != "") && ($prjMapa != $prjTema)) | |
| 1997 | + { | |
| 1998 | + $projInObj = ms_newprojectionobj($prjTema); | |
| 1999 | + $projOutObj = ms_newprojectionobj($prjMapa); | |
| 2000 | + $ret->project($projInObj, $projOutObj); | |
| 2001 | + } | |
| 2002 | + } | |
| 2003 | + else | |
| 1995 | 2004 | { |
| 1996 | - $projInObj = ms_newprojectionobj($prjTema); | |
| 1997 | - $projOutObj = ms_newprojectionobj($prjMapa); | |
| 1998 | - $ret->project($projInObj, $projOutObj); | |
| 2005 | + $temp = explode(" ",$ret); | |
| 2006 | + $ret = ms_newRectObj(); | |
| 2007 | + $ret->setextent($temp[0],$temp[1],$temp[2],$temp[3]); | |
| 2008 | + } | |
| 2009 | + // | |
| 2010 | + $sopen = $nlayer->open(); | |
| 2011 | + if($sopen == MS_FAILURE){return "erro";} | |
| 2012 | + | |
| 2013 | + $status = $nlayer->whichShapes($ret); | |
| 2014 | + $parametrosClasses = array(); | |
| 2015 | + if ($status == 0) | |
| 2016 | + { | |
| 2017 | + while ($shape = $nlayer->nextShape()) | |
| 2018 | + { | |
| 2019 | + $id = trim($shape->values[$itemid]); | |
| 2020 | + if (!$parametrosClasses[$id]) | |
| 2021 | + { | |
| 2022 | + $nome = ""; | |
| 2023 | + if($itemnome != "") | |
| 2024 | + $nome = trim($shape->values[$itemnome]); | |
| 2025 | + $cor = ""; | |
| 2026 | + if($itemcor != "") | |
| 2027 | + $cor = explode(",",trim($shape->values[$itemcor])); | |
| 2028 | + if(count($cor) != 3) | |
| 2029 | + $cor = explode(" ",trim($shape->values[$itemcor])); | |
| 2030 | + $tamanho = ""; | |
| 2031 | + if($itemtamanho != "") | |
| 2032 | + $tamanho = trim($shape->values[$itemtamanho]); | |
| 2033 | + $simbolo = ""; | |
| 2034 | + if($itemsimbolo != "") | |
| 2035 | + $simbolo = trim($shape->values[$itemsimbolo]); | |
| 2036 | + $parametrosClasses[$id] = array("nome"=>$nome,"cor"=>$cor,"tamanho"=>$tamanho,"simbolo"=>$simbolo); | |
| 2037 | + } | |
| 2038 | + } | |
| 2039 | + $fechou = $nlayer->close(); | |
| 2040 | + //echo "<pre>";var_dump($parametrosClasses); | |
| 2041 | + if (count($parametrosClasses) > 0) | |
| 2042 | + { | |
| 2043 | + $ids = array_keys($parametrosClasses); | |
| 2044 | + for($i=0;$i < count($parametrosClasses);++$i) | |
| 2045 | + { | |
| 2046 | + $p = $parametrosClasses[$ids[$i]]; | |
| 2047 | + //echo "<pre>";var_dump($p); | |
| 2048 | + $nclasse = ms_newClassObj($nlayer,$classeoriginal); | |
| 2049 | + if($p["nome"] != "") | |
| 2050 | + $nclasse->set("name",$p["nome"]); | |
| 2051 | + $estilo = $nclasse->getstyle(0); | |
| 2052 | + if($p["cor"] != "") | |
| 2053 | + { | |
| 2054 | + $cor = $p["cor"]; | |
| 2055 | + $ncor = $estilo->color; | |
| 2056 | + if($ncor == "") | |
| 2057 | + $ncor = $estilo->outlinecolor; | |
| 2058 | + $ncor->setrgb($cor[0],$cor[1],$cor[2]); | |
| 2059 | + } | |
| 2060 | + if($p["tamanho"] != "") | |
| 2061 | + $estilo->set("size",$p["tamanho"]); | |
| 2062 | + if($p["simbolo"] != "") | |
| 2063 | + $estilo->set("symbolname",$p["simbolo"]); | |
| 2064 | + $strE = "('[".$itemid."]'eq'".$ids[$i]."')"; | |
| 2065 | + $nclasse->setexpression($strE); | |
| 2066 | + } | |
| 2067 | + $classeoriginal->set("status",MS_DELETE); | |
| 2068 | + } | |
| 1999 | 2069 | } |
| 2070 | + if($substituicon == "sim"){$nlayer->set("connection"," ");} | |
| 2000 | 2071 | } |
| 2001 | - else | |
| 2072 | + $pf = $nlayer->getmetadata("palletefile"); | |
| 2073 | + if($pf != "") | |
| 2002 | 2074 | { |
| 2003 | - $temp = explode(" ",$ret); | |
| 2004 | - $ret = ms_newRectObj(); | |
| 2005 | - $ret->setextent($temp[0],$temp[1],$temp[2],$temp[3]); | |
| 2006 | - } | |
| 2007 | - // | |
| 2008 | - $sopen = $nlayer->open(); | |
| 2009 | - if($sopen == MS_FAILURE){return "erro";} | |
| 2010 | - | |
| 2011 | - $status = $nlayer->whichShapes($ret); | |
| 2012 | - $parametrosClasses = array(); | |
| 2013 | - if ($status == 0) | |
| 2014 | - { | |
| 2015 | - while ($shape = $nlayer->nextShape()) | |
| 2075 | + if(!file_exists($pf)){return;} | |
| 2076 | + $ps = $nlayer->getmetadata("palletesteps"); | |
| 2077 | + if ($ps == "") $ps=8; | |
| 2078 | + // | |
| 2079 | + //pega os valores do arquivo | |
| 2080 | + // | |
| 2081 | + $rules = array(); | |
| 2082 | + $abre = fopen($pf, "r"); | |
| 2083 | + $paletteRules = array(); | |
| 2084 | + while (!feof($abre)) | |
| 2016 | 2085 | { |
| 2017 | - $id = trim($shape->values[$itemid]); | |
| 2018 | - if (!$parametrosClasses[$id]) | |
| 2086 | + $line = trim(fgets($abre)); | |
| 2087 | + $pos = strpos($line, "#"); | |
| 2088 | + if ($pos === false || $pos > 0) | |
| 2019 | 2089 | { |
| 2020 | - $nome = ""; | |
| 2021 | - if($itemnome != "") | |
| 2022 | - $nome = trim($shape->values[$itemnome]); | |
| 2023 | - $cor = ""; | |
| 2024 | - if($itemcor != "") | |
| 2025 | - $cor = explode(",",trim($shape->values[$itemcor])); | |
| 2026 | - if(count($cor) != 3) | |
| 2027 | - $cor = explode(" ",trim($shape->values[$itemcor])); | |
| 2028 | - $tamanho = ""; | |
| 2029 | - if($itemtamanho != "") | |
| 2030 | - $tamanho = trim($shape->values[$itemtamanho]); | |
| 2031 | - $simbolo = ""; | |
| 2032 | - if($itemsimbolo != "") | |
| 2033 | - $simbolo = trim($shape->values[$itemsimbolo]); | |
| 2034 | - $parametrosClasses[$id] = array("nome"=>$nome,"cor"=>$cor,"tamanho"=>$tamanho,"simbolo"=>$simbolo); | |
| 2090 | + $paletteEntry = explode(" ",$line); | |
| 2091 | + $rules[] = array( | |
| 2092 | + "v0" => $paletteEntry[0], | |
| 2093 | + "v1" => $paletteEntry[1], | |
| 2094 | + "r0" => $paletteEntry[2], | |
| 2095 | + "g0" => $paletteEntry[3], | |
| 2096 | + "b0" => $paletteEntry[4], | |
| 2097 | + "r1" => $paletteEntry[5], | |
| 2098 | + "g1" => $paletteEntry[6], | |
| 2099 | + "b1" => $paletteEntry[7] | |
| 2100 | + ); | |
| 2035 | 2101 | } |
| 2036 | 2102 | } |
| 2037 | - $fechou = $nlayer->close(); | |
| 2038 | - //echo "<pre>";var_dump($parametrosClasses); | |
| 2039 | - if (count($parametrosClasses) > 0) | |
| 2103 | + fclose($abre); | |
| 2104 | + foreach($rules as $rule) | |
| 2040 | 2105 | { |
| 2041 | - $ids = array_keys($parametrosClasses); | |
| 2042 | - for($i=0;$i < count($parametrosClasses);++$i) | |
| 2106 | + $delta = ceil(($rule["v1"]-$rule["v0"])/$ps); | |
| 2107 | + $legenda=true; | |
| 2108 | + for($value=$rule["v0"]; $value<$rule["v1"]; $value+=$delta) | |
| 2043 | 2109 | { |
| 2044 | - $p = $parametrosClasses[$ids[$i]]; | |
| 2045 | - //echo "<pre>";var_dump($p); | |
| 2046 | - $nclasse = ms_newClassObj($nlayer,$classeoriginal); | |
| 2047 | - if($p["nome"] != "") | |
| 2048 | - $nclasse->set("name",$p["nome"]); | |
| 2049 | - $estilo = $nclasse->getstyle(0); | |
| 2050 | - if($p["cor"] != "") | |
| 2110 | + $class = ms_newClassObj($nlayer); | |
| 2111 | + $style = ms_newStyleObj($class); | |
| 2112 | + if ($legenda) | |
| 2051 | 2113 | { |
| 2052 | - $cor = $p["cor"]; | |
| 2053 | - $ncor = $estilo->color; | |
| 2054 | - if($ncor == "") | |
| 2055 | - $ncor = $estilo->outlinecolor; | |
| 2056 | - $ncor->setrgb($cor[0],$cor[1],$cor[2]); | |
| 2114 | + $class->set(name,round($value,0)); | |
| 2115 | + $legenda=true; | |
| 2057 | 2116 | } |
| 2058 | - if($p["tamanho"] != "") | |
| 2059 | - $estilo->set("size",$p["tamanho"]); | |
| 2060 | - if($p["simbolo"] != "") | |
| 2061 | - $estilo->set("symbolname",$p["simbolo"]); | |
| 2062 | - $strE = "('[".$itemid."]'eq'".$ids[$i]."')"; | |
| 2063 | - $nclasse->setexpression($strE); | |
| 2117 | + $expression="([pixel] > ".round($value,0)." AND [pixel] <= ".round($value+$delta,0).")"; | |
| 2118 | + $class->setExpression($expression); | |
| 2119 | + $rgb=getRGBpallete($rule,$value); | |
| 2120 | + $style->color->setRGB($rgb[0],$rgb[1],$rgb[2]); | |
| 2064 | 2121 | } |
| 2065 | - $classeoriginal->set("status",MS_DELETE); | |
| 2066 | - } | |
| 2122 | + } | |
| 2067 | 2123 | } |
| 2068 | - if($substituicon == "sim"){$nlayer->set("connection"," ");} | |
| 2069 | 2124 | return; |
| 2070 | 2125 | } |
| 2126 | +function getRGBpallete($rule, $value){ | |
| 2127 | + $escala=($value-$rule["v0"])/($rule["v1"]-$rule["v0"]); | |
| 2128 | + $r=$rule["r0"] + round(($rule["r1"]-$rule["r0"])*$escala, 0); | |
| 2129 | + $g=$rule["g0"] + round(($rule["g1"]-$rule["g0"])*$escala, 0); | |
| 2130 | + $b=$rule["b0"] + round(($rule["b1"]-$rule["b0"])*$escala, 0); | |
| 2131 | + return array($r,$g,$b); | |
| 2132 | +} | |
| 2071 | 2133 | /* |
| 2072 | 2134 | Function: removeAcentos |
| 2073 | 2135 | ... | ... |
menutemas/admin.db
No preview for this file type
| ... | ... | @@ -0,0 +1,13 @@ |
| 1 | +# | |
| 2 | +#utilize o formato | |
| 3 | +#Z1 Z2 R1 G1 B1 R2 G2 B2 | |
| 4 | +# | |
| 5 | +-3000 -400 150 0 255 0 0 255 | |
| 6 | +-400 -100 0 0 255 0 100 255 | |
| 7 | +-100 0 0 100 255 0 255 255 | |
| 8 | +0 1 0 255 255 0 150 0 | |
| 9 | +10 3 0 150 0 0 255 0 | |
| 10 | +3 5 0 255 0 255 255 0 | |
| 11 | +5 8 255 255 0 255 120 0 | |
| 12 | +8 14 255 120 0 255 0 0 | |
| 13 | +14 26 255 0 0 60 30 0 | |
| 0 | 14 | \ No newline at end of file | ... | ... |
| ... | ... | @@ -0,0 +1,19 @@ |
| 1 | +MAP | |
| 2 | +SYMBOLSET ../symbols/simbolos.sym | |
| 3 | +FONTSET "../symbols/fontes.txt" | |
| 4 | +LAYER | |
| 5 | + DATA "c://ms4w/Apache/htdocs/geodados/cinza.png" | |
| 6 | + METADATA | |
| 7 | + "DOWNLOAD" "sim" | |
| 8 | + "tema" "teste palete" | |
| 9 | + "extensao" "-45.3164908803 -18.728115624 -36.4701672412 -13.692240792" | |
| 10 | + "palletefile" "c://ms4w/Apache/htdocs/i3geo/symbols/testepalete.txt" | |
| 11 | + "palletestep" "20" | |
| 12 | + END | |
| 13 | + NAME "cinza" | |
| 14 | + STATUS DEFAULT | |
| 15 | + TEMPLATE "none.htm" | |
| 16 | + TYPE RASTER | |
| 17 | + UNITS METERS | |
| 18 | + END | |
| 19 | +END | |
| 0 | 20 | \ No newline at end of file | ... | ... |
testamapfile.php
| ... | ... | @@ -232,6 +232,7 @@ function verifica($map) |
| 232 | 232 | $sca->set("status",MS_OFF); |
| 233 | 233 | } |
| 234 | 234 | $objImagem = @$mapa->draw(); |
| 235 | + $objImagemLegenda = @$mapa->drawLegend(); | |
| 235 | 236 | if (!$objImagem) |
| 236 | 237 | { |
| 237 | 238 | echo "Problemas ao gerar o mapa<br>"; |
| ... | ... | @@ -247,9 +248,16 @@ function verifica($map) |
| 247 | 248 | $nomec = ($objImagem->imagepath).nomeRandomico()."teste.png"; |
| 248 | 249 | $objImagem->saveImage($nomec); |
| 249 | 250 | $nomer = ($objImagem->imageurl).basename($nomec); |
| 251 | + | |
| 252 | + $nomel = ($objImagemLegenda->imagepath).nomeRandomico()."testel.png"; | |
| 253 | + $objImagemLegenda->saveImage($nomel); | |
| 254 | + $nomerl = ($objImagemLegenda->imageurl).basename($nomel); | |
| 255 | + | |
| 256 | + | |
| 250 | 257 | if(($tipo == "") || ($tipo == "todos")) |
| 251 | 258 | { |
| 252 | - echo "<img src=".$nomer." />"; | |
| 259 | + echo "<img src=".$nomer." /><br>"; | |
| 260 | + echo "<img src=".$nomerl." />"; | |
| 253 | 261 | if($tipo == "todos") |
| 254 | 262 | { |
| 255 | 263 | echo "<br>".$dados."<br>"; |
| ... | ... | @@ -264,7 +272,8 @@ function verifica($map) |
| 264 | 272 | echo "<br>Error in %s: %s<br>", $error->routine, $error->message; |
| 265 | 273 | $error = $error->next(); |
| 266 | 274 | } |
| 267 | - } | |
| 275 | + } | |
| 276 | + | |
| 268 | 277 | } |
| 269 | 278 | else |
| 270 | 279 | { |
| ... | ... | @@ -277,12 +286,12 @@ function verifica($map) |
| 277 | 286 | function zoomTema($nomelayer,&$mapa) |
| 278 | 287 | { |
| 279 | 288 | $layer = $mapa->getlayerbyname($nomelayer); |
| 280 | - if($layer->type > 2) | |
| 281 | - {return;} | |
| 282 | 289 | $prjMapa = $mapa->getProjection(); |
| 283 | 290 | $prjTema = $layer->getProjection(); |
| 284 | 291 | $extatual = $mapa->extent; |
| 285 | 292 | $ret = $layer->getmetadata("extensao"); |
| 293 | + if($layer->type > 2 && $ret == "") | |
| 294 | + {return;} | |
| 286 | 295 | $ct = $layer->connectiontype; |
| 287 | 296 | if(($ret == "") && ($ct != 1)) |
| 288 | 297 | {return;} | ... | ... |