Skip to content

Instantly share code, notes, and snippets.

View maning's full-sized avatar

Maning Sambale maning

View GitHub Profile
@maning
maning / export.py
Created January 12, 2012 01:54 — forked from rosskarchner/export.py
extract tiles from an mbtiles file
import sqlite3, os
conn = sqlite3.connect('Mills1860.mbtiles')
results=conn.execute('select * from tiles').fetchall()
for result in results:
zoom, column, row, png= result
try:
os.makedirs('%s/%s/' % (zoom, row))
@maning
maning / wfs2postgis.sh
Created September 27, 2012 01:28 — forked from walkermatt/wfs2postgis.sh
WFS to PostGIS
# Example of downloading all data from a GeoServer WFS server
# and loading it into a PostGIS database. Use with caution
# as you could put a lot of load on someone's server if they
# host a lot of data which might make them sad.
# In response to: http://underdark.wordpress.com/2012/09/26/wfs-to-postgis-in-3-steps/
BASEURL="http://data.wien.gv.at/daten/geoserver/ows?service=WFS&version=1.1.0"
for LAYERNAME in `wget -qO- $BASEURL"&request=GetCapabilities" | xpath -q -e "//FeatureType/Name/text()"` ; do
PARTS=(${LAYERNAME//:/ })
#!/usr/bin/perl
# Create index.html with a list of all files.
# Written by Ilya Zverev, licensed WTFPL.
use strict;
use POSIX qw(strftime);
use HTML::Template;
use File::Basename;
use Getopt::Long;

Mabuhay!

Welcome to the Open Source for Geography developers training.

This week we will learn about the basic building blocks for web based gis systems and desktop analysis tools. We will cover topics such as Git/Github, Postgis, GeoServer, Tilemill, GeoNode, QGIS and Inasafe. During the training, there will be tutorials on each of the tools and will work together on a prototype for a web based flood impact analysis tool.

This gist will be both our agenda and minutes document. It contains links to the training materials as well as the description of each activity.

@maning
maning / index.html
Last active December 21, 2015 20:29
Compare OSM
<!DOCTYPE html>
<html>
<head>
<script src='http://api.tiles.mapbox.com/mapbox.js/v0.6.7/mapbox.js'></script>
<link href='http://api.tiles.mapbox.com/mapbox.js/v0.6.7/mapbox.css' rel='stylesheet' />
<style>
body { margin:0; padding:0; }
#map { position:absolute; top:0; bottom:0; width:100%; }
</style>
</head>
@maning
maning / gabysigns2.txt
Created September 3, 2013 10:49
Gaby's Vital Signs Dengue 1 episode
date pulse respiratory temperature
20130829 2000 112 24 36.5
20130829 2400 107 26 38.9
20130830 0400 83 26 38.6
20130830 0800 110 26 38.7
20130830 1200 127 28 37
20130830 1600 96 24 37
20130830 2000 92 24 37.4
20130830 2400 87 24 38.3
20130831 0400 74 21 36.8
@maning
maning / map.geojson
Last active December 29, 2015 12:59
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@maning
maning / bukidnon_aws
Last active December 31, 2015 19:39
CDO Watershed Sensors
time rainfall temperature humidity pressure
2013-10-22 13:15:00 0 26.5 62.8 941.23
2013-10-22 13:30:00 0 27.4 58.6 941.23
2013-10-22 13:45:00 0 26 67.3 941.1
2013-10-22 14:00:00 0 26 68.2 940.83
2013-10-22 14:30:00 0 26 66.3 941.23
2013-10-22 14:45:00 0 25.8 67.5 941.1
2013-10-22 15:00:00 0 25.5 71.1 941.36
2013-10-22 15:30:00 0 25.1 72.5 941.36
2013-10-22 16:15:00 0 24.2 82.6 941.63
@maning
maning / data.tsv
Last active December 31, 2015 19:49
Chained Signs
We can make this file beautiful and searchable if this error is corrected: No tabs found in this TSV file in line 0.
date pulse respiratory temperature
20130829 2000 112 24 36.5
20130829 2400 107 26 38.9
20130830 0400 83 26 38.6
20130830 0800 110 26 38.7
20130830 1200 127 28 37
20130830 1600 96 24 37
20130830 2000 92 24 37.4
20130830 2400 87 24 38.3
20130831 0400 74 21 36.8
@maning
maning / data.tsv
Last active December 31, 2015 19:49
date high low
20131022 27.4 20.6
20131023 28.4 20.5
20131024 28.9 19.7