Skip to content

Instantly share code, notes, and snippets.

View hallahan's full-sized avatar

Nick Hallahan hallahan

View GitHub Profile
function processGeoJson(geoJson) {
var pointArr, features, i, len, feature, pointObj, lng, lat, webMerc;
pointArr = [];
features = geoJson.features;
len = features.length;
for (i = 0; i < len; i++) {
feature = features[i];
pointObj = features[i].properties;
{"geometry": {"type": "MultiPolygon", "coordinates": [[[[125.47078704800009, 9.800549507000113], [125.49756622300015, 9.793886185000076], [125.51200103800022, 9.769249916000106], [125.54074096700009, 9.782110214000085], [125.5368499760001, 9.771360397000095], [125.56020355200013, 9.753933907000118], [125.57565307600015, 9.76241493200007], [125.56738281200006, 9.739314079000081], [125.58953094500009, 9.720065117000075], [125.587890625, 9.732520103000084], [125.60102844200003, 9.72792148600007], [125.61128997800012, 9.731657028000086], [125.60978698700006, 9.712122917000045], [125.587966919, 9.70973777800009], [125.60649871800007, 9.681805611000073], [125.60633087200011, 9.644991875000088], [125.63848114000007, 9.614522934000092], [125.68240356400008, 9.608234406000065], [125.66980743400012, 9.590277672000084], [125.69093322800006, 9.605554581000106], [125.70585632300003, 9.584583282000054], [125.74122619600007, 9.592932701000052], [125.74334716800007, 9.568964958000052], [125.86193084700005, 9.540605545000076]
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
/**
* Created by Nicholas Hallahan <nhallahan@spatialdev.com>
* on Tue Mar 11 2014
*/
var pg = require('pg');
var S = require('string');
var settings = require('./settings').pg;
var salesforce = require('./salesforce');
var salesforceQueries = require('./salesforce-queries');
@hallahan
hallahan / file1.txt
Created April 17, 2014 22:36
the description for this gist
WHo made this?
@hallahan
hallahan / washington.geojson
Last active August 29, 2015 14:00
The State of Washington from GADM (Very Simplified)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hallahan
hallahan / experiment.js
Created April 24, 2014 18:33
Attempt at basic usage of vector-tile-js
/**
* Created by Nicholas Hallahan <nhallahan@spatialdev.com>
* on 4/23/14.
*/
var fs = require('fs');
var VectorTile = require('vector-tile');
var testPbf = fs.readFileSync('./node_modules/vector-tile/test/fixtures/14-8801-5371.vector.pbf');
var testVct = new VectorTile(testPbf);
# -----------------------------
# PostgreSQL configuration file
# -----------------------------
#
# This file consists of lines of the form:
#
# name = value
#
# (The "=" is optional.) Whitespace may be used. Comments are introduced with
# "#" anywhere on a line. The complete list of parameter names and allowed
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hallahan
hallahan / nginx.conf
Created October 31, 2014 21:27
Showing the NGINX Config Files in SpatialServer
user www-data;
worker_processes 4;
pid /run/nginx.pid;
events {
worker_connections 768;
# multi_accept on;
}
http {