Skip to content

Instantly share code, notes, and snippets.

View briantjacobs's full-sized avatar

Brian Jacobs briantjacobs

View GitHub Profile
@radcliff
radcliff / geojson_helper.rb
Last active August 29, 2015 14:04
drought-monitor-api helpers
module GeojsonHelper
# this method takes in a RGeo geometry object and returns a GeoJSON object
def to_geojson(geometry_collection)
geojson_object = {}
geojson_object["type"] = "FeatureCollection"
geojson_object["features"] = []
geometry_collection.each_with_index do |record, index|
@rtrouton
rtrouton / gist:1cad387e4a93317fedfc
Created August 26, 2014 16:45
First Boot Package Install Automated Software Update
#!/bin/bash
# Script to run softwareupdate during a First Boot Package Install run.
#
# SWULER is used to allow stdout for No Software Updates Available.
#
# SWUNotAvailable is used to allow stdout for the software update server
# not being available.
FBPILog="/var/log/firstbootpackageinstall.log"
class TilesController < ApplicationController
around_filter :up_s3
def tile_response(map)
respond_to do |format|
format.png {
send_data map.to_png, :content_type => Mime::Type.lookup_by_extension("png"), :disposition => "inline"
}
end
end
@norm
norm / checksoftwareupdate
Created February 24, 2010 23:49
wrapper around 'softwareupdate -l' to silence it when no updates exist
#!/bin/sh
#
# wrapper around 'softwareupdate -l' to silence it when no updates exist
# -- Mark Norman Francis <norm@cackhanded.net>
OUTPUT=`mktemp /tmp/checksoftup.XXXXX`
ERRORS=`mktemp /tmp/checksoftup.XXXXX`
# capture output to separate files
softwareupdate -l >$OUTPUT 2>$ERRORS
@ashaw
ashaw / landsat-db.rb
Last active September 19, 2015 02:24
# get the CSV from http://landsat.usgs.gov/metadata_service/bulk_metadata_files/LANDSAT_8.csv
require 'csv'
FILE = File.expand_path("..", __FILE__) + "/initial/LANDSAT_8.csv"
SCHEMA = <<-SQL
DROP TABLE "landsat8";
CREATE TABLE "landsat8" (
"sceneid" varchar(21) not null,
sensor varchar(8) not null,

This is my default career advice for people starting out in geo/GIS, especially remote sensing, adapted from a response to a letter in 2013.

I'm currently about to start a Geography degree at the University of [Redacted] at [Redacted] with a focus in GIS, and I've been finding that I have an interest in working with imagery. Obviously I should take Remote Sensing and other similar classes, but I'm the type of person who likes to self learn as well. So my question is this: What recommendations would you give to a student who is interested in working with imagery? Are there any self study paths that you could recommend?

I learned on my own and on the job, and there are a lot of important topics in GIS that I don’t know anything about, so I can’t give comprehensive advice. I haven’t arrived anywhere; I’m just ten minutes ahead in the convoy we’re both in. Take these recommendations critically.

Find interesting people. You’ll learn a lot more from a great professor (or mentor, or friend, or conference) o

@tmcw
tmcw / guide.md
Last active June 3, 2016 19:29
Whole Earth Guide

Whole Earth Guide

I'm not sure about this; GIS really got burned from being both a 'science' and a 'product' from the beginning, and there are blurry lines between what I think is essential and what I don't know because I never do it and am not a GIS person. Anyway.

A No-Bullshit Intro to Maps and GIS

  1. What Maps Are
  2. Data
  3. Information
  4. Transformation
@walkermatt
walkermatt / osgb_map.js
Created July 2, 2012 18:25
Leaflet Map using Proj4Leaflet to display a projected TMS base map from MapProxy
// Bounding box of our TMS that define our area of interest
var bbox = [-600000, -300000, 1300000, 1600000];
// Resolutions of our TMS that the tiles will be displayed at calculated so
// that at resolution 0 the bounds fit one 256x256 tile: (maxx - minx)/256
var res = [7421.875, 3710.9375, 1855.46875, 927.734375];
// Define the Proj4Leaflet coordinate reference system base on British National Grid
var crs = L.CRS.proj4js(
'EPSG:27700',
@oeon
oeon / landsat_notes.md
Last active April 27, 2017 05:21
notes from processing Harmony Landsat post

##This workflow is only for the pansharpened images

####red-green-blue
gdalbuildvrt -separate -q -srcnodata "0 0 0" -vrtnodata "0 0 0" rgb.vrt LC80430352013339LGN00_B4.tif LC80430352013339LGN00_B3.tif LC80430352013339LGN00_B2.tif

####NIR, SWIR, and visible red
gdalbuildvrt -separate -q -srcnodata "0 0 0" -vrtnodata "0 0 0" false.vrt LC80430352013339LGN00_B5.tif LC80430352013339LGN00_B6.tif LC80430352013339LGN00_B4.tif

####color infrared
gdalbuildvrt -separate -q -srcnodata "0 0 0" -vrtnodata "0 0 0" cir.vrt LC80430352013339LGN00_B5.tif LC80430352013339LGN00_B3.tif LC80430352013339LGN00_B4.tif

@andymason
andymason / Landsat 8 gdal processing
Last active June 19, 2017 13:08
Added projection wrap correction
#! /bin/bash
# Convert Landsat 8 GeoTIFF images into RGB pan-sharpened JPEGs.
#
# Requirements:
# * gdal http://www.mapbox.com/tilemill/docs/guides/gdal/
# * convert (image-magick)
#
# Reference info:
# http://www.mapbox.com/blog/putting-landsat-8-bands-to-work/