Commit bd37511852903c6b97f8543b05d6da5ec357a7ba
1 parent
7702d538
Exists in
master
and in
7 other branches
Correção na obtenção de dados da tabela de atributos em camadas com projeção dif…
…erente do mapa (função de busca)
Showing
2 changed files
with
14 additions
and
3 deletions
Show diff stats
admin/admin.db
No preview for this file type
classesphp/classe_atributos.php
| @@ -488,8 +488,16 @@ $onde - Tipo de abrangência espacial (brasil ou mapa) | @@ -488,8 +488,16 @@ $onde - Tipo de abrangência espacial (brasil ou mapa) | ||
| 488 | $buscas = $buscas.$buscaUTF; | 488 | $buscas = $buscas.$buscaUTF; |
| 489 | $sopen = $l->open(); | 489 | $sopen = $l->open(); |
| 490 | if($sopen == MS_FAILURE){return "erro";} | 490 | if($sopen == MS_FAILURE){return "erro";} |
| 491 | - | ||
| 492 | - $l->whichShapes($this->mapa->extent); | 491 | + $prjMapa = $this->mapa->getProjection(); |
| 492 | + $prjTema = $l->getProjection(); | ||
| 493 | + $ret = $this->mapa->extent; | ||
| 494 | + if (($prjTema != "") && ($prjMapa != $prjTema)) | ||
| 495 | + { | ||
| 496 | + $projInObj = ms_newprojectionobj($prjTema); | ||
| 497 | + $projOutObj = ms_newprojectionobj($prjMapa); | ||
| 498 | + $ret->project($projInObj, $projOutObj); | ||
| 499 | + } | ||
| 500 | + $l->whichShapes($ret); | ||
| 493 | $fr = array(); | 501 | $fr = array(); |
| 494 | while ($shape = $l->nextShape()) | 502 | while ($shape = $l->nextShape()) |
| 495 | { | 503 | { |
| @@ -521,7 +529,10 @@ $onde - Tipo de abrangência espacial (brasil ou mapa) | @@ -521,7 +529,10 @@ $onde - Tipo de abrangência espacial (brasil ou mapa) | ||
| 521 | } | 529 | } |
| 522 | if ($encontrado == "sim") | 530 | if ($encontrado == "sim") |
| 523 | { | 531 | { |
| 524 | - $novoreg["box"] = $this->extensaoShape($shape,$l); | 532 | + $ret = $this->extensaoShape($shape,$l); |
| 533 | + if (($prjTema != "") && ($prjMapa != $prjTema)) | ||
| 534 | + {$ret->project($projInObj, $projOutObj);} | ||
| 535 | + $novoreg["box"] = $ret; | ||
| 525 | $novoreg["valores"] = $r; | 536 | $novoreg["valores"] = $r; |
| 526 | $encontrado = "nao"; | 537 | $encontrado = "nao"; |
| 527 | $fr[] = $novoreg; | 538 | $fr[] = $novoreg; |