Skip to content

Instantly share code, notes, and snippets.

View vincentsarago's full-sized avatar

Vincent Sarago vincentsarago

View GitHub Profile
# Please be kind
# See https://github.com/developmentseed/awspds-mosaic
# to deploy your own
endpoint = "https://landsatlive.live"
# Define AOI here
bounds = [-5.833740234375, 46.15700496290803, -0.9118652343749999, 49.23912083246698]
# Date Filters
start = "2019-01-01T00:00:00Z"
/* This code helps you create multiple copies of a document in your google drive and rename each of them based on values in a google sheet.
In the first column of your google sheet, list down the names of the new files as required.
In your google sheet,open tools-->script editor and paste the following code.
Open the google doc whose copy is to be made. Copy the text after /d/ and replace the text in line 13.
Run the code. You will find your new copies in the same folder as the document whose copies are being made*/
function copyDocs() {
var data = SpreadsheetApp.getActiveSheet().getDataRange().getValues();
@vincentsarago
vincentsarago / nodatas.py
Last active March 5, 2020 19:48
convert multiple nodata values to 0
"""cli"""
import click
import numpy
import rasterio
from rasterio.rio import options
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
"""rio-tiler.reader: image utility functions."""
from typing import Any, Dict, List, Optional, Sequence, Tuple, Union
import math
import warnings
from concurrent import futures
import numpy

Workshop

COG + STAC

Requirements

  • python 3.7
  • rio-viz, rio-cogeo
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title>Australia Wildfires DG images</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v1.0.0/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v1.0.0/mapbox-gl.css' rel='stylesheet' />
"""API."""
from dataclasses import dataclass, field
import os
from urllib.parse import urlencode
from typing import Callable, Dict, Optional
import pkg_resources
from rasterio.transform import from_bounds
from cogeo_mosaic.mosaic import MosaicJSON
import sys
import zlib
import json
from concurrent import futures
from urllib.parse import urlparse
import boto3
import click