Commit e7be908cad3b4e79ff4eaca65b79297b282c8cd8
1 parent
aaf8797e
Exists in
master
and in
7 other branches
Corrigida função de retorno da extensão geográfica de um registro quando o mesmo for um ponto
Showing
1 changed file
with
8 additions
and
4 deletions
Show diff stats
classesphp/classe_atributos.php
| @@ -116,13 +116,17 @@ xmin ymin xmax ymax separados por espaço. | @@ -116,13 +116,17 @@ xmin ymin xmax ymax separados por espaço. | ||
| 116 | $ret->project($projInObj, $projOutObj); | 116 | $ret->project($projInObj, $projOutObj); |
| 117 | } | 117 | } |
| 118 | $ext = $ret->minx." ".$ret->miny." ".$ret->maxx." ".$ret->maxy; | 118 | $ext = $ret->minx." ".$ret->miny." ".$ret->maxx." ".$ret->maxy; |
| 119 | - if ($shape->type == MS_SHP_POINT) | 119 | + if (($shape->type == MS_SHP_POINT) || ($shape->type == 0)) |
| 120 | { | 120 | { |
| 121 | $minx = $ret->minx; | 121 | $minx = $ret->minx; |
| 122 | - $minx = $minx - 0.01; | 122 | + $minx = $minx - 0.03; |
| 123 | $maxx = $ret->maxx; | 123 | $maxx = $ret->maxx; |
| 124 | - $maxx = $maxx + 0.01; | ||
| 125 | - $ext = $minx." ".$ret->miny." ".$maxx." ".$ret->maxy; | 124 | + $maxx = $maxx + 0.03; |
| 125 | + $miny = $ret->miny; | ||
| 126 | + $miny = $miny - 0.03; | ||
| 127 | + $maxy = $ret->maxy; | ||
| 128 | + $maxy = $maxy + 0.03; | ||
| 129 | + $ext = $minx." ".$miny." ".$maxx." ".$maxy; | ||
| 126 | } | 130 | } |
| 127 | return $ext; | 131 | return $ext; |
| 128 | } | 132 | } |