Skip to content

Instantly share code, notes, and snippets.

View MarioSuperMario's full-sized avatar

bishtds MarioSuperMario

View GitHub Profile
@MarioSuperMario
MarioSuperMario / map-raster.py
Created March 14, 2016 16:21 — forked from jdherman/map-raster.py
plotting raster data with shapefile in python+basemap
from osgeo import gdal
import matplotlib.pyplot as plt
import numpy as np
from mpl_toolkits.basemap import Basemap
# Plotting 2070 projected August (8) precip from worldclim
gdata = gdal.Open("D:/jon/datasets/worldclim/future/pr/gf45pr70_usa/gf45pr708.tif")
geo = gdata.GetGeoTransform()
data = gdata.ReadAsArray()