This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Watershed SFDo | |
r.watershed --o -a elevation=srtm.clip accumulation=accumulation drainage=drainage convergence=5 threshold=123 | |
#Without SFDo | |
#r.watershed elevation=srtm.clip threshold=555 accumulation=accumulation1 drainage=drainage1 basin=ba500 | |
#r.watershed elevation=filled_clip_srtm_gramame threshold=123 accumulation=accum drainage= dirs basin=ba1000 stream=streams | |
#Stream extraction: | |
r.stream.extract --o elevation=srtm.clip threshold=123 d8cut=infinity mexp=0 stream_rast=streams direction=drain_dir stream_vect=v_streams |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#change the SRID if necessary | |
for f in *.shp | |
do | |
shp2pgsql -s 29185 $f `basename $f .shp` > `basename $f .shp`.sql | |
done | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 - Configurar a conexão com o banco PostgreSQL/PostGIS “ghydroweb”: | |
db.connect driver=pg database="host=localhost,dbname=ghydroweb" | |
#db.connect database=host=localhost,dbname=ghydroweb schema=grass | |
db.login user=marcello pass=x | |
db.connect -p | |
db.tables -p | |
2 – Configurar a Region para o DEM: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--ATUALIZAÇÃO DO SIGA: | |
ALTER TABLE ms_1213_verao RENAME ucs TO ms_ucs; | |
ALTER TABLE ms_1213_verao RENAME hectares TO ha; | |
ALTER TABLE ms_1213_verao RENAME the_geom TO geom; | |
GRANT SELECT ON ALL TABLES IN SCHEMA public TO webgis; | |
GRANT SELECT ON ALL TABLES IN SCHEMA public TO webgis; | |
-- EM SEGUIDA DEVE-SE | |
--CRIAR OS MAPFILES DA NOVA SAFRA |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Posto_plu extends CI_Controller { | |
function __construct() { | |
parent::__construct(); | |
} | |
function index() { | |
$data['titulo'] = "Cadastro de Postos Pluviométricos"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<style> | |
body {font-size: 12px; padding: 5px;} | |
</style> | |
<title>Editar Posto Pluviométrico</title> | |
</head> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- QUANDO OS DADOS ESTIVEREM EM COORDENADAS GEOGRÁFICAS, PARA REALIZAR A MEDIÇÃO DE DISTÂNCIAS E DE ÁREAS, | |
-- DEVE-SE UTILIZAR O COMANDO Geography(geom), EX. : | |
SELECT ST_Distance(Geography(a.geom), Geography(b.geom))/1000 as dist_km, | |
ST_Area(Geography(a.geom)) AS a1, ST_Area(Geography(b.geom)) AS b1 | |
FROM municipios_pb a, municipios_pb b | |
WHERE a.nome = 'Patos' AND b.nome = 'Campina Grande'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo mkdir -p /usr/local/pgsql/data | |
sudo chown -R postgres:postgres /usr/local/pgsql/ | |
sudo su - posgresql | |
cd /usr/lib/postgresql/8.2/bin/ | |
./initdb -D /usr/local/pgsql/data | |
./postgres -D /usr/local/pgsql/data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//após a instalação, mudar as permissões: | |
$ chmod -R 755 app/storage | |
// Rota passando parametros para um controller: | |
Route::get('admin/categorias/{id}', 'CategoriasController@destroy'); | |
relacoes n para n : | |
http://vegibit.com/many-to-many-relationships-in-laravel/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>EX 2 - Leaflet</title> | |
<link rel="stylesheet" href="lib/leaflet.css" /> | |
<script src="lib/leaflet.js"></script> | |
<script src="lib/Google.js"></script> | |
<script src="lib/Bing.js"></script> | |
<script src="http://maps.google.com/maps/api/js?v=3.2&sensor=false"></script> | |
</head> |
OlderNewer