Skip to content

Instantly share code, notes, and snippets.

View nickpeihl's full-sized avatar

Nick Peihl nickpeihl

View GitHub Profile
@celoyd
celoyd / hi8-anim-howto.md
Last active August 1, 2022 15:37
A way to make Himawari-8 animations

Himawari-8 animation tutorial

Here’s how to make animations like this one. It requires intermediate Unix command-line knowledge, to install some tools and to debug if they don’t work. You’ll need these utilities:

  • curl (or you can translate to wget)
  • convert and montage, part of ImageMagick
  • ffmpeg, plus whatever codecs
  • parallel, for iteration that’s nicer than shell for loops or xargs
  • run everything in zsh for leading 0s in numerical ranges to work
@nickpeihl
nickpeihl / README.md
Last active April 5, 2017 16:24
NDVI With ArcGIS Image Services and Geojson.io
  1. Go here: http://geojson.io/#map=18/34.12668/-84.11506

  2. Open the browser developer console - ctrl + shift + k on Firefox or ctrl + shift + i on Chrome.

  3. Type the following into the browser console: window.api.map.addLayer(L.tileLayer('http://tileify-ags.herokuapp.com/tiles/{z}/{x}/{y}?url=https%3A%2F%2Fgis.apfo.usda.gov%2Farcgis%2Frest%2Fservices%2FNAIP%2FGeorgia_2015_1m%2FImageServer&renderingRule=%7B%20%20%20%22rasterFunction%22%20%3A%20%22NDVI%22%2C%20%20%20%22rasterFunctionArguments%22%20%3A%20%7B%20%20%20%20%20%22VisibleBandID%22%20%3A%202%2C%20%20%20%20%20%22InfraredBandID%22%20%3A%203%20%20%20%7D%2C%20%20%20%22variableName%22%20%3A%20%22Raster%22%20%7D'));

  4. Try replacing the ArcGIS Image Service URL with a different URL from here. Be sure to encode the URL correctly. For help encoding go here

[More info on ArcGIS Image Service Raster

@IvanSanchez
IvanSanchez / L.TileLayer.ServiceWorker.js
Created October 30, 2015 14:40
Preview of L.TileLayer.ServiceWorker.js
if ('serviceWorker' in navigator && !this.hasOwnProperty('ServiceWorkerGlobalScope')) {
var ownUrl = new URL(document.currentScript.src);
// Before the worker inits, keep tileserver URLs temporarily here
var oldTileLayerProto = L.extend({}, L.TileLayer.prototype);
L.TileLayer._urlsToWatch = [];
L.TileLayer.prototype.initialize = function(url, options) {
@MateoV
MateoV / difference.js
Created August 4, 2015 19:18
Use Tile Reduce and OSM QA Tiles to find the difference between OSM roads and Tiger roads
var turf = require('turf'),
flatten = require('geojson-flatten'),
normalize = require('geojson-normalize'),
tilebelt = require('tilebelt');
module.exports = function(tileLayers, tile, done) {
// concat feature classes and normalize data
var tigerRoads = normalize(tileLayers.tiger.tiger20062014);
var osmData = normalize(tileLayers.osmdata.migeojson);
@bobbygrace
bobbygrace / trello-css-guide.md
Last active May 15, 2024 16:01
Trello CSS Guide

Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets


Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?

@iandees
iandees / dlib_plus_osm.md
Last active May 30, 2018 19:07
Detecting Road Signs in Mapillary Images with dlib C++

image

I've been interested in computer vision for a long time, but I haven't had any free time to make any progress until this holiday season. Over Christmas and the New Years I experimented with various methodologies in OpenCV to detect road signs and other objects of interest to OpenStreetMap. After some failed experiments with thresholding and feature detection, the excellent /r/computervision suggested using the dlib C++ module because it has more consistently-good documentation and the pre-built tools are faster.

After a day or two figuring out how to compile the examples, I finally made some progress:

Compiling dlib C++ on a Mac with Homebrew

  1. Clone dlib from Github to your local machine:
@mbostock
mbostock / .block
Last active January 14, 2023 04:21
Screen Recording to GIF
license: gpl-3.0
@stdavis
stdavis / SpecTopics.js
Last active August 29, 2015 13:57
Custom dojo/topic Jasmine Matchers
require([
'matchers/Topics',
'dojo/topic'
], function (
Topics,
dojoTopic
) {
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active April 25, 2024 02:01
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

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