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
# USAGE | |
# python pngpixelbleed.py input_file [output_file] | |
# | |
# input_file: path from the call site to the input image file; supports | |
# png, jpg, tiff, gif, and psd formats | |
# output_file: optional path from the call site to the desired output | |
# image file; supports all input formats except psd; if omitted, | |
# output will be written to the input file | |
# | |
# This script requires the the Pillow python module: |
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 os | |
import urllib2 | |
# This is a library of tile tools from Mapbox. Install with 'pip install mercantile'. | |
import mercantile | |
# Set the bounds of the area you want to download. (West, South, East, North) | |
bounds = (-105, 39.99, -104.99, 40) | |
zooms = [14] |
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
global: | |
default_order: function() { return feature.sort_key || 0; } | |
scene: | |
background: | |
color: '#8db7d5' | |
cameras: | |
iso-camera: | |
# Manhattan | |
position: [-74.00976419448854, 40.70532700869127, 16] | |
type: isometric |
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
#include <cassert> | |
#include <cstdio> | |
#include <cstdint> | |
struct TileAddress { | |
int x = 0; | |
int y = 0; | |
int z = 0; | |
int s = 0; | |
}; |
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
#include <cassert> | |
#include <cstdint> | |
#include <cstdio> | |
#include <string> | |
#include <vector> | |
enum class StyleKey : uint8_t { | |
anchor, | |
angle, | |
buffer, |