Skip to content

Instantly share code, notes, and snippets.

View springmeyer's full-sized avatar

Dane Springmeyer springmeyer

View GitHub Profile
Process: Xcode [76148]
Path: /Developer-old/Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.Xcode
Version: 3.2.6 (1761)
Build Info: DevToolsIDE-18070000~38
Code Type: X86-64 (Native)
Parent Process: launchd [195]
Date/Time: 2011-08-15 11:39:56.406 -0700
OS Version: Mac OS X 10.6.8 (10K549)
Index: utils/shapeindex/shapeindex.cpp
===================================================================
--- utils/shapeindex/shapeindex.cpp (revision 3106)
+++ utils/shapeindex/shapeindex.cpp (working copy)
@@ -23,6 +23,7 @@
#include <iostream>
+#include <fstream>
#include <vector>
// attachdb usage
> ds.featureset().next().attributes()
{ '"1995"': 0,
'"1996"': 0,
'"1997"': 0,
'"1998"': 0,
'"1999"': 0,
'"2000"': 0,
'"2001"': 0,
'"2002"': 0,
@springmeyer
springmeyer / create_index.js
Created August 10, 2011 23:41
create an sqlite rtree spatial index using node-sqlite3 and node-mapnik
/*
wget http://dl.dropbox.com/u/342088/10m-us-parks-area.sqlite
ogr2ogr -f SQLite parks.sqlite ParkPly_900913.shp
dane$ ogr2ogr -f SQLite parks.sqlite ~/Documents/MapBox/cache/2976a0c1-10m-us-parks-area/2976a0c1-10m-us-parks-area.shp
*/
$ otool -L _mapnik.node
_mapnik.node:
/usr/lib/libexpat.1.dylib (compatibility version 7.0.0, current version 7.2.0)
/usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
/usr/lib/libltdl.7.dylib (compatibility version 9.0.0, current version 9.2.0)
/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3)
/usr/lib/libxml2.2.dylib (compatibility version 10.0.0, current version 10.3.0)
/usr/lib/libicucore.A.dylib (compatibility version 1.0.0, current version 40.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.0)
@springmeyer
springmeyer / zlib_arch.sh
Created August 8, 2011 21:18
zlib with 2 archectures
$ file node_modules/mbtiles/node_modules/zlib/lib/zlib_bindings.node
node_modules/mbtiles/node_modules/zlib/lib/zlib_bindings.node: Mach-O universal binary with 2 architectures
node_modules/mbtiles/node_modules/zlib/lib/zlib_bindings.node (for architecture x86_64): Mach-O 64-bit bundle x86_64
node_modules/mbtiles/node_modules/zlib/lib/zlib_bindings.node (for architecture i386): Mach-O bundle i386
cairo-pdf-surface.c:5670:13: warning: implicit conversion from enumeration type 'enum _cairo_status' to different
enumeration type 'cairo_int_status_t' (aka 'enum _cairo_int_status') [-Wconversion]
return CAIRO_STATUS_SUCCESS;
~~~~~~ ^~~~~~~~~~~~~~~~~~~~
@springmeyer
springmeyer / test_universal_node.sh
Created August 8, 2011 17:59
test osx universal (32bit + 64bit) node.js executable
# if you have a mac running osx >= 10.6 with an "intel core duo"
# 32 bit processor as per http://support.apple.com/kb/ht3696
# could you run this test and comment here if it works?
curl -o node-universal.tar.bz2 http://tilemill-osx.s3.amazonaws.com/node-universal.tar.bz2
tar xvf node-universal.tar.bz2
./node-universal # you should see a prompt like > and no errors.
# try some math:
{
"srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs +over",
"Stylesheet": [
"style.mss"
],
"Layer": [
{
"id": "world",
"name": "world",
"srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs +over",
{
"srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs +over",
"Stylesheet": [
"style.mss"
],
"Layer": [
{
"id": "world",
"name": "world",
"srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs +over",