Skip to content

Instantly share code, notes, and snippets.

View springmeyer's full-sized avatar

Dane Springmeyer springmeyer

View GitHub Profile
./harfbuzz-icu-bench 1000
Starting ICU shaping:
881:907:915:910:904:929:911:3:918:929:908:910:911:3:912:916:920:
1449:1471:1478:1396:3:1477:1499:1401:1415:1486:1431:1478:1396:3:1476:1493:1435:1474:
4710:4524:8640:3212:12901:
6.99ms (cpu 6.28ms) | ICU shaping done
ot
fallback
Starting Harfbuzz shaping
881:907:915:910:904:929:911:3:918:929:908:910:911:3:912:916:920:
<Map srs="+init=epsg:3857" background-color="white">
<Style name="polygon">
<Rule>
<LineSymbolizer stroke-width="50" stroke-opacity=".01"/>
</Rule>
</Style>
<Layer name="polygon" srs="+init=epsg:3857">
<StyleName>polygon</StyleName>
<Datasource>
@springmeyer
springmeyer / cartocss-zoom-ideas.md
Created October 30, 2013 02:52
Possible CartoCSS advances for more dynamic styling with zoom

Zoom as a dynamic token in selectors

Common usage of the special zoom filter keyword looks like:

#roads[zoom=10] {
   line-width:2;
}
( SELECT way, waterway AS type,
CASE WHEN intermittent IN ('yes') OR tags@> hstore('seasonal','yes') THEN 'yes'
ELSE 'no' END AS seasonal
FROM planet_osm_line
WHERE waterway IN ('river', 'canal', 'stream', 'ditch', 'drain')) as tmp
diff --git a/include/mapnik/ctrans.hpp b/include/mapnik/ctrans.hpp
index f02ab48..2093e3d 100644
--- a/include/mapnik/ctrans.hpp
+++ b/include/mapnik/ctrans.hpp
@@ -83,12 +83,21 @@ struct MAPNIK_DECL coord_transform
unsigned vertex(double *x, double *y) const
{
- unsigned command = geom_.vertex(x, y);
- if ( command != SEG_END)
@springmeyer
springmeyer / tilemill-harfbuzz.md
Last active December 26, 2015 19:29
Test TileMill+harfbuzz package
  1. Download and install Ubuntu Saucy (13.10). If you want to use AWS to launch an instance the ami-4843740d is available for us-west-1. See others at http://cloud-images.ubuntu.com/locator/ec2/

  2. Install TileMill via PPA and bengali fonts:

sudo apt-add-repository ppa:mapnik/harfbuzz
sudo apt-get update
sudo apt-get install tilemill
sudo apt-get install ttf-bengali-fonts
clang++ -o bindings/python/mapnik_building_symbolizer.os -c -Wall -ftemplate-depth-300 -O
3 -fno-strict-aliasing -finline-functions -Wno-inline -Wno-parentheses -Wno-char-subscripts -fPIC -DSHAPE_MEMORY_MAPPED_F
ILE -DBIGINT -DHAVE_JPEG -DMAPNIK_USE_PROJ4 -DHAVE_PNG -DHAVE_TIFF -DDARWIN -DMAPNIK_THREADSAFE -DNDEBUG -DSHAPE_MEMORY_M
APPED_FILE -DBIGINT -DHAVE_JPEG -DMAPNIK_USE_PROJ4 -DHAVE_PNG -DHAVE_TIFF -DDARWIN -DMAPNIK_THREADSAFE -DNDEBUG -DGRID_RE
NDERER -DHAVE_LIBXML2 -Ideps -Ideps/clipper/include -Ideps/agg/include -I. -Iinclude -I/usr/local/Cellar/gdal/1.10.1/incl
ude -I/usr/local/Cellar/postgresql/9.3.0/include -I/usr/local/Cellar/freetype/2.5.0.1/include -I/usr/local/Cellar/freetyp
e/2.5.0.1/include/freetype2 -I/usr/local/Cellar/icu4c/52.1/include -I/usr/local/include -I/usr/include -I/Applications/Xc
ode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/libxml2 -I/System/Library/
Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/System/Library/Fra
@springmeyer
springmeyer / README.md
Last active December 25, 2015 05:29
MapBox Cloudless Atlas Tour

Speakers notes

Part of a presenation given at NACIS 2013: https://github.com/springmeyer/cloudless-nacis2013

  • Bahamas - land really pops due to blurred shallow nearshore
  • Australia - rich hues
  • Great Barrier Reef - Extremely subtle textures visible + water mask helps show smallest reefs
  • Amur River - effectively shows many combined flood events / murky water in delta
  • Taiwan - deforestation clearly visible
  • Tibet - Jewel lakes
@springmeyer
springmeyer / index.html
Last active December 25, 2015 05:29
A tour of amazing places in the MapBox Cloudless Atlas
<!DOCTYPE html>
<Html>
<Head>
<Meta charset=utf-8 />
<Title></Title>
<Script src='http://api.tiles.mapbox.com/mapbox.js/v0.6.7/mapbox.js'></Script>
<Link href='http://api.tiles.mapbox.com/mapbox.js/v0.6.7/mapbox.css' rel='stylesheet' />
<Style>
body { margin:0; padding:0; }
#map { position:absolute; top:0; bottom:0; width:100%; }
@springmeyer
springmeyer / webp-v0.1.3-encode.h
Created October 4, 2013 20:13
webp encode.h for various versions (to try to figure out when encoder options became available)
// Copyright 2011 Google Inc.
//
// This code is licensed under the same terms as WebM:
// Software License Agreement: http://www.webmproject.org/license/software/
// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
// -----------------------------------------------------------------------------
//
// WebP encoder: main interface
//
// Author: Skal (pascal.massimino@gmail.com)