Skip to content

Instantly share code, notes, and snippets.

View prl900's full-sized avatar

Pablo Rozas Larraondo prl900

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import datacube as dc
import ctypes
from contextlib import closing
import numpy as np
from datacube.helpers import ga_pq_fuser
from datacube.storage import masking
import xarray as xr
import multiprocessing as mp
#N = 1001*1001
import datacube as dc
class BurnCube(dc.Datacube):
def __init__(self):
super(BurnCube, self).__init__(app='TreeMapping.getLandsatStack')
self.measurements = ['red','green','blue','nir','swir1','swir2']
self.res = (-100,100)
def load_cube(self, lon, lat, period):
query = {
package main
import (
"fmt"
"image"
"image/color"
"image/png"
"os"
)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import gdal
from osgeo import osr
import numpy as np
ras = np.load("/Users/pablo/Downloads/test.npy")
drv = gdal.GetDriverByName("GTiff")
ds = drv.Create("/Users/pablo/Downloads/gbdx.tif", 8765, 10000, 1, gdal.GDT_Float32)
proj = osr.SpatialReference()
proj.ImportFromEPSG(4326)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@prl900
prl900 / cog.go
Created May 3, 2018 00:28
Testing remote access to COG files hosted on AWS S3
package main
import (
"github.com/terrascope/gocog"
"fmt"
"image"
"image/png"
"net/http"
"os"
)
package main
import (
"encoding/gob"
"fmt"
"net/http"
"strconv"
itsk "github.com/prl900/intersekt"
"google.golang.org/appengine"