Commit 0cd386f5f3ad95b8cd27af053670833712b87148
1 parent
fe778f79
Exists in
master
--no commit message
Showing
2 changed files
with
10 additions
and
4 deletions
Show diff stats
ogc.htm
| ... | ... | @@ -199,7 +199,7 @@ A:hover { |
| 199 | 199 | ins += |
| 200 | 200 | "<p><a target=blank href='"+servico+"OUTPUTFORMAT=shape-zip&bbox=-76.5125927,-39.3925675209,-29.5851853,9.49014852081&service=wfs&version=1.1.0&request=getfeature&layers="+tema+"&typeName="+tema+"' />download shapefile via WFS</a>"; |
| 201 | 201 | ins += |
| 202 | - "<p><a target=blank href='"+servico+"OUTPUTFORMAT=csv&bbox=-76.5125927,-39.3925675209,-29.5851853,9.49014852081&service=wfs&version=1.1.0&request=getfeature&layers="+tema+"&typeName="+tema+"' />download CSV via WFS</a>"; | |
| 202 | + "<p><a target=blank href='"+servico+"OUTPUTFORMAT=csv&bbox=-76.5125927,-39.3925675209,-29.5851853,9.49014852081&service=wfs&version=1.1.0&request=getfeature&layers="+tema+"&typeName="+tema+"&ows_geomtype=AS_WKT' />download CSV via WFS com geometria</a>"; | |
| 203 | 203 | ins += |
| 204 | 204 | "<p><a target=blank href='"+servico+"OUTPUTFORMAT=csv&bbox=-76.5125927,-39.3925675209,-29.5851853,9.49014852081&service=wfs&version=1.1.0&request=getfeature&layers="+tema+"&typeName="+tema+"&ows_geomtype=none' />download CSV via WFS mas sem a geometria</a>"; |
| 205 | 205 | ins += | ... | ... |
ogc.php
| ... | ... | @@ -49,7 +49,7 @@ Na gera&ccedil;&atilde;o da legenda pode ser utilizado text/html para gerar no f |
| 49 | 49 | OUTPUTFORMAT - em getfeature, aceita também shape-zip para download de shapefile e csv para download de csv compactado |
| 50 | 50 | |
| 51 | 51 | ows_geomtype - permite definir o tipo de geometria conforme utilizado pelo parametro GEOMETRY do OGR (veja http://gdal.org/drv_csv.html) |
| 52 | -afeta o OUTPUTFORMAT csv. Utilize &ows_geomtype=none para obter um csv sem a coluna geometry | |
| 52 | +afeta o OUTPUTFORMAT csv. Por default utiliza &ows_geomtype=none para obter um csv sem a coluna geometry. Para obter a geometria utilize &ows_geomtypeAS_WKT | |
| 53 | 53 | |
| 54 | 54 | id_medida_variavel - id da medida de variavel - utilizado apenas quando a fonte para definicao do layer for o sistema de metadados estatisticos |
| 55 | 55 | nao deve ser utilizado junto com tema |
| ... | ... | @@ -101,6 +101,12 @@ $cache = true; |
| 101 | 101 | include(dirname(__FILE__)."/ms_configura.php"); |
| 102 | 102 | include(dirname(__FILE__)."/classesphp/pega_variaveis.php"); |
| 103 | 103 | include(dirname(__FILE__)."/classesphp/funcoes_gerais.php"); |
| 104 | +// | |
| 105 | +//ajusta o default | |
| 106 | +// | |
| 107 | +if(!isset($ows_geomtype) || $ows_geomtype == ""){ | |
| 108 | + $ows_geomtype = "none"; | |
| 109 | +} | |
| 104 | 110 | // |
| 105 | 111 | //imprime na tela a ajuda |
| 106 | 112 | // |
| ... | ... | @@ -1256,7 +1262,7 @@ function exportaCsv(){ |
| 1256 | 1262 | $reg[] = '"'.$shape->towkt().'"'; |
| 1257 | 1263 | } |
| 1258 | 1264 | $linhas[] = implode(",",$reg); |
| 1259 | - | |
| 1265 | + | |
| 1260 | 1266 | } |
| 1261 | 1267 | $contents = implode("\n",$linhas); |
| 1262 | 1268 | file_put_contents($arq,$contents); |
| ... | ... | @@ -1295,7 +1301,7 @@ function exportaGeojson(){ |
| 1295 | 1301 | $propriedades[] = array($item=>$v); |
| 1296 | 1302 | } |
| 1297 | 1303 | $wkt = $shape->towkt(); |
| 1298 | - | |
| 1304 | + | |
| 1299 | 1305 | $features[] = array( |
| 1300 | 1306 | "type"=>"Feature", |
| 1301 | 1307 | "properties"=>$propriedades, | ... | ... |