- Download the SDK from ESRI's website http://resources.arcgis.com/content/geodatabases/10.0/file-gdb-api
- Extract the SDK, and put the contents of the directory in a known location, I used
~/local/filegdb
. Here's an example path to one of the files:~/local/filegdb/lib/libFileGDBAPI.dylib
- I use
~/local/filegdb
so it can stay isolated in it's own place. You can put it anywhere, but the next few steps might be different. - Go into the directory containing the FileGDB SDK, e.g.
~/local/filegdb
- ESRI built these dylib's using
@rpath
's, so to avoid needing to mess withDYLD_LIBRARY_PATH
, I updated the@rpath
's usinginstall_name_tool
. There might be a more elegant way to handle this. If so, comments are welcome! - Here are the commands I used to patch the dylibs, this is not required if you want to use
DYLD_LIBRARY_PATH
yourself:
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
#!/usr/bin/env python | |
# encoding: utf-8 | |
from boto.s3.connection import S3Connection | |
AWS_ACCESS_KEY = '<aws access key>' | |
AWS_SECRET_KEY = '<aws secret key>' | |
AWS_BUCKET_NAME = '<aws bucket name>' | |
AWS_HEADERS = { | |
'Cache-Control':'max-age=31556926,public' | |
} |
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
# In-memory Cassandra-ish thingy... useful for unit tests. Maybe useful for other | |
# stuff too? No support for SuperColumns, but that should be easy enough to add. | |
import bisect | |
import copy | |
from cassandra.ttypes import NotFoundException, Column, ColumnPath, ColumnOrSuperColumn | |
class SSTable(object): |
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
/* | |
An Albers Equal Area Conic projection in javascript, for protovis. | |
For centering the contiguous states of the USA in a 800x400 div, I used: | |
var scale = pv.Geo.scale(albers(23, -96, 29.5, 45.5)) | |
.range({ x: -365, y: -375 }, { x: 1200, y: 1200 }); | |
http://mathworld.wolfram.com/AlbersEqual-AreaConicProjection.html |
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
// node.js geo polygon map tile rendering! | |
// requires https://github.com/learnboost/node-canvas and GeoJSON data files | |
// e.g. | |
// data from naturalearthdata.com converted to GeoJSON with GDAL's ogr2ogr | |
// or from datasf.org, reprojected too: | |
// ogr2ogr -f GeoJSON sfbay.js sfbay.shp -t_srs EPSG:4326 | |
var Canvas = require('./vendor/node-canvas/lib/canvas'), | |
http = require('http'), | |
fs = require('fs'); |
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
/* | |
As of version 1.1.2, Propane will load and execute the contents of | |
~Library/Application Support/Propane/unsupported/caveatPatchor.js | |
immediately following the execution of its own enhancer.js file. | |
You can use this mechanism to add your own customizations to Campfire | |
in Propane. | |
Below you'll find two customization examples. |
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
// See https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames for more details. | |
var degrees2meters = function(lon,lat) { | |
var x = lon * 20037508.34 / 180; | |
var y = Math.log(Math.tan((90 + lat) * Math.PI / 360)) / (Math.PI / 180); | |
y = y * 20037508.34 / 180; | |
return [x, y] | |
} | |
x= -77.035974 |
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
web: node app.js | |
worker: node consumer.js |
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
CREATE TYPE CDB_DensityGridPair AS ( | |
geom GEOMETRY, | |
val FLOAT | |
); | |
CREATE OR REPLACE FUNCTION CDB_DensityGrid(table_name TEXT, geom_name TEXT, dimension FLOAT) | |
RETURNS SETOF CDB_DensityGridPair AS $$ | |
DECLARE | |
BEGIN | |
RETURN QUERY | |
EXECUTE 'SELECT ST_Envelope(GEOMETRYFROMTEXT(''LINESTRING(''||(st_xmax(geom)+(seed/2))||'' ''||(st_ymax(geom)+(seed/2))||'', ''||(st_xmin(geom)-(seed/2))||'' ''||(st_ymin(geom)-(seed/2))||'')'',3857)) as geom, val FROM (SELECT '||dimension||' as seed, count(*)::float as val, |
OlderNewer