Commit 3f91ead87926da835524e7114e7a3acc72dd165d
1 parent
616a2f2d
Exists in
master
and in
7 other branches
Correção na ferramenta de filtro de limites
Showing
2 changed files
with
6 additions
and
6 deletions
Show diff stats
admin/php/classe_metaestat.php
@@ -480,7 +480,7 @@ class Metaestat{ | @@ -480,7 +480,7 @@ class Metaestat{ | ||
480 | //$colunasComGeo[] = "/*SG*/st_setsrid(".$colunageo.",".$dadosgeo["srid"].") as ".$colunageo." /*SG*/"; | 480 | //$colunasComGeo[] = "/*SG*/st_setsrid(".$colunageo.",".$dadosgeo["srid"].") as ".$colunageo." /*SG*/"; |
481 | $colunasComGeo[] = "/*SG*/".$colunageo." as ".$colunageo." /*SG*/"; | 481 | $colunasComGeo[] = "/*SG*/".$colunageo." as ".$colunageo." /*SG*/"; |
482 | $sqlgeo = str_replace("__COLUNASSEMGEO__",implode(",",$colunasComGeo),$sqlgeo); | 482 | $sqlgeo = str_replace("__COLUNASSEMGEO__",implode(",",$colunasComGeo),$sqlgeo); |
483 | - $sqlgeo = $colunageo." from /*SE*/(".$sqlgeo.")/*SE*/ as foo using unique ".$dadosgeo["identificador"]." using srid=".$dadosgeo["srid"]; | 483 | + $sqlgeo = $colunageo." from /*SE*/(".$sqlgeo." /*FR*//*FR*/ )/*SE*/ as foo using unique ".$dadosgeo["identificador"]." using srid=".$dadosgeo["srid"]; |
484 | 484 | ||
485 | //o SQL com os dados contem um filtro ou nao? | 485 | //o SQL com os dados contem um filtro ou nao? |
486 | $contemfiltro = false; | 486 | $contemfiltro = false; |
ferramentas/metaestat/analise.php
@@ -633,9 +633,9 @@ function analise_aplicafiltroregiao($map_file,$codigo_tipo_regiao,$codigo_regiao | @@ -633,9 +633,9 @@ function analise_aplicafiltroregiao($map_file,$codigo_tipo_regiao,$codigo_regiao | ||
633 | foreach($layersm as $l){ | 633 | foreach($layersm as $l){ |
634 | $data = $l->data; | 634 | $data = $l->data; |
635 | //substitui os marcadores definidos na construcao do layer. Veja a classe metaestat | 635 | //substitui os marcadores definidos na construcao do layer. Veja a classe metaestat |
636 | - $s = explode("/*FA*/",$data); | 636 | + $s = explode("/*FR*/",$data); |
637 | if(count($s) > 1){ | 637 | if(count($s) > 1){ |
638 | - $data = $s[0]."/*FA*//*FA*/".$s[2]; | 638 | + $data = $s[0]."/*FR*//*FR*/".$s[2]; |
639 | } | 639 | } |
640 | $l->set("data",$data); | 640 | $l->set("data",$data); |
641 | } | 641 | } |
@@ -645,14 +645,14 @@ function analise_aplicafiltroregiao($map_file,$codigo_tipo_regiao,$codigo_regiao | @@ -645,14 +645,14 @@ function analise_aplicafiltroregiao($map_file,$codigo_tipo_regiao,$codigo_regiao | ||
645 | $regioesfilho = $m->listaHierarquiaRegioes($codigo_tipo_regiao); | 645 | $regioesfilho = $m->listaHierarquiaRegioes($codigo_tipo_regiao); |
646 | foreach($regioesfilho as $r){ | 646 | foreach($regioesfilho as $r){ |
647 | $regiao = $m->listaTipoRegiao($r["codigo_tipo_regiao"]); | 647 | $regiao = $m->listaTipoRegiao($r["codigo_tipo_regiao"]); |
648 | - $filtro = "g.".$r["colunaligacao_regiaopai"]."::text = '$codigo_regiao'"; | 648 | + $filtro = $r["colunaligacao_regiaopai"]."::text = '$codigo_regiao'"; |
649 | $layers = analise_listaLayersRegiao($layersm,$r["codigo_tipo_regiao"]); | 649 | $layers = analise_listaLayersRegiao($layersm,$r["codigo_tipo_regiao"]); |
650 | foreach($layers as $l){ | 650 | foreach($layers as $l){ |
651 | $data = $l->data; | 651 | $data = $l->data; |
652 | //substitui os marcadores definidos na construcao do layer. Veja a classe metaestat | 652 | //substitui os marcadores definidos na construcao do layer. Veja a classe metaestat |
653 | - $s = explode("/*FA*/",$data); | 653 | + $s = explode("/*FR*/",$data); |
654 | if(count($s) > 1){ | 654 | if(count($s) > 1){ |
655 | - $data = $s[0]."/*FA*/ AND ".$filtro." /*FA*/".$s[2]; | 655 | + $data = $s[0]."/*FR*/ AND ".$filtro." /*FR*/".$s[2]; |
656 | } | 656 | } |
657 | $l->set("data",$data); | 657 | $l->set("data",$data); |
658 | } | 658 | } |