Skip to content

Instantly share code, notes, and snippets.

View dmfenton's full-sized avatar

Daniel Fenton dmfenton

  • JLL Technologies
  • Washington, DC
  • X @Dmfenton
View GitHub Profile
@dmfenton
dmfenton / CopyContent.py
Created August 7, 2014 19:38
Copy content.py from ArcGIS Portal Resources edited to fix tag importing issue
#!/usr/bin/env python
# Requires Python 2.7+
# Sample Usage:
# python copyContent.py <sourcePortal> <sourceAdmin> <sourcePassword>
# <query> <destinationPortal> <destAdmin>
# <destPassword> <destOwner> <destFolder>
import urllib
import json
@dmfenton
dmfenton / geojson.json
Last active August 29, 2015 14:08 — forked from fge/geojson.json
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "http://json-schema.org/geojson/geojson.json#",
"title": "Geo JSON object",
"description": "Schema for a Geo JSON object",
"type": "object",
"required": [ "type" ],
"oneOf": [
{ "$ref": "http://json-schema.org/geojson/geometry.json#" },
{ "$ref": "#/definitions/geometryCollection" },
@dmfenton
dmfenton / data.json
Last active August 29, 2015 14:13
ArcGIS Open Data DCAT Sample
[
{
"title": "Specialty Lighting",
"description": "",
"keyword": [
"DC GIS",
"OCTO",
"Washington DC",
"District of Columbia",
"OCTO Geospatial",
@dmfenton
dmfenton / translate.js
Last active August 29, 2015 14:24 — forked from Marak/echoHttpRequest.js
translate wkids to wkts
This file has been truncated, but you can view the full file.
var geographicCodes = {"3819":{"name":"GCS_HD1909","wkt":"GEOGCS[\"GCS_HD1909\",DATUM[\"D_Hungarian_Datum_1909\",SPHEROID[\"Bessel_1841\",6377397.155,299.1528128]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]]"},"3821":{"name":"GCS_TWD_1967","wkt":"GEOGCS[\"GCS_TWD_1967\",DATUM[\"D_TWD_1967\",SPHEROID[\"GRS_1967_Truncated\",6378160.0,298.25]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]]"},"3824":{"name":"GCS_TWD_1997","wkt":"GEOGCS[\"GCS_TWD_1997\",DATUM[\"D_TWD_1997\",SPHEROID[\"GRS_1980\",6378137.0,298.257222101]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]]"},"3889":{"name":"GCS_IGRS","wkt":"GEOGCS[\"GCS_IGRS\",DATUM[\"D_Iraqi_Geospatial_Reference_System\",SPHEROID[\"GRS_1980\",6378137.0,298.257222101]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]]"},"3906":{"name":"GCS_MGI_1901","wkt":"GEOGCS[\"GCS_MGI_1901\",DATUM[\"D_MGI_1901\",SPHEROID[\"Bessel_1841\",6377397.155,299.1528128]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199
@dmfenton
dmfenton / Translate.js
Last active September 24, 2018 19:39
Translate Proj Codes
This file has been truncated, but you can view the full file.
module['exports'] = function echoHttp (hook) {
var geographicCodes = {"3819":{"name":"GCS_HD1909","wkt":"GEOGCS[\"GCS_HD1909\",DATUM[\"D_Hungarian_Datum_1909\",SPHEROID[\"Bessel_1841\",6377397.155,299.1528128]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]]"},"3821":{"name":"GCS_TWD_1967","wkt":"GEOGCS[\"GCS_TWD_1967\",DATUM[\"D_TWD_1967\",SPHEROID[\"GRS_1967_Truncated\",6378160.0,298.25]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]]"},"3824":{"name":"GCS_TWD_1997","wkt":"GEOGCS[\"GCS_TWD_1997\",DATUM[\"D_TWD_1997\",SPHEROID[\"GRS_1980\",6378137.0,298.257222101]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]]"},"3889":{"name":"GCS_IGRS","wkt":"GEOGCS[\"GCS_IGRS\",DATUM[\"D_Iraqi_Geospatial_Reference_System\",SPHEROID[\"GRS_1980\",6378137.0,298.257222101]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]]"},"3906":{"name":"GCS_MGI_1901","wkt":"GEOGCS[\"GCS_MGI_1901\",DATUM[\"D_MGI_1901\",SPHEROID[\"Bessel_1841\",6377397.155,299.1528128]],PRIMEM[\"
This file has been truncated, but you can view the full file.
module['exports'] = function echoHttp (hook) {
var geographicCodes = {"3819":{"name":"GCS_HD1909","wkt":"GEOGCS[\"GCS_HD1909\",DATUM[\"D_Hungarian_Datum_1909\",SPHEROID[\"Bessel_1841\",6377397.155,299.1528128]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]]"},"3821":{"name":"GCS_TWD_1967","wkt":"GEOGCS[\"GCS_TWD_1967\",DATUM[\"D_TWD_1967\",SPHEROID[\"GRS_1967_Truncated\",6378160.0,298.25]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]]"},"3824":{"name":"GCS_TWD_1997","wkt":"GEOGCS[\"GCS_TWD_1997\",DATUM[\"D_TWD_1997\",SPHEROID[\"GRS_1980\",6378137.0,298.257222101]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]]"},"3889":{"name":"GCS_IGRS","wkt":"GEOGCS[\"GCS_IGRS\",DATUM[\"D_Iraqi_Geospatial_Reference_System\",SPHEROID[\"GRS_1980\",6378137.0,298.257222101]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]]"},"3906":{"name":"GCS_MGI_1901","wkt":"GEOGCS[\"GCS_MGI_1901\",DATUM[\"D_MGI_1901\",SPHEROID[\"Bessel_1841\",6377397.155,299.1528128]],PRIMEM[\"
<html><body><img src="http://cdn.citylab.com/media/img/citylab/2013/08/30/2011/lead_large.png"></img></body></html>
@dmfenton
dmfenton / config.md
Last active April 13, 2016 15:07
Koop S3 Config
{
  "filesystem": {
    "s3": {
      "bucket": $S3_BUCKET,
      "endpoint" $S3-ENDPOINT //optional https://forums.aws.amazon.com/ann.jspa?annID=3112
    }
  }
}

Lessons learned AWS GeoSpatial Big Data System

A team working under a DARPA contract moved a system for geolocating iamges from a local cluster to AWS.

  • aws s3 => always sync thrice
  • do your own key store in the root of your bucket?
  • map high volume IO to local ephemeral disks
  • if you are using a NAT within a VPC, know that all traffic moves through that instance so size it accordingly
  • snapshots are cheap, compressed, differential
  • https://libcloud.apache.org/ is a library that abstracts different cloud providers into the same API
/* @flow */
'use strict';
var path = require('path');
var config = require('config');
var Winnow = require('winnow');
var FeatureParser = require('feature-parser');
var createKoop = require('koop');
var koop = createKoop(config);