This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Struct(): | |
"""Create a custom class from a dictionary | |
Usage | |
----- | |
Initialize empty, with a dictionary, and/or | |
with any number of key=value pairs | |
Note | |
---- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Simple calendar using ttk Treeview together with calendar and datetime | |
classes. | |
Credits | |
------- | |
http://svn.python.org/projects/sandbox/trunk/ttk-gsoc/samples/ttkcalendar.py | |
""" | |
import calendar | |
try: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Recipe from http://zulko.wordpress.com/2012/09/29/animate-your-3d-plots-with-pythons-matplotlib/""" | |
import matplotlib.pyplot as plt | |
from matplotlib import cm | |
from mpl_toolkits.mplot3d import axes3d | |
import os, sys | |
import numpy as np | |
##### TO CREATE A SERIES OF PICTURES |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dst_crs = ... | |
nbands, height, width = data.shape | |
dst_transform, width, height = rasterio.warp.calculate_default_transform( | |
src_crs=src_crs, | |
dst_crs=dst_crs, | |
width=width, height=height, | |
resolution=resolution, | |
**bounds) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def stack_band_files(infiles, outfile, creation_options={}): | |
"""Stack single-band files into one | |
Parameters | |
---------- | |
infiles : list of str | |
paths to input files | |
outfile : str | |
path to output file | |
creation_options : dict |
NewerOlder