Skip to content

Instantly share code, notes, and snippets.

View springmeyer's full-sized avatar

Dane Springmeyer springmeyer

View GitHub Profile
diff --git a/src/image_util.cpp b/src/image_util.cpp
index ae36062..5e6aac3 100644
--- a/src/image_util.cpp
+++ b/src/image_util.cpp
@@ -69,6 +69,7 @@ extern "C"
#include "agg_span_image_filter_rgba.h"
#include "agg_span_interpolator_linear.h"
#include "agg_trans_affine.h"
+#include "agg_blur.h"
Index: plugins/input/ogr/ogr_datasource.cpp
===================================================================
--- plugins/input/ogr/ogr_datasource.cpp (revision 2378)
+++ plugins/input/ogr/ogr_datasource.cpp (working copy)
@@ -59,21 +59,30 @@
: datasource(params),
extent_(),
type_(datasource::Vector),
- desc_(*params.get<std::string>("type"), *params.get<std::string>("encoding","utf-8")),
+ desc_(*params.get<std::string>("type"), *params_.get<std::string>("encoding","utf-8")),
#include <CoreFoundation/CoreFoundation.h>
#include <Cocoa/Cocoa.h>
#ifdef check
#undef check
#endif
#ifdef verify
#undef verify
#endif
* Configuration:
*
* By default all macros generate "production code" (i.e non-debug). If
* DEBUG_ASSERT_PRODUCTION_CODE is defined to zero or DEBUG is defined to non-zero
* while this header is included, the macros will generated debug code.
*
* If DEBUG_ASSERT_COMPONENT_NAME_STRING is defined, all debug messages will
* be prefixed with it.
*
* By default, all messages write to stderr. If you would like to write a custom
@springmeyer
springmeyer / homebrew boost patch
Created November 4, 2010 23:12
homebrew fix to boost formula to support mapnik2
diff --git a/Library/Formula/boost.rb b/Library/Formula/boost.rb
index 3633158..cf405c4 100644
--- a/Library/Formula/boost.rb
+++ b/Library/Formula/boost.rb
@@ -5,6 +5,8 @@ class Boost <Formula
url 'http://downloads.sourceforge.net/project/boost/boost/1.44.0/boost_1_44_0.tar.bz2'
md5 'f02578f5218f217a9f20e9c30e119c6a'
+ depends_on 'icu4c'
+
@springmeyer
springmeyer / osm.pbf to postgis
Created November 1, 2010 07:23
import a pbf file into postgis from geofabrik using osmosis and osm2pgsql
# note: there is work afoot to load pbf directly with osm2pgsql
# http://lists.openstreetmap.org/pipermail/dev/2010-October/020953.html
# but for now osmosis >= 0.37 works best
# install java/osmosis if you don't already have it
sudo apt-get install sun-java6-jre
wget http://bretth.dev.openstreetmap.org/osmosis-build/osmosis-0.37.zip
unzip osmosis-0.37.zip
cd osmosis-0.37
chmod +x bin/osmosis
<?xml version="1.0" ?>
<Map bgcolor="rgb(255,255,255)" srs="+init=epsg:4326">
<Style name="NYC_Structures4326_style">
<Rule>
<PolygonSymbolizer>
<CssParameter name="fill">rgb(78,110,187)</CssParameter>
<CssParameter name="gamma">0.7</CssParameter>
</PolygonSymbolizer>
<LineSymbolizer>
<CssParameter name="stroke-width">0.96</CssParameter>
Index: plugins/input/shape/dbffile.hpp
===================================================================
--- plugins/input/shape/dbffile.hpp (revision 2199)
+++ plugins/input/shape/dbffile.hpp (working copy)
@@ -36,6 +36,7 @@
using mapnik::transcoder;
using mapnik::Feature;
+using namespace boost::iostreams;
$ ./preset2style.py --osm pap.osm --preset kiosk_presets.xml --meta > pap_kiosk_stats.txt
AttributeSource date --> 'osm(9)'
AttributeSourceType --> 'osm(8)'
Attribute_Source_Type --> 'osm(159)'
Attribute_source_date --> 'osm(2602)'
Attribute_source_type --> 'osm(2447)'
Beds --> 'osm(1)'
Damage --> 'osm(1)'
Date --> 'osm(301)'
// pull layers from query string
boost::optional<std::string> layer_string = get_layer_string():
if (layer_string)
{
std::clog << "filtering layers...\n";
// convert comma separated layers to vector
std::vector<std::string> layer_names = parse_layer_string(*layer_string);
// for each map layer object
BOOST_FOREACH ( layer const& lyr, map_.layers() )