Skip to content

Instantly share code, notes, and snippets.

View celoyd's full-sized avatar

Charlie Loyd celoyd

View GitHub Profile
@celoyd
celoyd / simple-l8-pan-draft.py
Last active August 29, 2015 14:02
do not use this
# PRE-ALPHA!
import asyncio
import rasterio as rio
import numpy as np
from rasterio.warp import reproject, RESAMPLING
'''
./pan.py print/LC81100362014076LGN00/*B{4,3,2,8}.TIF out.tif
# dirty l8 scaling in python
# Charlie Loyd, fall 2013
# note use of arbitrary 160000 scale factor in L48
from math import sin
from sys import argv, exit
from osgeo import gdal, gdalconst
import os.path
from numpy import *
#!/usr/bin/env python
# ./sscan.py input.mov rownumber output.png
# This is meant to be hyper-simple and makes
# some assumptions like: you want a row (not
# a column), the video is RGB (not gray), etc.
# Bug: frame_count is sometimes fractional.
# int() and the "if not okay" are workarounds.
### Keybase proof
I hereby claim:
* I am celoyd on github.
* I am vruba (https://keybase.io/vruba) on keybase.
* I have a public key whose fingerprint is ACAD 5D75 5F30 8F1B 1504 B132 EB31 5C66 7D17 6C9D
To claim this, I am signing this object:
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 4 columns, instead of 1 in line 1.
24.42129435, 54.51402311, ar, الحفلة 👌
سوف نضيع شرف الكثير الليلة 😂👊
21.45165137, 39.96484549, ar, صبرك وتوفيقك يارب 💜?
24.3936663, 56.7277276, ar, '
قال رسول الله ﷺ :
{ إن من أفضل أيامكم يوم الجمعة
فأكثروا عليّ من الصلاة فيه } 🌷
'
29.33803968, 48.06777154, ht, Chenni ga3da ashof msr7yat 6ar6angy

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

What zoom level is equivalent to a given altitude? In other words, if I’m looking at a map at ZL n, how high off the ground would I be to make out the same features?

This is from a question from Eric Fischer; my algebra and arithmetic are extremely rusty, so please check everything! Major assumptions:

  1. We’re at the equator.

  2. We’re looking straight down (which you can’t realistically do out a plane window, for example).

  3. We have 20/20 vision (which is not as good as median corrected vision).

traceroute to www.e-kyzylorda.gov.kz (92.46.237.194), 64 hops max, 52 byte packets
1 192.168.1.1 (192.168.1.1) 3.980 ms 0.825 ms 0.732 ms
2 192.168.0.1 (192.168.0.1) 6.564 ms 3.823 ms 2.980 ms
3 ptld-dsl-gw48.ptld.qwest.net (207.225.84.48) 21.866 ms 22.800 ms 21.859 ms
4 ptld-agw1.inet.qwest.net (207.225.86.121) 28.812 ms 21.379 ms 21.606 ms
5 sea-brdr-02.inet.qwest.net (67.14.41.18) 24.620 ms 25.222 ms 27.285 ms
6 ae14.edge2.seattle1.level3.net (4.68.62.189) 24.411 ms 27.195 ms 28.180 ms
7 ae-32-52.ebr2.seattle1.level3.net (4.69.147.182) 377.227 ms 213.377 ms 579.056 ms
8 ae-2-2.ebr2.denver1.level3.net (4.69.132.54) 417.806 ms 218.987 ms 375.214 ms
9 ae-3-3.ebr1.chicago2.level3.net (4.69.132.62) 273.500 ms 248.338 ms 626.253 ms
@celoyd
celoyd / ndvi.py
Last active October 4, 2022 11:03
#!/usr/bin/env python
# ndvi.py red.tif nir.tif output-ndvi.tif
# Calculate NDVI (see Wikipedia). Assumes atmospheric correction.
# (Although I use it without all the time for quick experiments.)
import numpy as np
from sys import argv
from osgeo import gdal, gdalconst