Commit 3b5d04204974aa693e3e094deb0869a963a9986f
1 parent
35514fbc
Exists in
master
and in
7 other branches
incluida rotina de projeção de pontos na análise de distribuição
Showing
1 changed file
with
8 additions
and
0 deletions
Show diff stats
classesphp/classe_analise.php
... | ... | @@ -130,6 +130,8 @@ Include: |
130 | 130 | */ |
131 | 131 | function analiseDistriPt($locaplic,$dir_tmp,$R_path,$numclasses,$tipo,$cori,$corf,$tmpurl,$sigma="",$limitepontos="TRUE") |
132 | 132 | { |
133 | + $prjMapa = $this->mapa->getProjection(); | |
134 | + $prjTema = $this->layer->getProjection(); | |
133 | 135 | $layerPt = $this->layer; |
134 | 136 | $layerPt->set("tolerance",0); |
135 | 137 | $layerPt->set("template","none.htm"); |
... | ... | @@ -146,6 +148,8 @@ Include: |
146 | 148 | $pontos = array(); |
147 | 149 | //pega um shape especifico |
148 | 150 | $layerPt->open(); |
151 | + $projInObj = ms_newprojectionobj($prjTema); | |
152 | + $projOutObj = ms_newprojectionobj($prjMapa); | |
149 | 153 | for ($i = 0; $i < $res_count; $i++) |
150 | 154 | { |
151 | 155 | $result = $layerPt->getResult($i); |
... | ... | @@ -153,6 +157,10 @@ Include: |
153 | 157 | $shape = $layerPt->getshape(-1, $shp_index); |
154 | 158 | $lineo = $shape->line(0); |
155 | 159 | $pt = $lineo->point(0); |
160 | + if (($prjTema != "") && ($prjMapa != $prjTema)) | |
161 | + { | |
162 | + $pt->project($projInObj, $projOutObj); | |
163 | + } | |
156 | 164 | $pontos[] = $pt->x." ".$pt->y."\n"; |
157 | 165 | $pontosx[] = $pt->x; |
158 | 166 | $pontosy[] = $pt->y; | ... | ... |