Skip to content

Instantly share code, notes, and snippets.

View ajashton's full-sized avatar

AJ Ashton ajashton

View GitHub Profile
#!/bin/sh
# Applies a greyscale image as the alpha channel to another image.
# Black will be transparent, white will be opaque.
# Useful for tilesets, ie: find . -name "*.png" -exec alphafy.sh {} \;
tile=$1
fill_tile=/mnt/white.png
echo "Tile: $tile"
diff --git a/map_defaults.json b/map_defaults.json
index f229912..a80724c 100644
--- a/map_defaults.json
+++ b/map_defaults.json
@@ -1,5 +1,9 @@
{
"controls": {
+ "attribution": {
+ "_type": "OpenLayers.Control.Attribution",
+ "_value": "Mapbox Attribution Test"
@ajashton
ajashton / gist:650407
Created October 28, 2010 01:23
Arch Linux PKGBUILD for boost with ICU support
# Maintainer: kevin <[email protected]>
# Contributor: Giovanni Scafora <[email protected]>
# TU: Kritoke <[email protected]>
# Contributor: Luca Roccia <[email protected]>
# Contributor: AJ Ashton <[email protected]>
pkgbase=boost-icu
pkgname=('boost-icu-libs' 'boost-icu')
pkgver=1.43.0
_boostver=1_43_0
@ajashton
ajashton / gist:650415
Created October 28, 2010 01:27
Diff of my Boost-ICU PKGBUILD with the official Arch PKGBUILD
--- PKGBUILD 2010-10-27 21:25:51.375618429 -0400
+++ ../../extra/boost/PKGBUILD 2010-10-19 00:06:41.000000000 -0400
@@ -3,17 +3,16 @@
# Contributor: Giovanni Scafora <[email protected]>
# TU: Kritoke <[email protected]>
# Contributor: Luca Roccia <[email protected]>
-# Contributor: AJ Ashton <[email protected]>
-pkgbase=boost-icu
-pkgname=('boost-icu-libs' 'boost-icu')
Valid docs
----------
2555 candidates
34 provinces
399 districts
4770 centers
14224 stations
Errors
------
52 Map id 35, 2010_iec_id => agcho_id
#!/bin/bash
set -e -u
# 1. render each layer of each zoom level
# 2. combine each layer of each zoom level to one image in a specified manner
# 3. cut each layer into
#### CONFIGURATION ####
ZMIN=0

Notes

  • Order of symbolizers in stylesheet = order in XML? (We need to define it somehow…)

Example 1 style

.rail[zoom>10][status='active'] {
  line-cap: butt;

line-join: round;

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE Map[
]>
<Map background-color="#FFFFFF" srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs">
<Style name="id-world-1">
<Rule>
<PolygonSymbolizer fill="#88aacc"/>
<PolygonPatternSymbolizer file="../images/dc-paper/noise_15.png"/>
{
"srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs",
"Stylesheet": [
"style.mss"
],
"Layer": [
{
"id": "world",
"name": "world",
"srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs",
@grass: #b0c765;
@water: #8ac;
@base: #eee;
Map { background-color: #00d4b8; }
#world {
polygon-fill: #8ac;
polygon-pattern-file: url(../images/dc-paper/noise_15.png);
}