From 3b5d04204974aa693e3e094deb0869a963a9986f Mon Sep 17 00:00:00 2001 From: Edmar Moretti Date: Fri, 7 Dec 2007 23:28:16 +0000 Subject: [PATCH] incluida rotina de projeção de pontos na análise de distribuição --- classesphp/classe_analise.php | 8 ++++++++ 1 file changed, 8 insertions(+), 0 deletions(-) diff --git a/classesphp/classe_analise.php b/classesphp/classe_analise.php index d6b151c..de101f8 100644 --- a/classesphp/classe_analise.php +++ b/classesphp/classe_analise.php @@ -130,6 +130,8 @@ Include: */ function analiseDistriPt($locaplic,$dir_tmp,$R_path,$numclasses,$tipo,$cori,$corf,$tmpurl,$sigma="",$limitepontos="TRUE") { + $prjMapa = $this->mapa->getProjection(); + $prjTema = $this->layer->getProjection(); $layerPt = $this->layer; $layerPt->set("tolerance",0); $layerPt->set("template","none.htm"); @@ -146,6 +148,8 @@ Include: $pontos = array(); //pega um shape especifico $layerPt->open(); + $projInObj = ms_newprojectionobj($prjTema); + $projOutObj = ms_newprojectionobj($prjMapa); for ($i = 0; $i < $res_count; $i++) { $result = $layerPt->getResult($i); @@ -153,6 +157,10 @@ Include: $shape = $layerPt->getshape(-1, $shp_index); $lineo = $shape->line(0); $pt = $lineo->point(0); + if (($prjTema != "") && ($prjMapa != $prjTema)) + { + $pt->project($projInObj, $projOutObj); + } $pontos[] = $pt->x." ".$pt->y."\n"; $pontosx[] = $pt->x; $pontosy[] = $pt->y; -- libgit2 0.21.2