Skip to content

Instantly share code, notes, and snippets.

View springmeyer's full-sized avatar

Dane Springmeyer springmeyer

View GitHub Profile
Index: generate_tiles.py
===================================================================
--- generate_tiles.py (revision 26571)
+++ generate_tiles.py (working copy)
@@ -1,15 +1,15 @@
-#!/usr/bin/env python
+#!/usr/bin/python
from math import pi,cos,sin,log,exp,atan
from subprocess import call
import sys, os
@springmeyer
springmeyer / mapnik.xml
Created September 2, 2011 03:04
dynamic colorization of raster elevation data in mapnik and mapserver styles
<!-- renders: http://cl.ly/0t3p3D0a320x0I0M2o2S -->
<Map srs="+init=epsg:4269">
<Style name="terrain">
<Rule>
<RasterSymbolizer>
<!-- http://trac.mapnik.org/wiki/RasterColorizer -->
<RasterColorizer default-mode="linear">
<stop color="#35A86E" value = "1003"/>
2 core 2.66 Ghz mac:
$ nik2img.py tests/data/good_maps/agg_poly_gamma_map.xml t.png
//-- starting rendering timer...
8.95ms (cpu 8.24ms) | rendering style #1 for layer: 'world' and style 'style'
9.04ms (cpu 8.34ms) | rendering total for layer: 'world'
percent rendered: 96.3265% - 236 rendered for 245 queried for layer 'world' and style 'style'
9.13ms (cpu 8.42ms) | total map rendering
//-- rendering timer stopped...
include/mapnik/timer.hpp:59:13: error: member function 'stop' not viable: 'this' argument has type 'const mapnik::timer', but function
is not marked const
stop();
^~~~
include/mapnik/timer.hpp:49:18: note: 'stop' declared here
virtual void stop()
^
include/mapnik/timer.hpp:68:13: error: member function 'stop' not viable: 'this' argument has type 'const mapnik::timer', but function
is not marked const
stop();
Index: include/mapnik/timer.hpp
===================================================================
--- include/mapnik/timer.hpp (revision 3246)
+++ include/mapnik/timer.hpp (working copy)
@@ -40,14 +40,14 @@
void restart()
{
- _wall_clock_end = NULL;
- _cpu_end = NULL;
/*
* Copyright (c) 2004-2006 Apple Computer, Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. The rights granted to you under the License
* may not be used to create, or enable the creation or redistribution of,
In file included from src/feature_style_processor.cpp:53:
include/mapnik/timer.hpp:43:25: error: no viable overloaded '='
_wall_clock_end = NULL;
~~~~~~~~~~~~~~~ ^ ~~~~
/usr/include/sys/_structs.h:100:1: note: candidate function (the implicit copy assignment operator) not viable: no known conversion
from 'long' to 'const timeval' for 1st argument;
_STRUCT_TIMEVAL
^
/usr/include/sys/_structs.h:99:33: note: expanded from:
#define _STRUCT_TIMEVAL struct timeval
Index: jmeter/mapnik/mapserver-vector_3857_pg.jmx
===================================================================
--- jmeter/mapnik/mapserver-vector_3857_pg.jmx (revision 7142)
+++ jmeter/mapnik/mapserver-vector_3857_pg.jmx (working copy)
@@ -31,7 +31,7 @@
<stringProp name="LoopController.loops">100</stringProp>
</LoopController>
<hashTree>
- <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="1" enabled="true">
+ <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="1" enabled="true">
@springmeyer
springmeyer / ruby-mapnik.sh
Created August 30, 2011 05:49
compile ruby-mapnik against mapnik trunk
sudo gem update --system
export ARCHFLAGS="-arch x86_64"
git clone git://github.com/jasonroelofs/rice.git
cd rice
./bootstrap
./configure --disable-dependency-tracking
make && sudo make install
cd ../
sudo gem install hoe rake-compiler ZenTest
git clone git://github.com/mapnik/Ruby-Mapnik.git
@springmeyer
springmeyer / open-streets-dc.xml
Created August 29, 2011 06:43
open-streets-dc compiled with carto c++
<?xml version="1.0" encoding="utf-8"?>
<Map srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over" background-color="rgb(255,255,255)">
<FontSet name="d2488cd76df7f96d">
<Font face-name="Ubuntu Regular"/>
<Font face-name="Arial Regular"/>
<Font face-name="DejaVu Sans Book"/>
</FontSet>
<Style name="#processed_p">
<Rule>
<MaxScaleDenominator>400000</MaxScaleDenominator>