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.
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
psql -Atc "SELECT row_to_json(fc) FROM ( SELECT 'FeatureCollection' As type, array_to_json(array_agg(f)) As features FROM (SELECT 'Feature' As type, ST_AsGeoJSON(box2d(ST_Buffer(ST_Transform(lg.wkb_geometry, 3857), 300)))::json As geometry, row_to_json((scene_id, created)) As properties FROM scenes As lg WHERE scene_id='$sceneid') As f ) As fc;" > $bounds |
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
#!/bin/bash | |
set -eou pipefail | |
function onerror() { | |
echo "onerror" $? | |
exit 1 | |
} | |
trap onerror EXIT |
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
import click | |
import rasterio as rio | |
@click.command() | |
@click.argument('src_path', type=click.Path(exists=True)) | |
@click.argument('dst_path', type=click.Path(exists=False)) | |
def to_png(src_path, dst_path): | |
with rio.drivers(): |
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
#!/bin/bash | |
# Use -e to exit the script as soon as anything returns non-zero | |
set -eou pipefail | |
function usage() { | |
echo "" | |
echo "Template script for bash error handling." | |
echo "" |
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
#!/bin/bash | |
set -eou pipefail | |
function usage() { | |
echo "" | |
echo "Utility for generating preview images and uploading to S3. This script is meant to be" | |
echo "used in a remote environment (e.g. EC2). The environment variable WORKING_BUCKET must be" | |
echo "defined to an S3 bucket, of which you have access." | |
echo "" |