Skip to content

Instantly share code, notes, and snippets.

View springmeyer's full-sized avatar

Dane Springmeyer springmeyer

View GitHub Profile
Index: src/load_map.cpp
===================================================================
--- src/load_map.cpp (revision 2976)
+++ src/load_map.cpp (working copy)
@@ -83,7 +83,7 @@
relative_to_xml_(true),
font_manager_(font_engine_) {}
- void parse_map(Map & map, ptree const & sty, std::string const& base_path="");
+ void parse_map(Map & map, ptree const & sty, std::string const& base_path);
@springmeyer
springmeyer / geojson_grid.py
Created June 13, 2011 18:18
generate a gridded set of points in geojson format
import json
def feat(x,y):
feat = { "type": "Feature",
"geometry" : { "type": "Point", "coordinates": [ x, y ] },
"properties": { "label": "%s,%s" % (x,y) }
}
return feat
def grid(minx,miny,maxx,maxy,increment):
ccache clang++ -Qunused-arguments -fcolor-diagnostics -o bindings/python/mapnik_envelope.os -c -g -DHAVE_JPEG -ansi -Wall -Wno-unused-function -Wno-array-bounds -Wno-parentheses -Wno-char-subscripts -ftemplate-depth-200 -DDARWIN -DBOOST_SPIRIT_THREADSAFE -DMAPNIK_THREADSAFE -O3 -finline-functions -Wno-inline -DNDEBUG -fPIC -Iagg/include -I. -Iinclude -I/opt/libpng-1.5.2/include -I/opt/jpeg-8c/include -I/opt/proj/include -I/opt/icu/include -I/opt/boost-46/include -I/Library/Frameworks/GDAL.framework/Versions/1.8/Headers -I/usr/local/pgsql-9.0/include -I/usr/local/Cellar/geos/3.3.0/include -I/usr/local/Cellar/sqlite/3.7.5/include -I/usr/include -I/usr/X11/include/freetype2 -I/usr/X11/include -I/usr/include/libxml2 -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 bindings/python/mapnik_envelope.cpp
In file included from bindings/python/mapnik_envelope.cpp:1:
In file included from bindings/python/mapnik_envelope.cpp:25:
In file included from /opt/boost-46/include/boost/python.hpp:50:
/
#point {
marker:auto;
marker-width:[field];
display:none/yes;
text-display: yes;
text-name: " 'mike' + 'yes' "
/* This function is called when there is a warning, but the library thinks
* it can continue anyway. Replacement functions don't have to do anything
* here if you don't want to. In the default configuration, png_ptr is
* not used, but it is passed in case it may be useful.
*/
static void PNGCBAPI
pngtest_warning(png_structp png_ptr, png_const_charp message)
{
PNG_CONST char *name = "UNKNOWN (ERROR!)";
char *test;
@springmeyer
springmeyer / mode_tile_client.py
Created June 3, 2011 06:46
python client for talkin' sockets with mod_tile.py
#!/usr/bin/env python
# client for mod_tile
import struct
import socket
def print_resp(data):
print 'Received', repr(data)
version, request, x, y, z, xmlname = struct.unpack("5i41sxxx", data)
In file included from src/image_util.cpp:32:
include/mapnik/png_io.hpp:91:16: error: no matching function for call to 'png_set_longjmp_fn'
if (setjmp(png_jmpbuf(png_ptr)))
^~~~~~~~~~~~~~~~~~~
In file included from src/image_util.cpp:27:
/Library/Frameworks/UnixImageIO.framework/unix/include/png.h:988:9: note: instantiated from:
(*png_set_longjmp_fn((png_ptr), longjmp, sizeof (jmp_buf)))
^~~~~~~~~~~~~~~~~~
/Library/Frameworks/UnixImageIO.framework/unix/include/png.h:985:1: note: candidate function not viable: no
ccache clang++ -o src/libxml2_loader.os -c -g -DHAVE_JPEG -ansi -Wall -Wno-unused-function -Wno-array-bounds -Wno-parentheses -ftemplate-depth-200 -DDARWIN -DBOOST_SPIRIT_THREADSAFE -DMAPNIK_THREADSAFE -O3 -finline-functions -Wno-inline -DNDEBUG -DHAVE_LIBXML2 -fPIC -Iagg/include -I. -Iinclude -I/opt/proj/include -I/opt/icu/include -I/opt/boost-46/include -I/Library/Frameworks/UnixImageIO.framework/unix/include -I/usr/local/pgsql-9.0/include -I/usr/local/Cellar/geos/3.2.2/include -I/usr/local/include -I/usr/local/Cellar/sqlite/3.7.5/include -I/usr/include -I/usr/X11/include/freetype2 -I/usr/X11/include -I/usr/include/libxml2 src/libxml2_loader.cpp
clang: warning: argument unused during compilation: '-D HAVE_JPEG'
clang: warning: argument unused during compilation: '-D DARWIN'
clang: warning: argument unused during compilation: '-D BOOST_SPIRIT_THREADSAFE'
clang: warning: argument unused during compilation: '-D MAPNIK_THREADSAFE'
clang: warning: argument unused during compilation: '-D NDEBUG'
clang: warning: a
clang++ -o src/grid/process_shield_symbolizer.os -c -g -Wno-unused-function -Wno-array-bounds -Wno-parentheses -DHAVE_JPEG -ansi -Wall -ftemplate-depth-200 -DDARWIN -DBOOST_SPIRIT_THREADSAFE -DMAPNIK_THREADSAFE -O3 -finline-functions -Wno-inline -DNDEBUG -fPIC -Iagg/include -I. -Iinclude -I/opt/proj/include -I/opt/icu/include -I/opt/boost-46/include -I/Library/Frameworks/UnixImageIO.framework/unix/include -I/usr/local/pgsql-9.0/include -I/usr/local/Cellar/geos/3.2.2/include -I/usr/local/include -I/usr/local/Cellar/sqlite/3.7.5/include -I/usr/include -I/usr/X11/include/freetype2 -I/usr/X11/include -I/usr/include/libxml2 src/grid/process_shield_symbolizer.cpp
-I/opt/icu/include -I/opt/boost-46/include -I/Library/Frameworks/UnixImageIO.framework/unix/include -I/usr/local/pgsql-9.0/include -I/usr/local/Cellar/geos/3.2.2/include -I/usr/local/include -I/usr/local/Cellar/sqlite/3.7.5/include -I/usr/include -I/usr/X11/include/freetype2 -I/usr/X11/include -I/usr/include/libxml2 src/grid/process_shield_symbolizer.cpp
e
@springmeyer
springmeyer / line-offsets-mapnik2.diff
Created May 25, 2011 22:32
line offsets in mapnik
Index: bindings/python/mapnik_stroke.cpp
===================================================================
--- bindings/python/mapnik_stroke.cpp (revision 2900)
+++ bindings/python/mapnik_stroke.cpp (working copy)
@@ -68,14 +68,15 @@
dashes,
s.get_line_cap(),
s.get_line_join(),
- s.get_gamma());
+ s.get_gamma(),