Skip to content

Instantly share code, notes, and snippets.

@jqtrde
jqtrde / readme.md
Created June 3, 2020 11:56 — forked from kgjenkins/readme.md
TIFF compression options

TIFF compression options

Summary

Realistically, especially when considering the inherent noise in the original image, I'd settle for lossy compression with COMPRESS=JPEG JPEG_QUALITY=90, which could reduce file size fairly quickly to 16% of the original.

But if lossless compression is a hard requirement, I'd probably go with COMPRESS=LZW PREDICTOR=2. However, I would want to verify that any downstream tools wolud support this sort of compression.

UPDATE: When saving with JPEG compression, further speed and size improvements are gained by adding PHOTOMETRIC=YCBCR, which uses a different color space that has even better compression. I've added new rows to the table for YCBCR, as well as .jp2 formats.

@jqtrde
jqtrde / modern-geospatial-python.md
Last active August 1, 2023 14:50
Modern remote sensing image processing with Python
#!/bin/bash
GRAPH_NAME=tlehman
function roam_api_get_blocks_containing_string() {
curl -X POST "https://api.roamresearch.com/api/graph/$GRAPH_NAME/q" --location-trusted \
-H "accept: application/json" \
-H "Authorization: Bearer $ROAM_API_KEY" \
-H "Content-Type: application/json" \
-d "{\"query\" : \"[:find ?block-str :in \$ ?search-string :where [?b :block/uid ?block-uid] [?b :block/string ?block-str] [(clojure.string/includes? ?block-str ?search-string)]]\", \"args\": [\"$1\"]}"
@jqtrde
jqtrde / install-arch.md
Last active June 15, 2023 20:41 — forked from mjnaderi/install-arch.md
Install Arch Linux with Full Disk Encryption (LVM on LUKS)
@jqtrde
jqtrde / aws_assume_role.py
Created November 13, 2022 13:48 — forked from benkehoe/aws_assume_role.py
Assumed role session chaining (with credential refreshing) for boto3
# *** WARNING ***
# This gist is no longer maintained
# It has been replaced by aws-assume-role-lib in PyPI
# Documentation at https://github.com/benkehoe/aws-assume-role-lib
# It is still a single-file library, you can find the stable version here:
# https://raw.githubusercontent.com/benkehoe/aws-assume-role-lib/stable/aws_assume_role_lib/aws_assume_role_lib.py
# (link also available in the docs)
# Copyright 2020 Ben Kehoe
#
@jqtrde
jqtrde / bulletpaths.js
Created June 21, 2022 08:40 — forked from azlen/bulletpaths.js
All Paths Lead to Roam
/*
* credit to Dhrumil Shah (@wandcrafting) and Robert Haisfield (@RobertHaisfield)
* for the original concept which was part of their RoamGames submission
* and can be found at: https://www.figma.com/file/5shwLdUCHxSaPNEO7pazbe/
*
*/
/* ======= OPTIONS ======== */
/* note: if you change these, reload the page to see the effect */
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jqtrde
jqtrde / sketch-shortcuts.md
Created July 14, 2014 13:44
Sketch Keyboard Shortcuts
  • Zoom
    • CMD 0 100%
    • CMD 1 Entire project
    • CMD 2 Zoom to selected object
  • Hide/Show Sidebars
    • CMD ALT 1 Hide left sidebar
    • CMD ALT 2 Hide right ridebar
    • CMD ALT 3 Hide both
    • CMD . Presentation mode
  • CTRL R Ruler

Important

DO NOT USE VSCODE terminal and make sure uname -m returns arm64

  1. First Install Xcode command line tool
xcode-select --install
  1. Create and change /opt directories owner
@jqtrde
jqtrde / maptime.md
Last active July 31, 2020 15:09
Maptime Presentation

Hi, and welcome!

We love pixels. We build our tools such that they allow us to work with pixels at a wide range of scales, from individual landsat scenes, to global mosaics, via command line programs or as python libraries we can integrate into large processing pipelines.

Today we'll walk through:

  • processing an individual Landsat scene using rasterio, a tool which serves as the foundation for most of our work
  • uploading the outputs of ^ to Mapbox, where we can visualize it on top of mapbox.satellite, and serve it globally at crazy speed