I have 5 numpy arrays of shape nx, ny
lons.shape = (nx,ny)
lats.shape = (nx,ny)
reds.shape = (nx,ny)
greens.shape = (nx,ny)
blues.shape = (nx,ny)
The reds, greens and blues arrays contain values that range from 0–255 and the lat/lon arrays are latitude/longitude pixel coordinates.
My question is how do I write this data to a geotiff?
I ultimately want to plot the image using basemap.
Here is the code I have so far, however I get a huge GeoTIFF file (~500MB) and it comes up blank (just a black image). Also note that nx, ny = 8120, 5416.
from osgeo import gdal
from osgeo import osr
import numpy as np
import h5py
import os
os.environ['GDAL_DATA'] = "/Users/andyprata/Library/Enthought/Canopy_64bit/User/share/gdal"
# read in d