From 2347fea54f97483dd99518efed0be4733f9bf598 Mon Sep 17 00:00:00 2001 From: Edmar Moretti Date: Wed, 11 Nov 2009 02:17:38 +0000 Subject: [PATCH] #258 --- classesphp/classe_shp.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/classesphp/classe_shp.php b/classesphp/classe_shp.php index 3d6af2c..56c5215 100644 --- a/classesphp/classe_shp.php +++ b/classesphp/classe_shp.php @@ -305,7 +305,16 @@ string - xy if(!$this->layer){return "erro";} $sopen = $this->layer->open(); if($sopen == MS_FAILURE){return "erro";} - $this->layer->whichShapes($this->mapa->extent); + $prjMapa = $this->mapa->getProjection(); + $prjTema = $this->layer->getProjection(); + $ret = $this->mapa->extent; + if (($prjTema != "") && ($prjMapa != $prjTema)) + { + $projOutObj = ms_newprojectionobj($prjTema); + $projInObj = ms_newprojectionobj($prjMapa); + $ret->project($projInObj, $projOutObj); + } + $this->layer->whichShapes($ret); $xy = array(); while ($shape = $this->layer->nextShape()) { -- libgit2 0.21.2