Skip to content

Instantly share code, notes, and snippets.

@mojodna
mojodna / typography.yaml
Created Dec 3, 2018
Tangram style (modified from Refill) pushing the type layout engine
View typography.yaml
# Refill provides a high contrast, black & white basemap useful for data visualization.
# Give OpenStreetMap data a professional basemap skin using the Tangram graphics library
# and Mapzen's versatile Vector Tiles.
#
# Refill is a modern GL take on Geraldine's work on Toner for Stamen as part of their
# great CityTracking project. Please use and adapt the open source scene file in
# your own projects!
#
# Authors: Geraldine Sarmiento, Nathaniel V. Kelso
# Read more: https://github.com/tangrams/refill-style
@mojodna
mojodna / README.md
Last active Oct 26, 2018
ESACCI-LC Mid Latitude mask
View README.md

Mid Latitude masking

First, apply the mid latitude mask as mask.

Next, add envelopes for each of the C-CAP sources as masks (otherwise chunky pixels sneak in, per https://github.com/mojodna/marblecutter-land-cover/issues/6):

update land_cover set mask = ST_Union(mask, (select ST_Union(ST_Envelope(geom)) from land_cover where source='C-CAP')) where source='ESACCI-LC Mid Latitudes';
@mojodna
mojodna / README.md
Created Oct 26, 2018
ESACCI-LC Mid Latitude mask
View README.md
-- update the footprint to exclude the mask
update land_cover set geom=ST_Multi(ST_Difference(geom, mask)) where source='ESACCI-LC Mid Latitudes';
@mojodna
mojodna / index.html
Last active Oct 3, 2018
Mapping of Detroit by month
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title></title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.45.0/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.45.0/mapbox-gl.css' rel='stylesheet' />
<style>
body { margin:0; padding:0; }
View country.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title></title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.42.0/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.42.0/mapbox-gl.css' rel='stylesheet' />
<style>
body { margin:0; padding:0; }
@mojodna
mojodna / index.html
Created May 15, 2018
Mapping Disneyland in OSM
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title></title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.45.0/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.45.0/mapbox-gl.css' rel='stylesheet' />
<style>
body { margin:0; padding:0; }
View keybase.md

Keybase proof

I hereby claim:

  • I am mojodna on github.
  • I am mojodna (https://keybase.io/mojodna) on keybase.
  • I have a public key ASCgwZt094z3yaJ1BaDoKDDj5KIHQGTyrCt4UIIBNzhsfgo

To claim this, I am signing this object:

@mojodna
mojodna / 0_register_planet.sql
Last active Jun 17, 2020
Sample OSM Athena queries
View 0_register_planet.sql
--
-- This will register the "planet" table within your AWS account
--
CREATE EXTERNAL TABLE planet (
id BIGINT,
type STRING,
tags MAP<STRING,STRING>,
lat DECIMAL(9,7),
lon DECIMAL(10,7),
nds ARRAY<STRUCT<ref: BIGINT>>,
@mojodna
mojodna / bbox.sql
Created Feb 1, 2017
Find all nodes, ways, and relations in a bounding box (AWS Athena + OSM ORC). A work in progress.
View bbox.sql
with params as (
select
27.61649608612061 as minlon,
53.85379229563698 as minlat,
27.671985626220707 as maxlon,
53.886459293813054 as maxlat
), direct_nodes as (
select n.id, n.version, n.changeset, n.timestamp, n.lat, n.lon
from
planet n,
You can’t perform that action at this time.