Commit 36987e22ba62c80574f250d06189bc996192ed22
1 parent
23710609
Exists in
master
and in
7 other branches
Inclusão de matadata nos layers para controlar a conversão de caracteres
Showing
7 changed files
with
75 additions
and
27 deletions
Show diff stats
admin/js/editormapfile.js
@@ -1349,6 +1349,8 @@ function montaEditorDados(dados) | @@ -1349,6 +1349,8 @@ function montaEditorDados(dados) | ||
1349 | "linhas":[ | 1349 | "linhas":[ |
1350 | {ajuda:"Type of connection. Default is local.", | 1350 | {ajuda:"Type of connection. Default is local.", |
1351 | titulo:"Connectiontype",id:"",value:"",div:"<div id=cConnectiontype ></div>",tipo:"text"}, | 1351 | titulo:"Connectiontype",id:"",value:"",div:"<div id=cConnectiontype ></div>",tipo:"text"}, |
1352 | + {ajuda:"Aplica a conversão de caracteres nas ferramentas que obtém os dados descritivos referentes aos elementos do LAYER. Em alguns casos, a conversão pode provocar problemas de acentuação. Se isso ocorrer, na ferramenta tabela por exemplo, experimente marcar essa opção como 'nao'", | ||
1353 | + titulo:"Conversão de caracteres (METADATA: CONVCARACTER)",id:"",value:dados.convcaracter,tipo:"text",div:"<div id=cConvcaracter ></div>"}, | ||
1352 | {ajuda:"Database connection string to retrieve remote data.An SDE connection string consists of a hostname, instance name, database name, username and password separated by commas.A PostGIS connection string is basically a regular PostgreSQL connection string, it takes the form of 'user=nobody password=****** dbname=dbname host=localhost port=5432' An Oracle connection string: user/pass[@db] . Se vc tiver problemas com acentuação, experimente algo como: user=postgres password=postgres dbname=pgutf8 host=localhost port=5432 options='-c client_encoding=LATIN1'", | 1354 | {ajuda:"Database connection string to retrieve remote data.An SDE connection string consists of a hostname, instance name, database name, username and password separated by commas.A PostGIS connection string is basically a regular PostgreSQL connection string, it takes the form of 'user=nobody password=****** dbname=dbname host=localhost port=5432' An Oracle connection string: user/pass[@db] . Se vc tiver problemas com acentuação, experimente algo como: user=postgres password=postgres dbname=pgutf8 host=localhost port=5432 options='-c client_encoding=LATIN1'", |
1353 | titulo:"Connection",id:"connection",value:dados.connection,tipo:"text"}, | 1355 | titulo:"Connection",id:"connection",value:dados.connection,tipo:"text"}, |
1354 | {ajuda:"Full filename of the spatial data to process. No file extension is necessary for shapefiles. Can be specified relative to the SHAPEPATH option from the Map Object.If this is an SDE layer, the parameter should include the name of the layer as well as the geometry column, i.e. 'mylayer,shape,myversion'.If this is a PostGIS layer, the parameter should be in the form of '<columnname> from <tablename>', where 'columnname' is the name of the column containing the geometry objects and 'tablename' is the name of the table from which the geometry data will be read.For Oracle, use 'shape FROM table' or 'shape FROM (SELECT statement)' or even more complex Oracle compliant queries! Note that there are important performance impacts when using spatial subqueries however. Try using MapServer's FILTER whenever possible instead. You can also see the SQL submitted by forcing an error, for instance by submitting a DATA parameter you know won't work, using for example a bad column name. Exemplo postgis: the_geom FROM (select * FROM biomas) as foo USING UNIQUE gid USING SRID=4291 . Exemplo shapefile: c://ms4w/Apache/htdocs/geodados/brasil/limitespol/localidades.shp", | 1356 | {ajuda:"Full filename of the spatial data to process. No file extension is necessary for shapefiles. Can be specified relative to the SHAPEPATH option from the Map Object.If this is an SDE layer, the parameter should include the name of the layer as well as the geometry column, i.e. 'mylayer,shape,myversion'.If this is a PostGIS layer, the parameter should be in the form of '<columnname> from <tablename>', where 'columnname' is the name of the column containing the geometry objects and 'tablename' is the name of the table from which the geometry data will be read.For Oracle, use 'shape FROM table' or 'shape FROM (SELECT statement)' or even more complex Oracle compliant queries! Note that there are important performance impacts when using spatial subqueries however. Try using MapServer's FILTER whenever possible instead. You can also see the SQL submitted by forcing an error, for instance by submitting a DATA parameter you know won't work, using for example a bad column name. Exemplo postgis: the_geom FROM (select * FROM biomas) as foo USING UNIQUE gid USING SRID=4291 . Exemplo shapefile: c://ms4w/Apache/htdocs/geodados/brasil/limitespol/localidades.shp", |
@@ -1410,7 +1412,13 @@ function montaEditorDados(dados) | @@ -1410,7 +1412,13 @@ function montaEditorDados(dados) | ||
1410 | temp += core_comboObjeto(objlayertypes,"valor","texto",dados.type) | 1412 | temp += core_comboObjeto(objlayertypes,"valor","texto",dados.type) |
1411 | temp += "</select>" | 1413 | temp += "</select>" |
1412 | $i("cType").innerHTML = temp | 1414 | $i("cType").innerHTML = temp |
1413 | - | 1415 | + |
1416 | + if($i("cConvcaracter")){ | ||
1417 | + temp = "<select id='convcaracter' >" | ||
1418 | + temp += core_combosimnao(dados.convcaracter) | ||
1419 | + temp += "</select>" | ||
1420 | + $i("cConvcaracter").innerHTML = temp | ||
1421 | + } | ||
1414 | 1422 | ||
1415 | var temp = function() | 1423 | var temp = function() |
1416 | {salvarDadosEditor('conexao',dados.codigoMap,dados.codigoLayer,false)} | 1424 | {salvarDadosEditor('conexao',dados.codigoMap,dados.codigoLayer,false)} |
@@ -1866,7 +1874,7 @@ function salvarDadosEditor(tipo,codigoMap,codigoLayer,indiceClasse,indiceEstilo, | @@ -1866,7 +1874,7 @@ function salvarDadosEditor(tipo,codigoMap,codigoLayer,indiceClasse,indiceEstilo, | ||
1866 | } | 1874 | } |
1867 | if(tipo == "conexao") | 1875 | if(tipo == "conexao") |
1868 | { | 1876 | { |
1869 | - var campos = new Array("cache","projection","type","connection","data","connectiontype","tileitem","tileindex","filteritem","filter","tipooriginal") | 1877 | + var campos = new Array("cache","projection","type","connection","data","connectiontype","tileitem","tileindex","filteritem","filter","tipooriginal","convcaracter"); |
1870 | var par = "&codigoMap="+codigoMap+"&codigoLayer="+codigoLayer | 1878 | var par = "&codigoMap="+codigoMap+"&codigoLayer="+codigoLayer |
1871 | var prog = "../php/editormapfile.php?funcao=alterarConexao" | 1879 | var prog = "../php/editormapfile.php?funcao=alterarConexao" |
1872 | } | 1880 | } |
admin/php/editormapfile.php
@@ -1485,7 +1485,7 @@ function pegaConexao() | @@ -1485,7 +1485,7 @@ function pegaConexao() | ||
1485 | if($dados["projection"] == "null") | 1485 | if($dados["projection"] == "null") |
1486 | {$dados["projection"] = "";} | 1486 | {$dados["projection"] = "";} |
1487 | $dados["projection"] = str_replace("+i","i",$dados["projection"]); | 1487 | $dados["projection"] = str_replace("+i","i",$dados["projection"]); |
1488 | - | 1488 | + $dados["convcaracter"] = $layer->getmetadata("convcaracter"); |
1489 | $dados["colunas"] = implode(" ,",pegaItens($layer)); | 1489 | $dados["colunas"] = implode(" ,",pegaItens($layer)); |
1490 | if($layer->connectiontype == 7 || $layer->connectiontype == 9){ | 1490 | if($layer->connectiontype == 7 || $layer->connectiontype == 9){ |
1491 | $dados["tipooriginal"] = $layer->getmetadata("tipooriginal"); | 1491 | $dados["tipooriginal"] = $layer->getmetadata("tipooriginal"); |
@@ -1494,7 +1494,7 @@ function pegaConexao() | @@ -1494,7 +1494,7 @@ function pegaConexao() | ||
1494 | } | 1494 | } |
1495 | function alterarConexao() | 1495 | function alterarConexao() |
1496 | { | 1496 | { |
1497 | - global $cache,$tipooriginal,$filteritem,$filter,$projection,$type,$dir_tmp,$testar,$codigoMap,$codigoLayer,$locaplic,$connection,$connectiontype,$data,$tileitem,$tileindex; | 1497 | + global $convcaracter,$cache,$tipooriginal,$filteritem,$filter,$projection,$type,$dir_tmp,$testar,$codigoMap,$codigoLayer,$locaplic,$connection,$connectiontype,$data,$tileitem,$tileindex; |
1498 | $mapfile = $locaplic."/temas/".$codigoMap.".map"; | 1498 | $mapfile = $locaplic."/temas/".$codigoMap.".map"; |
1499 | $mapa = ms_newMapObj($mapfile); | 1499 | $mapa = ms_newMapObj($mapfile); |
1500 | $layer = $mapa->getlayerbyname($codigoLayer); | 1500 | $layer = $mapa->getlayerbyname($codigoLayer); |
@@ -1516,7 +1516,8 @@ function alterarConexao() | @@ -1516,7 +1516,8 @@ function alterarConexao() | ||
1516 | if($layer->connectiontype == 7 || $layer->connectiontype== 9){ | 1516 | if($layer->connectiontype == 7 || $layer->connectiontype== 9){ |
1517 | $layer->setmetadata("tipooriginal",$tipooriginal); | 1517 | $layer->setmetadata("tipooriginal",$tipooriginal); |
1518 | } | 1518 | } |
1519 | - $layer->setmetadata("cache",$cache); | 1519 | + $layer->setmetadata("cache",$cache); |
1520 | + $layer->setmetadata("convcaracter",$convcaracter); | ||
1520 | if($testar == "true") | 1521 | if($testar == "true") |
1521 | { | 1522 | { |
1522 | $nome = $dir_tmp."/".$codigoMap.".map"; | 1523 | $nome = $dir_tmp."/".$codigoMap.".map"; |
classesphp/classe_atributos.php
@@ -275,13 +275,18 @@ $tipo - Tipo de busca brasil|null | @@ -275,13 +275,18 @@ $tipo - Tipo de busca brasil|null | ||
275 | $shapes = retornaShapesMapext($this->layer,$this->mapa); | 275 | $shapes = retornaShapesMapext($this->layer,$this->mapa); |
276 | } | 276 | } |
277 | $registros[] = array(); | 277 | $registros[] = array(); |
278 | + if(strtoupper($this->layer->getmetadata("convcaracter")) == "NAO") | ||
279 | + {$convC = false;} | ||
280 | + else | ||
281 | + {$convC = true;} | ||
278 | foreach($shapes as $shape) | 282 | foreach($shapes as $shape) |
279 | { | 283 | { |
280 | $valitem = array(); | 284 | $valitem = array(); |
281 | foreach ($items as $item) | 285 | foreach ($items as $item) |
282 | { | 286 | { |
283 | $v = trim($shape->values[$item]); | 287 | $v = trim($shape->values[$item]); |
284 | - $v = $this->converte($v); | 288 | + if($convC == true) |
289 | + {$v = $this->converte($v);} | ||
285 | $valitem[] = $v; | 290 | $valitem[] = $v; |
286 | } | 291 | } |
287 | $registros[] = implode(";",$valitem); | 292 | $registros[] = implode(";",$valitem); |
@@ -335,6 +340,10 @@ $tipolista - Indica se serão mostrados todos os registros ou apenas os seleciona | @@ -335,6 +340,10 @@ $tipolista - Indica se serão mostrados todos os registros ou apenas os seleciona | ||
335 | $res_count = count($shapes); | 340 | $res_count = count($shapes); |
336 | $registros = array(); | 341 | $registros = array(); |
337 | //lista apenas os selecionados | 342 | //lista apenas os selecionados |
343 | + if(strtoupper($this->layer->getmetadata("convcaracter")) == "NAO") | ||
344 | + {$convC = false;} | ||
345 | + else | ||
346 | + {$convC = true;} | ||
338 | if ($tipolista == "selecionados") | 347 | if ($tipolista == "selecionados") |
339 | { | 348 | { |
340 | $chk = "CHECKED"; | 349 | $chk = "CHECKED"; |
@@ -350,7 +359,8 @@ $tipolista - Indica se serão mostrados todos os registros ou apenas os seleciona | @@ -350,7 +359,8 @@ $tipolista - Indica se serão mostrados todos os registros ou apenas os seleciona | ||
350 | foreach ($items as $item) | 359 | foreach ($items as $item) |
351 | { | 360 | { |
352 | $valori = trim($shape->values[$item]); | 361 | $valori = trim($shape->values[$item]); |
353 | - $valori = $this->converte($valori); | 362 | + if($convC == true) |
363 | + {$valori = $this->converte($valori);} | ||
354 | $valitem[] = array("item"=>$item,"valor"=>$valori); | 364 | $valitem[] = array("item"=>$item,"valor"=>$valori); |
355 | } | 365 | } |
356 | $registros[] = array("indice"=>$indx,"valores"=>$valitem,"status"=>$chk); | 366 | $registros[] = array("indice"=>$indx,"valores"=>$valitem,"status"=>$chk); |
@@ -395,7 +405,8 @@ $tipolista - Indica se serão mostrados todos os registros ou apenas os seleciona | @@ -395,7 +405,8 @@ $tipolista - Indica se serão mostrados todos os registros ou apenas os seleciona | ||
395 | { | 405 | { |
396 | $valori = ($shape->values[$item]); | 406 | $valori = ($shape->values[$item]); |
397 | } | 407 | } |
398 | - $valori = $this->converte($valori); | 408 | + if($convC == true) |
409 | + {$valori = $this->converte($valori);} | ||
399 | $valitem[] = array("item"=>$item,"valor"=>$valori); | 410 | $valitem[] = array("item"=>$item,"valor"=>$valori); |
400 | } | 411 | } |
401 | //if (in_array($shp_index,$shp_atual)) | 412 | //if (in_array($shp_index,$shp_atual)) |
@@ -460,6 +471,10 @@ $onde - Tipo de abrangência espacial (brasil ou mapa) | @@ -460,6 +471,10 @@ $onde - Tipo de abrangência espacial (brasil ou mapa) | ||
460 | $this->layer = $l; | 471 | $this->layer = $l; |
461 | if ($l->data == "") | 472 | if ($l->data == "") |
462 | {return "Erro. O tema não tem tabela";} | 473 | {return "Erro. O tema não tem tabela";} |
474 | + if(strtoupper($this->layer->getmetadata("convcaracter")) == "NAO") | ||
475 | + {$convC = false;} | ||
476 | + else | ||
477 | + {$convC = true;} | ||
463 | $filtro = $l->getfilterstring(); | 478 | $filtro = $l->getfilterstring(); |
464 | if ($filtro != ""){$l->setfilter("");} | 479 | if ($filtro != ""){$l->setfilter("");} |
465 | $buscas = "ÁÃÓÕÔáàãâóòôõúûíéêç"; | 480 | $buscas = "ÁÃÓÕÔáàãâóòôõúûíéêç"; |
@@ -481,7 +496,8 @@ $onde - Tipo de abrangência espacial (brasil ou mapa) | @@ -481,7 +496,8 @@ $onde - Tipo de abrangência espacial (brasil ou mapa) | ||
481 | { | 496 | { |
482 | if (strtr($v,$buscas,$trocas) == strtr($palavra,$buscas,$trocas)) | 497 | if (strtr($v,$buscas,$trocas) == strtr($palavra,$buscas,$trocas)) |
483 | { | 498 | { |
484 | - $v = $this->converte($v); | 499 | + if($convC == true) |
500 | + {$v = $this->converte($v);} | ||
485 | $r[] = array("item" => $item,"valor" => $v); | 501 | $r[] = array("item" => $item,"valor" => $v); |
486 | $encontrado = "sim"; | 502 | $encontrado = "sim"; |
487 | } | 503 | } |
@@ -490,7 +506,8 @@ $onde - Tipo de abrangência espacial (brasil ou mapa) | @@ -490,7 +506,8 @@ $onde - Tipo de abrangência espacial (brasil ou mapa) | ||
490 | { | 506 | { |
491 | if (stristr(strtr($v,$buscas,$trocas),strtr($palavra,$buscas,$trocas))) | 507 | if (stristr(strtr($v,$buscas,$trocas),strtr($palavra,$buscas,$trocas))) |
492 | { | 508 | { |
493 | - $v = $this->converte($v); | 509 | + if($convC == true) |
510 | + {$v = $this->converte($v);} | ||
494 | $r[] = array("item" => $item,"valor" => $v); | 511 | $r[] = array("item" => $item,"valor" => $v); |
495 | $encontrado = "sim"; | 512 | $encontrado = "sim"; |
496 | } | 513 | } |
@@ -1163,6 +1180,10 @@ $listaDeTemas - (opcional) Lista com os códigos dos temas que serão identificado | @@ -1163,6 +1180,10 @@ $listaDeTemas - (opcional) Lista com os códigos dos temas que serão identificado | ||
1163 | $layer->set("template","none.htm"); | 1180 | $layer->set("template","none.htm"); |
1164 | $pt = ms_newPointObj(); | 1181 | $pt = ms_newPointObj(); |
1165 | $pt->setXY($x, $y); | 1182 | $pt->setXY($x, $y); |
1183 | + if(strtoupper($layer->getmetadata("convcaracter")) == "NAO") | ||
1184 | + {$convC = false;} | ||
1185 | + else | ||
1186 | + {$convC = true;} | ||
1166 | // | 1187 | // |
1167 | //operação especial para o caso de wms | 1188 | //operação especial para o caso de wms |
1168 | // | 1189 | // |
@@ -1216,7 +1237,8 @@ $listaDeTemas - (opcional) Lista com os códigos dos temas que serão identificado | @@ -1216,7 +1237,8 @@ $listaDeTemas - (opcional) Lista com os códigos dos temas que serão identificado | ||
1216 | if(trim($v) != "") | 1237 | if(trim($v) != "") |
1217 | { | 1238 | { |
1218 | $va = trim($v); | 1239 | $va = trim($v); |
1219 | - $va = $this->converte($va); | 1240 | + if($convC == true) |
1241 | + {$va = $this->converte($va);} | ||
1220 | $n[] = array("alias"=>trim($t[0]),"valor"=>$va,"link"=>"","img"=>""); | 1242 | $n[] = array("alias"=>trim($t[0]),"valor"=>$va,"link"=>"","img"=>""); |
1221 | } | 1243 | } |
1222 | } | 1244 | } |
@@ -1232,7 +1254,10 @@ $listaDeTemas - (opcional) Lista com os códigos dos temas que serão identificado | @@ -1232,7 +1254,10 @@ $listaDeTemas - (opcional) Lista com os códigos dos temas que serão identificado | ||
1232 | $linha = explode("|",$linha); | 1254 | $linha = explode("|",$linha); |
1233 | for($i=0;$i < count($cabecalho);++$i) | 1255 | for($i=0;$i < count($cabecalho);++$i) |
1234 | { | 1256 | { |
1235 | - $va = $this->converte($linha[$i]); | 1257 | + if($convC == true) |
1258 | + {$va = $this->converte($linha[$i]);} | ||
1259 | + else | ||
1260 | + {$va = $linha[$i];} | ||
1236 | $n[] = array("alias"=>$cabecalho[$i],"valor"=>$va,"link"=>"","img"=>""); | 1261 | $n[] = array("alias"=>$cabecalho[$i],"valor"=>$va,"link"=>"","img"=>""); |
1237 | } | 1262 | } |
1238 | } | 1263 | } |
@@ -1320,6 +1345,10 @@ $listaDeTemas - (opcional) Lista com os códigos dos temas que serão identificado | @@ -1320,6 +1345,10 @@ $listaDeTemas - (opcional) Lista com os códigos dos temas que serão identificado | ||
1320 | $ident = @$layer->queryByPoint($pt, 1, -1); | 1345 | $ident = @$layer->queryByPoint($pt, 1, -1); |
1321 | $sopen = $layer->open(); | 1346 | $sopen = $layer->open(); |
1322 | $res_count = $layer->getNumresults(); | 1347 | $res_count = $layer->getNumresults(); |
1348 | + if(strtoupper($layer->getmetadata("convcaracter")) == "NAO") | ||
1349 | + {$convC = false;} | ||
1350 | + else | ||
1351 | + {$convC = true;} | ||
1323 | if($sopen == MS_FAILURE){return "erro";} | 1352 | if($sopen == MS_FAILURE){return "erro";} |
1324 | for ($i = 0; $i < $res_count; ++$i) | 1353 | for ($i = 0; $i < $res_count; ++$i) |
1325 | { | 1354 | { |
@@ -1355,6 +1384,8 @@ $listaDeTemas - (opcional) Lista com os códigos dos temas que serão identificado | @@ -1355,6 +1384,8 @@ $listaDeTemas - (opcional) Lista com os códigos dos temas que serão identificado | ||
1355 | foreach ($itens as $it) | 1384 | foreach ($itens as $it) |
1356 | { | 1385 | { |
1357 | $val = $shape->values[$it]; | 1386 | $val = $shape->values[$it]; |
1387 | + if($convC == true) | ||
1388 | + {$val = $this->converte($val);} | ||
1358 | $link = $lks[$conta]; | 1389 | $link = $lks[$conta]; |
1359 | foreach($itens as $t) | 1390 | foreach($itens as $t) |
1360 | { | 1391 | { |
@@ -1374,7 +1405,7 @@ $listaDeTemas - (opcional) Lista com os códigos dos temas que serão identificado | @@ -1374,7 +1405,7 @@ $listaDeTemas - (opcional) Lista com os códigos dos temas que serão identificado | ||
1374 | {$etiqueta = "sim";} | 1405 | {$etiqueta = "sim";} |
1375 | $arraytemp = array( | 1406 | $arraytemp = array( |
1376 | "alias"=>$this->converte($itensdesc[$conta]), | 1407 | "alias"=>$this->converte($itensdesc[$conta]), |
1377 | - "valor"=>$this->converte($val), | 1408 | + "valor"=>$val, |
1378 | "link"=>$link, | 1409 | "link"=>$link, |
1379 | "img"=>$img, | 1410 | "img"=>$img, |
1380 | "tip"=>$etiqueta | 1411 | "tip"=>$etiqueta |
ferramentas/tabela/relatorio.php
@@ -50,6 +50,10 @@ if ($layer->getNumresults() > 0){$existesel = "sim";} | @@ -50,6 +50,10 @@ if ($layer->getNumresults() > 0){$existesel = "sim";} | ||
50 | if ($existesel == "nao") | 50 | if ($existesel == "nao") |
51 | {$layer->querybyrect($mapa->extent);} | 51 | {$layer->querybyrect($mapa->extent);} |
52 | $layer->open(); | 52 | $layer->open(); |
53 | +if(strtoupper($layer->getmetadata("convcaracter")) == "NAO") | ||
54 | +{$convC = false;} | ||
55 | +else | ||
56 | +{$convC = true;} | ||
53 | //$registros[] = array(); | 57 | //$registros[] = array(); |
54 | $res_count = $layer->getNumresults(); | 58 | $res_count = $layer->getNumresults(); |
55 | for ($i = 0; $i < $res_count; $i++) | 59 | for ($i = 0; $i < $res_count; $i++) |
@@ -62,7 +66,7 @@ for ($i = 0; $i < $res_count; $i++) | @@ -62,7 +66,7 @@ for ($i = 0; $i < $res_count; $i++) | ||
62 | foreach ($itensrel as $item) | 66 | foreach ($itensrel as $item) |
63 | { | 67 | { |
64 | $v = trim($shape->values[$item]); | 68 | $v = trim($shape->values[$item]); |
65 | - if (function_exists("mb_convert_encoding")) | 69 | + if (function_exists("mb_convert_encoding") && $convC == true) |
66 | {$v = mb_convert_encoding($v,"UTF-8","ISO-8859-1");} | 70 | {$v = mb_convert_encoding($v,"UTF-8","ISO-8859-1");} |
67 | $valitem[$item] = $v; | 71 | $valitem[$item] = $v; |
68 | } | 72 | } |
ms_configura.php
@@ -312,7 +312,7 @@ if (strtoupper(substr(PHP_OS, 0, 3) == 'WIN')) | @@ -312,7 +312,7 @@ if (strtoupper(substr(PHP_OS, 0, 3) == 'WIN')) | ||
312 | */ | 312 | */ |
313 | $postgis_mapa = array( | 313 | $postgis_mapa = array( |
314 | "teste"=>"user=postgres password=postgres dbname=postgis host=localhost port=5432 options='-c client_encoding=LATIN1'", | 314 | "teste"=>"user=postgres password=postgres dbname=postgis host=localhost port=5432 options='-c client_encoding=LATIN1'", |
315 | - "postgres"=>"user=postgres password=postgres dbname=postgis host=localhost port=5432'", | 315 | + "postgres"=>"user=postgres password=postgres dbname=postgis host=localhost port=5432", |
316 | ); //"user=geodados password=geodados dbname=geodados host=10.1.1.36 port=5432"; | 316 | ); //"user=geodados password=geodados dbname=geodados host=10.1.1.36 port=5432"; |
317 | /* | 317 | /* |
318 | Variable: utilizacgi | 318 | Variable: utilizacgi |
temas/testeutf8postgis.map
1 | -MAP | ||
2 | - | ||
3 | - | ||
4 | - FONTSET "../symbols/fontes.txt" | ||
5 | - SYMBOLSET "../symbols/simbolos.sym" | 1 | +MAP |
2 | + FONTSET "../symbols/fontes.txt" | ||
3 | + SYMBOLSET "../symbols/simbolos.sym" | ||
6 | LAYER | 4 | LAYER |
7 | - #CONNECTION "teste" | ||
8 | - CONNECTION "user=postgres password=postgres dbname=postgis host=localhost port=5432 options='-c client_encoding=ISO-8859-1'" | 5 | + CONNECTION "teste" |
9 | CONNECTIONTYPE POSTGIS | 6 | CONNECTIONTYPE POSTGIS |
10 | DATA "the_geom FROM (select * FROM teste.estados) as foo USING UNIQUE gid USING SRID=4291" | 7 | DATA "the_geom FROM (select * FROM teste.estados) as foo USING UNIQUE gid USING SRID=4291" |
11 | METADATA | 8 | METADATA |
9 | + "cache" "" | ||
12 | "CLASSE" "SIM" | 10 | "CLASSE" "SIM" |
13 | "permitekmz" "" | 11 | "permitekmz" "" |
14 | "permitedownload" "" | 12 | "permitedownload" "" |
15 | "download" "SIM" | 13 | "download" "SIM" |
16 | - "permitekml" "sim" | ||
17 | "permiteogc" "sim" | 14 | "permiteogc" "sim" |
15 | + "permitekml" "sim" | ||
16 | + "convcaracter" "SIM" | ||
18 | "TEMA" "Teste UTF8 Postgis" | 17 | "TEMA" "Teste UTF8 Postgis" |
19 | END | 18 | END |
20 | NAME "testeutf8postgis" | 19 | NAME "testeutf8postgis" |
@@ -27,9 +26,11 @@ MAP | @@ -27,9 +26,11 @@ MAP | ||
27 | STYLE | 26 | STYLE |
28 | ANGLE 360 | 27 | ANGLE 360 |
29 | COLOR 196 185 103 | 28 | COLOR 196 185 103 |
30 | - OPACITY 100 | ||
31 | SYMBOL 0 | 29 | SYMBOL 0 |
30 | + WIDTH 1 | ||
32 | END | 31 | END |
33 | END | 32 | END |
34 | END | 33 | END |
34 | + | ||
35 | END | 35 | END |
36 | + |
testamapfile.php
@@ -136,7 +136,7 @@ function verifica($map,$solegenda) | @@ -136,7 +136,7 @@ function verifica($map,$solegenda) | ||
136 | $tema = ""; | 136 | $tema = ""; |
137 | 137 | ||
138 | if(file_exists($map)) | 138 | if(file_exists($map)) |
139 | - $tema = $map; | 139 | + {$tema = $map;} |
140 | else | 140 | else |
141 | { | 141 | { |
142 | $map = str_replace("\\","/",$map); | 142 | $map = str_replace("\\","/",$map); |
@@ -151,6 +151,8 @@ function verifica($map,$solegenda) | @@ -151,6 +151,8 @@ function verifica($map,$solegenda) | ||
151 | if(($tipo == "") || ($tipo == "todos")) | 151 | if(($tipo == "") || ($tipo == "todos")) |
152 | {echo "<hr><br><br><span style='color:red' ><b>Testando: $tema </span><pre></b>";} | 152 | {echo "<hr><br><br><span style='color:red' ><b>Testando: $tema </span><pre></b>";} |
153 | if(!file_exists($tema)) | 153 | if(!file_exists($tema)) |
154 | + {$tema = $locaplic."/".$tema;} | ||
155 | + if(!file_exists($tema)) | ||
154 | {echo "Arquivo ".$map." não encontrado.";exit;} | 156 | {echo "Arquivo ".$map." não encontrado.";exit;} |
155 | if ($tema != "") | 157 | if ($tema != "") |
156 | { | 158 | { |
@@ -189,13 +191,14 @@ function verifica($map,$solegenda) | @@ -189,13 +191,14 @@ function verifica($map,$solegenda) | ||
189 | eval($pegarext."(\$mapa);"); | 191 | eval($pegarext."(\$mapa);"); |
190 | } | 192 | } |
191 | else{ | 193 | else{ |
192 | - if(@ms_newMapObj($locaplic."/".$tema)) | 194 | + if(@ms_newMapObj($tema)) |
193 | { | 195 | { |
194 | - $nmapa = ms_newMapObj($locaplic."/".$tema); | 196 | + $nmapa = ms_newMapObj($tema); |
195 | } | 197 | } |
196 | else | 198 | else |
197 | { | 199 | { |
198 | echo "erro no arquivo $map <br>"; | 200 | echo "erro no arquivo $map <br>"; |
201 | + echo "Obs.: em alguns testes o mapfile pode falhar se o endereço dos arquivos de símbolos estiverem <br>definidos de forma relativa ao invés de absoluta. Nesses casos, ao abrir o i3Geo, <br>o mapfile poderá funcionar. <br>"; | ||
199 | $error = ms_GetErrorObj(); | 202 | $error = ms_GetErrorObj(); |
200 | while($error && $error->code != MS_NOERR) | 203 | while($error && $error->code != MS_NOERR) |
201 | { | 204 | { |