Skip to content

Instantly share code, notes, and snippets.

Install PostGIS and GeoServer on Ubuntu 13.04

PostGIS installation

Postgresql

Install the server:

sudo apt-get install postgresql-9.1 postgresql-contrib-9.1 pgadmin3

Execute the psql command under user postgres (sudo -u postgres)
and connect to database postgres (psql postgres):

@oeon
oeon / ccl.geojson
Last active August 29, 2015 14:06 — forked from anonymous/map.geojson
California Collegiate League teams/stadiums
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@oeon
oeon / gist:1263089
Created October 4, 2011 22:52 — forked from frewsxcv/gist:1262862
San Luis Obispo translation file (ogr2osm)
def translateAttributes(attrs):
if not attrs:
return
tags = {}
if int(attrs['SPD_PST']) > 0:
tags.update({'maxspeed':attrs['SPD_PST'] + ' mph'})
if attrs['FULLNAME']:
tags.update({'name:fullname':attrs['FULLNAME'],'source:maxspeed':'sign' })
@oeon
oeon / gist:3040136
Created July 3, 2012 14:39 — forked from zhm/gist:2005091
gdal configure
./configure \
--with-local=yes \
--prefix=/usr/local/gdal191 \
--with-threads \
--with-libtool \
--with-libtiff=internal \
--with-geotiff=internal \
--with-pcraster=internal \
--with-pcidsk=internal \
--with-bsb \
@oeon
oeon / Ubuntu s3fs install
Created November 1, 2012 20:53 — forked from matthewhudson/Ubuntu s3fs install
Ubuntu s3fs install & dependencies.
# Install prerequisites before compiling:
apt-get install build-essential
apt-get install libfuse-dev
apt-get install fuse-utils
apt-get install libcurl4-openssl-dev
apt-get install libxml2-dev
apt-get install mime-support
# Download and Install
wget http://s3fs.googlecode.com/files/s3fs-1.61.tar.gz
@oeon
oeon / qgis_libs.sh
Created February 12, 2013 05:25 — forked from bmount/qgis_libs.sh
sudo mkdir -p /Library/Frameworks/GDAL.framework/Versions/1.9/
sudo ln -s /usr/local/lib/libgdal.dylib /Library/Frameworks/GDAL.framework/Versions/1.9/GDAL
sudo mkdir -p /Library/Frameworks/PROJ.framework/Versions/4/
sudo ln -s /usr/local/Cellar/proj/4.8.0/lib/libproj.dylib /Library/Frameworks/PROJ.framework/Versions/4/PROJ
# did not work: sudo ln -s `pwd`/libgeos.dylib /Library/Frameworks/GEOS.framework/Versions/3/GEOS
# did work:
# $PWD is /usr/local/Cellar/geos/3.3.6/lib
sudo ln -s `pwd`/libgeos_c.1.dylib /Library/Frameworks/GEOS.framework/Versions/3/GEOS
sudo mkdir -p /Library/Frameworks/SQLite3.framework/Versions/3/
sudo ln -s /usr/local/Cellar/sqlite/3.7.15/lib/libsqlite3.0.8.6.dylib /Library/Frameworks/SQLite3.framework/Versions/3/SQLite3
@oeon
oeon / map.geojson
Created August 13, 2013 16:57 — forked from anonymous/map.geojson
via:geojson.io
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@oeon
oeon / map.geojson
Created August 14, 2013 21:35 — forked from anonymous/map.geojson
via:geojson.io
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@oeon
oeon / map.geojson
Created August 14, 2013 23:08 — forked from anonymous/map.geojson
via:geojson.io
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@oeon
oeon / fulcrum_download_timedatestamp.py
Last active May 11, 2016 17:54 — forked from bmcbride/fulcrum_download.py
Python script for fetching a Fulcrum data share and saving it locally with a date & time stamp.
import urllib2
import datetime
def timeStamped(fname, fmt='%Y-%m-%d-%H-%M-%S_{fname}'):
return datetime.datetime.now().strftime(fmt).format(fname=fname)
url = 'https://web.fulcrumapp.com/shares/6e158acd08cacfad.csv'
u = urllib2.urlopen(url)
localFile = open('fulcrum_data.csv', 'w')
localFile.write(u.read())
localFile.close()
with open(timeStamped('fulcrum_data.csv'),'w') as outf: