Skip to content

Instantly share code, notes, and snippets.

View cspanring's full-sized avatar

Christian Spanring cspanring

View GitHub Profile
@cspanring
cspanring / QGIS cmake in homebrew
Created January 31, 2011 01:38
homebrew formula cmake arguments and output for QGIS.
cmake -DCMAKE_INSTALL_PREFIX=~/Applications -DCMAKE_BUILD_TYPE=Release -DCMAKE_BUILD_TYPE=MinSizeRel -DWITH_INTERNAL_SPATIALITE=TRUE -DGEOS_INCLUDE_DIR=/usr/local/Cellar/geos/3.2.2/include -DGEOS_LIBRARY=/usr/local/Cellar/geos/3.2.2/lib/libgeos_c.dylib -DGDAL_INCLUDE_DIR=/usr/local/Cellar/gdal/1.7.3/include -DGDAL_LIBRARY=/usr/local/Cellar/gdal/1.7.3/lib/libgdal.dylib -DPYTHON_EXECUTABLE=/usr/local/Cellar/python/2.7.1/bin/python
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
@cspanring
cspanring / sqlconfig.xml
Created February 10, 2011 21:21
weave db configuration
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlConfig SYSTEM "/opt/weave_data/config/sqlconfig.dtd">
<sqlConfig serverName="MAPC Weave">
<connection database="geonode" dbms="PostGreSQL" ip="localhost" name="GeoNode" pass="***" port="5432" user="user"/>
<databaseConfig connection="GeoNode" dataConfigTable="conf_attr" geometryConfigTable="conf_geom" schema="weave"/>
<connection database="gisdata" dbms="PostGreSQL" ip="0.0.0.0" name="MAPC_GISDATA" pass="***" port="5432" user="user"/>
<connection database="postgres" dbms="PostGreSQL" ip="0.0.0.0" name="MAPC_Weave" pass="***" port="5432" user="user"/>
<databaseConfig connection="MAPC_Weave" dataConfigTable="config_attributecolumn" geometryConfigTable="config_geometry" schema="weave"/>
</sqlConfig>
@cspanring
cspanring / install-weave-nightly.sh
Created February 11, 2011 16:09
download and install nighly weave builds
#!/bin/bash
# download and install nightly weave build
# steps:
# download
# extract
# copy weave client files to www dir
# remove old weave server app from tomcat
# copy weave server app to tomcat dir
{
category : "", // Required Single category from (http://opencivicdata.com/#categories-wg)
properties : {} // Required Common bin for domain specific properties from from (http://opencivicdata.com/#properties-wg)
meta : { // Optional: Simple Dublin Core Metadata Element Set
title : "",
creator : "",
subject : "",
description : "",
publisher : "",
contributor : "",
@cspanring
cspanring / bike-rack.json
Created February 14, 2011 00:22
GeoJSON FeatureCollection example, geometry and properties.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cspanring
cspanring / 29K gzipped
Created May 25, 2011 21:27
OpenLayers build config for mobile
[first]
[last]
[include]
OpenLayers/Map.js
OpenLayers/Kinetic.js
OpenLayers/Projection.js
OpenLayers/Layer/SphericalMercator.js
OpenLayers/Layer/XYZ.js
@cspanring
cspanring / readme-macosx.md
Created July 13, 2011 19:44
Weave Mac OS X installation instructions

Weave installation on Mac OS X

Dependencies

We are using homebrew as package manager to install all Weave dependencies.

Install PostgreSQL and Apache Tomcat

$ brew install postgresql tomcat
@cspanring
cspanring / python2.6 for homebrew
Created July 14, 2011 15:00 — forked from voidfiles/python2.6 for homebrew
Python 2.6.x Homebrew Formula
require 'formula'
<<-COMMENTS
This is the Homebrew formula for Python.
Versions
--------
This formula is currently tracking version 2.6.x.
@cspanring
cspanring / openlayers-click-handler.js
Created July 19, 2011 02:43
custom openlayers click handler compatible with touch events
// Create click handler
OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, {
defaultHandlerOptions: {
'single': true,
'double': false,
'pixelTolerance': 0,
'stopSingle': false,
'stopDouble': false
},
initialize: function(options) {
@cspanring
cspanring / geography-class.xml
Created August 10, 2011 17:57
TileMill geography-class
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<Map srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over" background-color="#ddeeff">
<FontSet name="fontset-0">
<Font face-name="Futura Medium"/>
<Font face-name="Function Pro Medium"/>
<Font face-name="Ubuntu Regular"/>
<Font face-name="Trebuchet MS Regular"/>
<Font face-name="DejaVu Sans Book"/>
</FontSet>
<FontSet name="fontset-1">