Skip to content

Instantly share code, notes, and snippets.

View springmeyer's full-sized avatar

Dane Springmeyer springmeyer

View GitHub Profile
Map {
background-color: #43a4d1;
}
/* grey outline */
#world::big_glow [POP2005 > 1000000]{
line-color: #ddd;
line-width: 4;
}
@springmeyer
springmeyer / grid_renderer
Created February 16, 2011 21:33
polygon's rasterized as chars
{ "grid":
[
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
@springmeyer
springmeyer / world_borders.grid
Created February 17, 2011 21:15
like the old days
[
"0000000000000000000000000000000000000000000000000000000000000000",
"0000000000000000000000000000000000000000000000000000000000000000",
"0000000000000000000000000000000000000000000000000000000000000000",
"0000000000000000000000000000000000000000000000000000000000000000",
"0000000000000000000000000000000000000000000000000000000000000000",
"0000000000000000000000000000000000000000000000000000000000000000",
"0000000000000000000000000000000000000000000000000000000000000000",
"0000000000000000000000000000000000000000000000000000000000000000",
"0000000000000000000000000000000000000000000000000000000000000000",
on osx with g++ i686-apple-darwin10-g++-4.2.1 I get:
lots of:
In file included from ../src/sqlite3.cc:8:
../src/database.h:48: error: a storage class can only be specified for objects and functions
../src/database.h:55: error: a storage class can only be specified for objects and functions
which can be fixed with:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import mapnik2
print mapnik2.Expression("[NOM_FR] = 'Québec'")
f = mapnik2.Feature(0)
print 'Québec'
f["name"] = 'Québec'
Index: bindings/python/SConscript
===================================================================
--- bindings/python/SConscript (revision 2607)
+++ bindings/python/SConscript (working copy)
@@ -153,7 +153,7 @@
if env['SVN_REVISION']:
sources.remove('mapnik_python.cpp')
env2 = py_env.Clone()
- env2.Append(CCFLAGS='-DSVN_REVISION=%s' % env['SVN_REVISION'])
+ env2.Append(CXXFLAGS='-DSVN_REVISION=%s' % env['SVN_REVISION'])
Index: include/mapnik/layer.hpp
===================================================================
--- include/mapnik/layer.hpp (revision 2628)
+++ include/mapnik/layer.hpp (working copy)
@@ -170,8 +170,18 @@
* @return whether this layer's labels are cached.
*/
bool clear_label_cache() const;
+
+ /*!
[100%] Building CXX object CMakeFiles/mbutil.dir/mbutil.cpp.o
In file included from /usr/local/include/boost/property_tree/json_parser.hpp:14,
from /Users/dane/projects/mbutil/mbutil.cpp:6:
/usr/local/include/boost/property_tree/detail/json_parser_read.hpp: In constructor ‘boost::property_tree::json_parser::json_grammar<Ptree>::definition<Scanner>::definition(const boost::property_tree::json_parser::json_grammar<Ptree>&)’:
/usr/local/include/boost/property_tree/detail/json_parser_read.hpp:184: error: reference to ‘assertion’ is ambiguous
/usr/local/include/boost/assert.hpp:94: error: candidates are: namespace boost::assertion { }
/usr/local/include/boost/spirit/home/classic/error_handling/exceptions_fwd.hpp:25: error: template<class ErrorDescrT> struct boost::spirit::classic::assertion
/usr/local/include/boost/property_tree/detail/json_parser_read.hpp:184: error: expected primary-expression before ‘>’ token
/usr/local/include/boost/property_tree/detail/json_parser_read.hpp:184
{"grid":"[\" \",\" \",\" \",\" \",\" \",\" \",\" \",\" \",\" \",\" \",\" \",\" \",\" \",\" \",\"
var compress = require('compress');
var gzip = require('gzip');
var zlib = require('zlib');
function deflate(buffer, callback) {
var gz = new compress.Gzip();
var data = '';
gz.write(buffer, function(err, chunk) {
if (err) {
callback(err);