Skip to content

Instantly share code, notes, and snippets.

View wboykinm's full-sized avatar

Bill Morris wboykinm

View GitHub Profile
darribas / contextily_labels.ipynb
Created February 4, 2021 12:21
Contextily labels examples
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<!DOCTYPE qgis_style>
<qgis_style version="2">
<symbol alpha="1" force_rhr="0" clip_to_extent="1" type="fill" name="pencilish">
<layer class="MarkerLine" pass="0" locked="0" enabled="1">
<prop k="average_angle_length" v="4"/>
<prop k="average_angle_map_unit_scale" v="3x:0,0,0,0,0,0"/>
<prop k="average_angle_unit" v="MM"/>
<prop k="interval" v="0.02"/>
<prop k="interval_map_unit_scale" v="3x:0,0,0,0,0,0"/>
chriswhong /
Created February 28, 2020 17:55
Using ogr2ogr to load a CSV into Postgres

The absolute easiest way to get a CSV into a postgresql table is to use ogr2ogr with AUTODETECT_TYPE=YES.

I learned a while back that this is what cartoDB uses to import your CSV into postgis (with a lot of other parameters added)

ogr2ogr -f PostgreSQL PG:"host=localhost user=postgres dbname=postgres password=password"  docs.csv -oo AUTODETECT_TYPE=YES
IanColdwater / twittermute.txt
Last active July 2, 2024 02:25
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here:
<title>Deckgl RGB PointCloud + Mapbox</title>
<script src="^7.0.0/dist.min.js"></script>
<script src=""></script>
<link rel="stylesheet" type="text/css" href="">
body {
background-color: #000000;
margin: 0;
brambow / postgis-to-geojson-feature-collection.sql
Last active April 25, 2023 15:44
PostGIS query to build a GeoJSON FeatureCollection
SELECT json_build_object(
'type', 'FeatureCollection',
'crs', json_build_object(
'type', 'name',
'properties', json_build_object(
'name', 'EPSG:4326'
'features', json_agg(
#! /bin/bash -ex
# Convert Landsat 8 GeoTIFF images into RGB pan-sharpened JPEGs.
# Requirements:
# * gdal
# * Dan Stahlke's
# * convert (image-magick)
# Reference info:
Zoom Tile size at equator (km) Resolution at equator (m)
0 22568 88155
1 11284 44078
2 7656 29904
3 4577 17881
4 2443 9544
5 1244 4861
6 625 2442
7 313 1223
rokotyan / .block
Last active December 12, 2023 13:07
Export SVG D3 visualization to PNG or JPEG
license: mit
import base64 as b64
import numpy as np
import cv2
import matplotlib.pyplot as plt
from ipywidgets import interact, interactive, fixed
from IPython.display import Image, display
import ipywidgets as widgets
from itertools import tee, izip
WINDOW_SIZE = 41 # size of window to use when computing averages. Endpoint images outside