Commit ed464a2e6854c890994c7da3e0be6c9ac6a41c9e
1 parent
f3e27dd1
Exists in
master
and in
7 other branches
Correção na conversão gvp->mapfile nos casos onde existe a classe com.iver.cit.g…
…vsig.fmap.rendering.ZSort
Showing
1 changed file
with
29 additions
and
19 deletions
Show diff stats
pacotes/gvsig/gvsig2mapfile/class.gvsig2mapfile.php
... | ... | @@ -116,6 +116,7 @@ class gvsig2mapfile{ |
116 | 116 | $valores = (string) $this->getValue($path."/tag:xml-tag","values"); |
117 | 117 | $tipocoluna = (string) $this->getValue($path."/tag:xml-tag","fieldTypes"); |
118 | 118 | $nomes = (string) $this->getValue($path."/tag:xml-tag","keys"); |
119 | + | |
119 | 120 | $classes = $this->VectorialUniqueValueLegend($result,$path1,$coluna,$tipocoluna,$valores,$nomes); |
120 | 121 | } |
121 | 122 | |
... | ... | @@ -123,6 +124,7 @@ class gvsig2mapfile{ |
123 | 124 | $result = $this->xml->xpath($path1); |
124 | 125 | if($result != FALSE) |
125 | 126 | {$classes = $this->SingleSymbolLegend($result,$path1);} |
127 | + | |
126 | 128 | // |
127 | 129 | //obtem a conexão |
128 | 130 | //a senha não pode ser obtida, então, é usado o mesmo nome de usuário em seu lugar. No i3Geo deve-se prever isso na variável de substituição de string. |
... | ... | @@ -167,6 +169,7 @@ class gvsig2mapfile{ |
167 | 169 | $nomes = explode(",",$nomes); |
168 | 170 | $classes = array(); |
169 | 171 | $c = 0; |
172 | + | |
170 | 173 | while(list( , $node) = each($result)) { |
171 | 174 | $classe = array(); |
172 | 175 | if($tipocoluna == 12) |
... | ... | @@ -194,35 +197,40 @@ class gvsig2mapfile{ |
194 | 197 | {$classes[] = $classe;} |
195 | 198 | $c = $c + 1; |
196 | 199 | } |
200 | + | |
201 | + //com.iver.cit.gvsig.fmap.rendering.ZSort | |
197 | 202 | return $classes; |
198 | 203 | } |
199 | 204 | function SingleSymbolLegend($result,$path){ |
200 | 205 | $classes = array(); |
201 | 206 | $c = 0; |
202 | - //var_dump($result);exit; | |
207 | + | |
203 | 208 | while(list( , $node) = each($result)) { |
204 | 209 | $classe = array(); |
205 | 210 | $classe["className"] = (string) $this->getValue($path,"className",$c); |
206 | - $classe["desc"] = (string) $this->getValue($path,"desc",$c); | |
207 | - $classe["color"] = (string) $this->getValue($path,"color",$c); | |
208 | - $classe["rotation"] = (string) $this->getValue($path,"rotation",$c); | |
209 | - $classe["offsetX"] = (string) $this->getValue($path,"offsetX",$c); | |
210 | - $classe["offsetY"] = (string) $this->getValue($path,"offsetY",$c); | |
211 | - $classe["size"] = (string) $this->getValue($path,"size",$c); | |
212 | - $classe["markerStyle"] = (string) $this->getValue($path,"markerStyle",$c); | |
213 | - $classe["hasFill"] = (string) $this->getValue($path,"hasFill",$c); | |
214 | - $classe["hasOutline"] = (string) $this->getValue($path,"hasOutline",$c); | |
215 | - $classe["exp"] = false; | |
216 | - $classe["nome"] = " "; | |
217 | - if($classe["hasOutline"] == "true"){ | |
218 | - $classe["outline"] = (string) $this->getValue($path."/tag:xml-tag","color"); | |
219 | - } | |
220 | - else{ | |
221 | - $classe["outline"] = (string) $this->getValue($path,"color",$c); | |
211 | + if($classe["className"] != "com.iver.cit.gvsig.fmap.rendering.ZSort"){ | |
212 | + $classe["desc"] = (string) $this->getValue($path,"desc",$c); | |
213 | + $classe["color"] = (string) $this->getValue($path,"color",$c); | |
214 | + $classe["rotation"] = (string) $this->getValue($path,"rotation",$c); | |
215 | + $classe["offsetX"] = (string) $this->getValue($path,"offsetX",$c); | |
216 | + $classe["offsetY"] = (string) $this->getValue($path,"offsetY",$c); | |
217 | + $classe["size"] = (string) $this->getValue($path,"size",$c); | |
218 | + $classe["markerStyle"] = (string) $this->getValue($path,"markerStyle",$c); | |
219 | + $classe["hasFill"] = (string) $this->getValue($path,"hasFill",$c); | |
220 | + $classe["hasOutline"] = (string) $this->getValue($path,"hasOutline",$c); | |
221 | + $classe["exp"] = false; | |
222 | + $classe["nome"] = " "; | |
223 | + if($classe["hasOutline"] == "true"){ | |
224 | + $classe["outline"] = (string) $this->getValue($path."/tag:xml-tag","color"); | |
225 | + } | |
226 | + else{ | |
227 | + $classe["outline"] = (string) $this->getValue($path,"color",$c); | |
228 | + } | |
229 | + $classes[] = $classe; | |
230 | + $c = $c + 1; | |
222 | 231 | } |
223 | - $classes[] = $classe; | |
224 | - $c = $c + 1; | |
225 | 232 | } |
233 | + | |
226 | 234 | return $classes; |
227 | 235 | } |
228 | 236 | function getValue($path,$key,$i=0){ |
... | ... | @@ -266,6 +274,7 @@ class gvsig2mapfile{ |
266 | 274 | {$oLayer->set("type",0);} |
267 | 275 | if($tipo == "com.iver.cit.gvsig.fmap.core.symbols.SimpleFillSymbol") |
268 | 276 | {$oLayer->set("type",2);} |
277 | + | |
269 | 278 | foreach($dataLayer["legenda"]["classes"] as $data){ |
270 | 279 | //var_dump($data); |
271 | 280 | $classe = ms_newClassObj($oLayer); |
... | ... | @@ -289,6 +298,7 @@ class gvsig2mapfile{ |
289 | 298 | if($data["exp"] != false) |
290 | 299 | {$classe->setExpression($data["exp"]);} |
291 | 300 | } |
301 | + | |
292 | 302 | return $oLayer; |
293 | 303 | } |
294 | 304 | function findAttribute($object, $attribute) { | ... | ... |