ogc.htm 10.8 KB
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<title>Download de dados geogr&aacute;ficos</title>
<meta name="description" content="Mapa interativo do MMA">
<meta name="keywords" content="WMS OGC mapa sig gis webmapping geo geoprocessamento interativo meio ambiente MMA cartografia geografia">
<meta name="robots" content="index,follow">
<script type="text/javascript" src="classesjs/i3geo.js"></script>

<link rel="stylesheet" type="text/css" href="admin/html/admin.css">
<style>
.ajuda_usuario {
	margin-left: 10px;
}

P {
	padding-top: 12px;
	COLOR: #2F4632;
	text-align: left;
	font-size: 12px;
	font-family: Verdana, Arial, Helvetica, sans-serif;
}

#corpo {
	text-align: left;
	font-size: 12px;
	width: 450px;
	position: absolute;
	top: 0px;
	left: 380px;
	background: white;
}

#arvoreTemas {
	width: 280px;
}

body {
	padding-top: 0px;
	COLOR: #2F4632;
	text-align: center;
	font-size: 0.6cm;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	background-color: white;
	margin: auto;
}

#brasil {
	background-image: url("imagens/sprite.png");
	background-position: 0 -600px;
	background-repeat: no-repeat;
	cursor: pointer;
	height: 10px;
	width: 20px;
}

#uk {
	background-image: url("imagens/sprite.png");
	background-position: 0 -625px;
	background-repeat: no-repeat;
	cursor: pointer;
	height: 10px;
	width: 20px;
}

#espanhol {
	background-image: url("imagens/sprite.png");
	background-position: 0 -1400px;
	background-repeat: no-repeat;
	cursor: pointer;
	height: 10px;
	width: 20px;
}

#bandeiras img {
	margin-left: 7px;
}

#bandeiras {
	width: 100px;
	text-align: left;
	position: absolute;
	left: 0.2cm;
	z-index: 10;
}

a {
	margin: 0px auto;
	text-decoration: none;
	font-size: 14px;
	color: #26298D;
	outline: none;
}

A:hover {
	color: #4142ff;
}

</style>
</head>
<body class=" yui-skin-sam " style="background-color: white;">
	<div class="borda">
		<div id="bandeiras"></div>
		<div style="text-align: center">
			<a href="http://www.softwarepublico.gov.br" target="_blank" style="color: white;">
				<b>OGC</b>
			</a>
		</div>
	</div>

	<div id="conteudo" style="position: relative; top: 10px; margin: auto; max-width: 1000px; left: 10px;">

		<div id=arvoreTemas>
			<p>Carregando &aacute;rvore...
		</div>
		<!-- aqui vai o corpo da aplica&ccedil;&atilde;o -->
		<div id=corpo style="background-color: rgb(250, 250, 250)">
			<H1>Web services OGC</H1>
			<p>Navegue pela &aacute;rvore ao lado para localizar o tema desejado.
			<p>Clicando-se em um tema, &eacute; mostrado o endere&ccedil;o do servi&ccedil;o OGC.
			<p>Os servi&ccedil;os s&atilde;o Web Wervices que possibilitam o acesso aos dados dispon&iacute;veis nessa instala&ccedil;&atilde;o do i3Geo.
			<p>A lista de temas baseia-se nas configura&ccedil;&otilde;es espec&iacute;ficas de cada servidor onde o i3Geo est&aacute; instalado.
			<p>
				Voc&ecirc; pode usar um Web Service para acessar os dados configurados nesse servidor por meio de outros softwares de geoprocessamento, como o
				<a href="http://www.gvsig.gva.es/index.php?id=gvsig&L=0">gvSIG.</a>
			<p>
				Para maiores informa&ccedil;&otilde;es sobre o uso de web services, veja
				<a href='http://www.opengeospatial.org/standards' target=blank>http://www.opengeospatial.org/standards</a>
			<p>
				Bookmark: <span id=bm1></span>
			<p>
			<div style="text-align: left" id=curtir></div>
		</div>
	</div>

	<script>
		/*
		 Monta uma &aacute;rvore de temas permitindo que o usu&aacute;rio clique em um deles e veja o endere&ccedil;o para acesso aos dados via WMS.

		 File: i3geo/ogc.htm
		 About: Licen&ccedil;a

		 I3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet

		 Direitos Autorais Reservados (c) 2006 Minist&eacute;rio do Meio Ambiente Brasil
		 Desenvolvedor: Edmar Moretti edmar.moretti@mma.gov.br

		 Este programa &eacute; software livre; voc&ecirc; pode redistribu&iacute;-lo
		 e/ou modific&aacute;-lo sob os termos da Licen&ccedil;a P&uacute;blica Geral
		 GNU conforme publicada pela Free Software Foundation;

		 Este programa &eacute; distribu&iacute;do na expectativa de que seja &uacute;til,
		 por&eacute;m, SEM NENHUMA GARANTIA; nem mesmo a garantia impl&iacute;cita
		 de COMERCIABILIDADE OU ADEQUA&Ccedil;&Atilde;O A UMA FINALIDADE ESPEC&Iacute;FICA.
		 Consulte a Licen&ccedil;a P&uacute;blica Geral do GNU para mais detalhes.
		 Voc&ecirc; deve ter recebido uma cópia da Licen&ccedil;a P&uacute;blica Geral do
		 GNU junto com este programa; se n&atilde;o, escreva para a
		 Free Software Foundation, Inc., no endere&ccedil;o
		 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
		 */
		/*
		 Gera o endere&ccedil;o do webservice do tema escolhido

		 Parameters:

		 botao - objeto do tipo input com o valor do tema para acesso
		 */
		function ogc_endereco(botao) {
			botao.checked = false;
			tema = botao.value;
			if (tema === undefined) {
				tema = botao.title;
			}
			ins = "<H1>Endere&ccedil;os de acesso:</H1>";
			var re = new RegExp(".htm", "g");
			var servico = window.location.href.replace(re, '.php?');
			//remove variaveis adicionais, se houver
			servico = servico.split("?")[0]+"?";
			var s = ""; //"tema="+tema;
			if (botao.name === "metaestat") {
				s = "id_medida_variavel=" + tema.split("_")[1] + "&";
			}
			if (botao.name === "mapaCadastrado") {
				s = "restauramapa=" + tema.split("_")[1] + "&";
				tema = "";
			}

			servico += s;
			ins += "<p>Webservice com todas as camadas: <a href='" + servico + "' target='_blank' >" + servico + "</a>";
			ins += "<p>Webservice dessa camada: <a href='" + servico + "tema=" + tema + "&' target='_blank' >" + servico + "tema=" + tema + "&</a>";
			ins += "<p>Link para essa p&aacute;gina: <a href='"+ window.location.href.split("?")[0] + "?temaOgc=" + tema + "'>"+ window.location.href.split("?")[0] + "?temaOgc=" + tema + "</a>";
			ins += "<p>Bookmark: <span id=bm ></span>";
			ins +=
				"<p><iframe src='http://www.facebook.com/plugins/like.php?href=" + servico
					+ "&amp;layout=button_count&amp;show_faces=false&amp;width=100&amp;action=like&amp;colorscheme=light&amp;height=21' scrolling='no' frameborder='0' style='border:none; overflow:hidden; width:100px; height:21px;' allowTransparency='true'></iframe>";
			ins +=
				"<p><a target=blank href='"+servico+"service=wms&version=1.1.1&request=getcapabilities&layers="+tema+"' />GetCapabilities</a>";
			ins +=
				"<p><a target=blank href='"+servico+"SRS=EPSG:4618&WIDTH=500&HEIGHT=500&BBOX=-76.5125927,-39.3925675209,-29.5851853,9.49014852081&FORMAT=image/png&service=wms&version=1.1.0&request=getmap&layers="+tema+"' />testar getmap</a>";
			ins +=
				"<p><a target=blank href='"+servico+"SRS=EPSG:4618&WIDTH=500&HEIGHT=500&BBOX=-76.5125927,-39.3925675209,-29.5851853,9.49014852081&FORMAT=image/png&service=wms&version=1.1.0&request=getlegendgraphic&layers="+tema+"' />testar getLegendGraphic</a>";
			ins +=
				"<p><a target=blank href='"+servico+"format=application/openlayers&bbox=-76.5125927,-39.3925675209,-29.5851853,9.49014852081&layers="+tema+"' />visualizar com openLayers</a>";
			ins +=
				"<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>";
			ins +=
				"<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>";
			ins +=
				"<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>";
			ins +=
				"<p><a target=blank href='"+servico+"OUTPUTFORMAT=kmz&bbox=-76.5125927,-39.3925675209,-29.5851853,9.49014852081&service=wfs&version=1.1.0&request=getfeature&layers="+tema+"&typeName="+tema+"' />download KMZ</a>";
			ins +=
				"<p><a target=blank href='"+servico+"OUTPUTFORMAT=geojson&bbox=-76.5125927,-39.3925675209,-29.5851853,9.49014852081&service=wfs&version=1.1.0&request=getfeature&layers="+tema+"&typeName="+tema+"' />GeoJson</a>";
			ins +=
				"<p><a target=blank href='ferramentas/recline/default.php?tema="+tema+"' />Explore a tabela de atributos</a>";

			if (!$i("panellistaarquivos")) {
				YAHOO.namespace("datadownloadLista");
				YAHOO.datadownloadLista.panel = new YAHOO.widget.Panel("panellistaarquivos", {
					zIndex : 2000,
					iframe : false,
					width : "450px",
					align : "left",
					visible : false,
					draggable : true,
					close : true,
					modal : true
				});
				YAHOO.datadownloadLista.panel.setHeader("OGC");
				YAHOO.datadownloadLista.panel.setBody("");
				YAHOO.datadownloadLista.panel.setFooter("");
				YAHOO.datadownloadLista.panel.render(document.body);
				YAHOO.datadownloadLista.panel.center();
				YAHOO.datadownloadLista.panel.cfg.setProperty("y", 100);
			}
			;
			YAHOO.datadownloadLista.panel.setBody(ins);
			YAHOO.datadownloadLista.panel.show();
			$i("bm").innerHTML = i3GEO.social.bookmark(servico);
			//document.getElementById("corpo").innerHTML = ins
		}
		var loc = window.location.href;
		var temp = loc.split("/ogc.htm");
		g_locaplic = temp[0];
		i3GEO.configura.locaplic = g_locaplic;

		$i("bm1").innerHTML = i3GEO.social.bookmark(loc);
		//i3GEO.social.compartilhar("curtir", loc, loc, "comtotal");

		g_arvoreClicks = "";
		i3GEO.idioma.IDSELETOR = "bandeiras";
		i3GEO.idioma.mostraSeletor();
		i3GEO.arvoreDeTemas.INCLUISISTEMAS = false;
		i3GEO.arvoreDeTemas.FILTRAOGC = true;
		i3GEO.arvoreDeTemas.INCLUIWMS = false;
		i3GEO.arvoreDeTemas.INCLUIWMSMETAESTAT = true;
		i3GEO.arvoreDeTemas.INCLUIREGIOES = false;
		i3GEO.arvoreDeTemas.INCLUIINDIBR = false;
		i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluiArvore = false;
		i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluibusca = false;
		i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir = false;
		i3GEO.arvoreDeTemas.INCLUIMAPASCADASTRADOS = true;
		i3GEO.arvoreDeTemas.OPCOESADICIONAIS.flutuante = false;
		i3GEO.arvoreDeTemas.INCLUIESTRELAS = false;
		i3GEO.arvoreDeTemas.TIPOBOTAO = "radio";
		i3GEO.arvoreDeTemas.cria("", g_locaplic, "arvoreTemas", "ogc_endereco\(this\)");
		//verifica se deve abrir de imediato a janela de links
		temp = loc.split("temaOgc=");
		if(temp[1]){
			temaOgc = temp[1];
			temaOgc = temaOgc.split("&");
			temaOgc = temaOgc[0];
			var botao = {
				checked: false,
				name: temaOgc,
				value: temaOgc
			};
			ogc_endereco(botao);
		}
	</script>
</body>
</html>