Skip to content

Instantly share code, notes, and snippets.

View atrawog's full-sized avatar

Andreas Trawoeger atrawog

View GitHub Profile
@jgomezdans
jgomezdans / gpp_tseries.py
Created July 23, 2012 13:47
A script to grab timeseries from MODIS data using GDAL and python
#!/usr/bin/env python
"""
A script to grab timeseries from MODIS data using GDAL and python
Author: J Gomez-Dans/NCEO & UCL
"""
__author__: J Gómez-Dans
import numpy as np
import matplotlib.pyplot as plt
from osgeo import gdal
@jgomezdans
jgomezdans / grab_modis.sh
Created July 19, 2012 16:48
Download MODIS data for a particular tile
#!/bin/bash
# This command works on my laptop, maybe it's a bug?
# USAGE: ./grab_modis.sh productname tile year
# Where productname is the complete product name (including collection)
# ie MOD17A2.005, or MCD45A1.005
# gist in https://gist.github.com/3145223
usage(){
echo "MODIS data grabber"
echo "By J Gómez-Dans, National Centre for Earth Observation & UCL"
echo "Usage: $0 <product_name> <tile> <year>"
@gka
gka / berlin.svg
Created July 10, 2012 12:24
Berlin Street Map (PostGIS, OSM)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sgillies
sgillies / geo_interface.rst
Last active March 4, 2025 10:09
A Python Protocol for Geospatial Data

Author: Sean Gillies Version: 1.0

Abstract

This document describes a GeoJSON-like protocol for geo-spatial (GIS) vector data.

Introduction

@DGuidi
DGuidi / TileLayer.TileJSON.js
Created February 1, 2012 08:49
Leaflet TileCanvas
L.TileLayer.TileJSON = L.TileLayer.Canvas.extend({
options: {
debug: false
},
tileSize: 256,
initialize: function (options) {
L.Util.setOptions(this, options);
@philipn
philipn / gist:1148693
Created August 16, 2011 08:59
GeoTIFFs -> One Big GeoTIFF
"""
Likely not useful to anyone else, but just putting it out there.
This script will take a directory of GeoTIFFs and merge them together without issues.
This script simply decompresses the files, runs nearblack to remove pseudo-black borders caused by compression, and then uses gdalwarp to stitch the files together.
The script is designed to use the minimal amount of disk space possible -- it cleans up each file after decompression and continually merges with a master image.
"""
import os