Skip to content
This repository
Browse code

cpp coding style cleanups

  • Loading branch information...
commit 3a029356a5619b55f8f48df5877ecd92a5db49f9 1 parent 0f1386a
Dane Springmeyer authored April 12, 2012

Showing 47 changed files with 944 additions and 1,072 deletions. Show diff stats Hide diff stats

  1. 1  .gitignore
  2. 4  Makefile
  3. 225  src/ds_emitter.hpp
  4. 18  src/js_grid_utils.hpp
  5. 4  src/mapnik_.cpp
  6. 4  src/mapnik_.hpp
  7. 36  src/mapnik_color.cpp
  8. 6  src/mapnik_color.hpp
  9. 48  src/mapnik_datasource.cpp
  10. 4  src/mapnik_datasource.hpp
  11. 18  src/mapnik_expression.cpp
  12. 4  src/mapnik_expression.hpp
  13. 40  src/mapnik_feature.cpp
  14. 4  src/mapnik_feature.hpp
  15. 14  src/mapnik_featureset.cpp
  16. 6  src/mapnik_featureset.hpp
  17. 34  src/mapnik_fonts.hpp
  18. 20  src/mapnik_geometry.cpp
  19. 4  src/mapnik_geometry.hpp
  20. 133  src/mapnik_grid.cpp
  21. 6  src/mapnik_grid.hpp
  22. 109  src/mapnik_grid_view.cpp
  23. 6  src/mapnik_grid_view.hpp
  24. 165  src/mapnik_image.cpp
  25. 6  src/mapnik_image.hpp
  26. 113  src/mapnik_image_view.cpp
  27. 6  src/mapnik_image_view.hpp
  28. 24  src/mapnik_js_datasource.cpp
  29. 4  src/mapnik_js_datasource.hpp
  30. 30  src/mapnik_layer.cpp
  31. 8  src/mapnik_layer.hpp
  32. 367  src/mapnik_map.cpp
  33. 8  src/mapnik_map.hpp
  34. 32  src/mapnik_memory_datasource.cpp
  35. 4  src/mapnik_memory_datasource.hpp
  36. 6  src/mapnik_palette.cpp
  37. 4  src/mapnik_palette.hpp
  38. 4  src/mapnik_plugins.hpp
  39. 212  src/mapnik_projection.cpp
  40. 4  src/mapnik_projection.hpp
  41. 4  src/mapnik_query.cpp
  42. 4  src/mapnik_query.hpp
  43. 32  src/mem_datasource.hpp
  44. 188  src/node_mapnik.cpp
  45. 24  src/utils.hpp
  46. 12  tools/cpp.el
  47. 7  tools/fix_cpp_style.sh
1  .gitignore
@@ -9,3 +9,4 @@ test/tmp
9 9
 lib/_mapnik.node
10 10
 lib/mapnik_settings.js
11 11
 node_modules/
  12
+src/*.*~
4  Makefile
@@ -44,6 +44,10 @@ endif
44 44
 fix:
45 45
 	@fixjsstyle lib/*js bin/*js test/*js examples/*/*.js examples/*/*/*.js
46 46
 
  47
+fixc:
  48
+	@tools/fix_cpp_style.sh
  49
+	@rm src/*.*~
  50
+
47 51
 lint:
48 52
 	@./node_modules/.bin/jshint lib/*js bin/*js test/*js examples/*/*.js examples/*/*/*.js
49 53
 
225  src/ds_emitter.hpp
@@ -23,15 +23,15 @@ static void describe_datasource(Local<Object> description, mapnik::datasource_pt
23 23
     {
24 24
         // todo collect active attributes in styles
25 25
         /*
26  
-        std::vector<std::string> const& style_names = layer.styles();
27  
-        Local<Array> s = Array::New(style_names.size());
28  
-        for (unsigned i = 0; i < style_names.size(); ++i)
29  
-        {
30  
-            s->Set(i, String::New(style_names[i].c_str()) );
31  
-        }
32  
-        meta->Set(String::NewSymbol("styles"), s );
  26
+          std::vector<std::string> const& style_names = layer.styles();
  27
+          Local<Array> s = Array::New(style_names.size());
  28
+          for (unsigned i = 0; i < style_names.size(); ++i)
  29
+          {
  30
+          s->Set(i, String::New(style_names[i].c_str()) );
  31
+          }
  32
+          meta->Set(String::NewSymbol("styles"), s );
33 33
         */
34  
-    
  34
+
35 35
         // type
36 36
         if (ds->type() == mapnik::datasource::Raster)
37 37
         {
@@ -41,7 +41,7 @@ static void describe_datasource(Local<Object> description, mapnik::datasource_pt
41 41
         {
42 42
             description->Set(String::NewSymbol("type"), String::New("vector"));
43 43
         }
44  
-    
  44
+
45 45
         // extent
46 46
         Local<Array> a = Array::New(4);
47 47
         mapnik::box2d<double> e = ds->envelope();
@@ -50,12 +50,12 @@ static void describe_datasource(Local<Object> description, mapnik::datasource_pt
50 50
         a->Set(2, Number::New(e.maxx()));
51 51
         a->Set(3, Number::New(e.maxy()));
52 52
         description->Set(String::NewSymbol("extent"), a);
53  
-    
  53
+
54 54
         mapnik::layer_descriptor ld = ds->get_descriptor();
55  
-    
  55
+
56 56
         // encoding
57 57
         description->Set(String::NewSymbol("encoding"), String::New(ld.get_encoding().c_str()));
58  
-    
  58
+
59 59
         // field names and types
60 60
         Local<Object> fields = Object::New();
61 61
         std::vector<mapnik::attribute_descriptor> const& desc = ld.get_descriptors();
@@ -77,20 +77,20 @@ static void describe_datasource(Local<Object> description, mapnik::datasource_pt
77 77
             ++itr;
78 78
         }
79 79
         description->Set(String::NewSymbol("fields"), fields);
80  
-    
  80
+
81 81
         mapnik::query q(ds->envelope());
82 82
 
83 83
         mapnik::featureset_ptr fs = ds->features(q);
84 84
         description->Set(String::NewSymbol("geometry_type"), Undefined());
85 85
         description->Set(String::NewSymbol("has_features"), False());
86  
-    
  86
+
87 87
         // TODO - need to remove this after this lands:
88 88
         // https://github.com/mapnik/mapnik/issues/701
89 89
         if (fs)
90 90
         {
91 91
             mapnik::feature_ptr fp = fs->next();
92 92
             if (fp) {
93  
-    
  93
+
94 94
                 description->Set(String::NewSymbol("has_features"), True());
95 95
                 if (fp->num_geometries() > 0)
96 96
                 {
@@ -99,37 +99,37 @@ static void describe_datasource(Local<Object> description, mapnik::datasource_pt
99 99
                     Local<String> js_type = String::New("unknown");
100 100
                     switch (g_type)
101 101
                     {
102  
-                        case mapnik::Point:
103  
-                        {
104  
-                           if (fp->num_geometries() > 1) {
105  
-                               js_type = String::New("multipoint");
106  
-                           } else {
107  
-                               js_type = String::New("point");
108  
-                           }
109  
-                           break;
110  
-                        }
111  
-                        case mapnik::Polygon:
112  
-                        {
113  
-                           if (fp->num_geometries() > 1) {
114  
-                               js_type = String::New("multipolygon");
115  
-                           } else {
116  
-                               js_type = String::New("polygon");
117  
-                           }
118  
-                           break;
  102
+                    case mapnik::Point:
  103
+                    {
  104
+                        if (fp->num_geometries() > 1) {
  105
+                            js_type = String::New("multipoint");
  106
+                        } else {
  107
+                            js_type = String::New("point");
119 108
                         }
120  
-                        case mapnik::LineString:
121  
-                        {
122  
-                           if (fp->num_geometries() > 1) {
123  
-                               js_type = String::New("multilinestring");
124  
-                           } else {
125  
-                               js_type = String::New("linestring");
126  
-                           }
127  
-                           break;
  109
+                        break;
  110
+                    }
  111
+                    case mapnik::Polygon:
  112
+                    {
  113
+                        if (fp->num_geometries() > 1) {
  114
+                            js_type = String::New("multipolygon");
  115
+                        } else {
  116
+                            js_type = String::New("polygon");
128 117
                         }
129  
-                        default:
130  
-                        {
131  
-                           break;
  118
+                        break;
  119
+                    }
  120
+                    case mapnik::LineString:
  121
+                    {
  122
+                        if (fp->num_geometries() > 1) {
  123
+                            js_type = String::New("multilinestring");
  124
+                        } else {
  125
+                            js_type = String::New("linestring");
132 126
                         }
  127
+                        break;
  128
+                    }
  129
+                    default:
  130
+                    {
  131
+                        break;
  132
+                    }
133 133
                     }
134 134
                     description->Set(String::NewSymbol("geometry_type"), js_type);
135 135
                 }
@@ -139,12 +139,12 @@ static void describe_datasource(Local<Object> description, mapnik::datasource_pt
139 139
     catch (const std::exception & ex)
140 140
     {
141 141
         ThrowException(Exception::Error(
142  
-          String::New(ex.what())));
  142
+                           String::New(ex.what())));
143 143
     }
144 144
     catch (...)
145 145
     {
146 146
         ThrowException(Exception::Error(
147  
-          String::New("unknown exception happened when calling describe_datasource, please file bug")));
  147
+                           String::New("unknown exception happened when calling describe_datasource, please file bug")));
148 148
     }
149 149
 }
150 150
 
@@ -154,12 +154,7 @@ static void datasource_features(Local<Array> a, mapnik::datasource_ptr ds, unsig
154 154
 
155 155
     try
156 156
     {
157  
-    #if MAPNIK_VERSION >= 800
158 157
         mapnik::query q(ds->envelope());
159  
-    #else
160  
-        mapnik::query q(ds->envelope(),1.0,1.0);
161  
-    #endif
162  
-    
163 158
         mapnik::layer_descriptor ld = ds->get_descriptor();
164 159
         std::vector<mapnik::attribute_descriptor> const& desc = ld.get_descriptors();
165 160
         std::vector<mapnik::attribute_descriptor>::const_iterator itr = desc.begin();
@@ -169,7 +164,7 @@ static void datasource_features(Local<Array> a, mapnik::datasource_ptr ds, unsig
169 164
             q.add_property_name(itr->get_name());
170 165
             ++itr;
171 166
         }
172  
-    
  167
+
173 168
         mapnik::featureset_ptr fs = ds->features(q);
174 169
         if (fs)
175 170
         {
@@ -188,10 +183,10 @@ static void datasource_features(Local<Array> a, mapnik::datasource_ptr ds, unsig
188 183
                         // not a mapnik::value_holder
189 184
                         boost::apply_visitor( serializer, boost::get<1>(*itr).base() );
190 185
                     }
191  
-    
  186
+
192 187
                     // add feature id
193 188
                     feat->Set(String::NewSymbol("__id__"), Integer::New(fp->id()));
194  
-        
  189
+
195 190
                     a->Set(idx, feat);
196 191
                 }
197 192
                 ++idx;
@@ -201,136 +196,16 @@ static void datasource_features(Local<Array> a, mapnik::datasource_ptr ds, unsig
201 196
     catch (const std::exception & ex)
202 197
     {
203 198
         ThrowException(Exception::Error(
204  
-          String::New(ex.what())));
  199
+                           String::New(ex.what())));
205 200
     }
206 201
     catch (...)
207 202
     {
208 203
         ThrowException(Exception::Error(
209  
-          String::New("unknown exception happened when calling datasource_features, please file bug")));
  204
+                           String::New("unknown exception happened when calling datasource_features, please file bug")));
210 205
     }
211 206
 
212 207
 }
213 208
 
214  
-/*
215  
-// start, limit
216  
-static void datasource_stats(Local<Object> stats, mapnik::datasource_ptr ds, unsigned first, unsigned last)
217  
-{
218  
-    // TODO 
219  
-    // for strings, collect first 15 unique
220  
-    // allow options to specific which fields
221  
-
222  
-#if MAPNIK_VERSION >= 800
223  
-    mapnik::query q(ds->envelope());
224  
-#else
225  
-    mapnik::query q(ds->envelope(),1.0,1.0);
226  
-#endif
227  
-
228  
-    mapnik::layer_descriptor ld = ds->get_descriptor();
229  
-    std::vector<mapnik::attribute_descriptor> const& desc = ld.get_descriptors();
230  
-    Local<Object> fields = Object::New();
231  
-    std::vector<mapnik::attribute_descriptor>::const_iterator itr = desc.begin();
232  
-    std::vector<mapnik::attribute_descriptor>::const_iterator end = desc.end();
233  
-    unsigned int size = 0;
234  
-    typedef std::vector<mapnik::value> vals;
235  
-    std::map<std::string, vals > values;
236  
-    //Local<Object> values = Object::New();
237  
-    while (itr != end)
238  
-    {
239  
-        q.add_property_name(itr->get_name());
240  
-        Local<Object> field_hash = Object::New();
241  
-        int field_type = itr->get_type();
242  
-        std::string type("");
243  
-        if (field_type == 1) type = "Number";
244  
-        else if (field_type == 2) type = "Number";
245  
-        else if (field_type == 3) type = "Number";
246  
-        else if (field_type == 4) type = "String";
247  
-        else if (field_type == 5) type = "Geometry";
248  
-        else if (field_type == 6) type = "Mapnik Object";
249  
-        field_hash->Set(String::NewSymbol("type"),String::New(type.c_str()));
250  
-        fields->Set(String::NewSymbol(itr->get_name().c_str()),field_hash);
251  
-        //values->Set(String::NewSymbol(itr->get_name().c_str()),Local<Array>::New());
252  
-        ++itr;
253  
-        ++size;
254  
-    }
255  
-    stats->Set(String::NewSymbol("fields"), fields);
256  
-
257  
-    // todo - ability to get mapnik features without also parseing geometries
258  
-    mapnik::featureset_ptr fs = ds->features(q);
259  
-    unsigned idx = 0;
260  
-    if (fs)
261  
-    {
262  
-        mapnik::feature_ptr fp;
263  
-        typedef std::map<std::string,mapnik::value> properties;
264  
-        properties min_prop;
265  
-        properties max_prop;
266  
-        first = true;
267  
-        while ((fp = fs->next()))
268  
-        {
269  
-            ++idx;
270  
-            properties const& fprops = fp->props();
271  
-            properties::const_iterator it;
272  
-            properties::const_iterator end;
273  
-            if (first){
274  
-                first = false;
275  
-                it = fprops.begin();
276  
-                end = fprops.end();
277  
-                for (; it != end; ++it)
278  
-                {
279  
-                    min_prop[it->first] = it->second;
280  
-                    max_prop[it->first] = it->second;
281  
-                    vals& v = values[it->first];
282  
-                    if(std::find(v.begin(), v.end(), it->second) == v.end()) {
283  
-                        v.push_back(it->second);
284  
-                    }
285  
-                }
286  
-            }
287  
-            else
288  
-            {
289  
-                it = fprops.begin();
290  
-                end = fprops.end();
291  
-                for (; it != end; ++it)
292  
-                {
293  
-                    vals& v = values[it->first];
294  
-                    if(std::find(v.begin(), v.end(), it->second) == v.end()) {
295  
-                        v.push_back(it->second);
296  
-                        if (it->second > max_prop[it->first])
297  
-                            max_prop[it->first] = it->second;
298  
-                            
299  
-                        if (it->second < min_prop[it->first])
300  
-                            min_prop[it->first] = it->second;
301  
-                    }
302  
-                }
303  
-            }
304  
-        }
305  
-        
306  
-        Local<Array> names = fields->GetPropertyNames();
307  
-        uint32_t i = 0;
308  
-        uint32_t a_length = names->Length();
309  
-        while (i < a_length) {
310  
-            Local<Value> name = names->Get(i)->ToString();
311  
-            Local<Object> hash = fields->Get(name)->ToObject();
312  
-            std::string key = TOSTR(name);
313  
-            node_mapnik::params_to_object serializer_min(hash, "min");
314  
-            boost::apply_visitor( serializer_min, min_prop[key].base() );
315  
-            node_mapnik::params_to_object serializer_max(hash, "max");
316  
-            boost::apply_visitor( serializer_max, max_prop[key].base() );
317  
-            vals& v = values[key];
318  
-            unsigned int num_vals = v.size();
319  
-            Local<Array> a = Array::New(num_vals);
320  
-            for (unsigned j = 0; j < num_vals; ++j)
321  
-            {
322  
-                a->Set(j, boost::apply_visitor(value_converter(),v[j].base()) );
323  
-            }
324  
-            hash->Set(String::NewSymbol("values"),a);
325  
-            i++;
326  
-        }
327  
-        
328  
-    }
329  
-    
330  
-    stats->Set(String::NewSymbol("count"), Number::New(idx));
331  
-}
332  
-*/
333  
-
334 209
 }
335 210
 
336 211
 #endif
18  src/js_grid_utils.hpp
@@ -15,9 +15,9 @@ using namespace node;
15 15
 namespace node_mapnik {
16 16
 
17 17
 template <typename T, typename ArrayType>
18  
-static void grid2utf(T const& grid_type, 
19  
-    ArrayType const& l,
20  
-    std::vector<typename T::lookup_type>& key_order)
  18
+static void grid2utf(T const& grid_type,
  19
+                     ArrayType const& l,
  20
+                     std::vector<typename T::lookup_type>& key_order)
21 21
 {
22 22
     typename T::data_type const& data = grid_type.data();
23 23
     typename T::feature_key_type const& feature_keys = grid_type.get_feature_keys();
@@ -67,10 +67,10 @@ static void grid2utf(T const& grid_type,
67 67
 // requires mapnik >= r2957
68 68
 
69 69
 template <typename T, typename ArrayType>
70  
-static void grid2utf(T const& grid_type, 
71  
-    ArrayType const& l,
72  
-    std::vector<typename T::lookup_type>& key_order,
73  
-    unsigned int resolution)
  70
+static void grid2utf(T const& grid_type,
  71
+                     ArrayType const& l,
  72
+                     std::vector<typename T::lookup_type>& key_order,
  73
+                     unsigned int resolution)
74 74
 {
75 75
     typename T::feature_key_type const& feature_keys = grid_type.get_feature_keys();
76 76
     typename T::key_type keys;
@@ -120,8 +120,8 @@ static void grid2utf(T const& grid_type,
120 120
 
121 121
 template <typename T>
122 122
 static void write_features(T const& grid_type,
123  
-    Local<Object>& feature_data,
124  
-    std::vector<typename T::lookup_type> const& key_order)
  123
+                           Local<Object>& feature_data,
  124
+                           std::vector<typename T::lookup_type> const& key_order)
125 125
 {
126 126
     std::string const& key = grid_type.get_key();
127 127
     std::set<std::string> const& attributes = grid_type.property_names();
4  src/mapnik_.cpp
@@ -17,8 +17,8 @@ void •::Initialize(Handle<Object> target) {
17 17
 }
18 18
 
19 19
 •::•(std::string const& name) :
20  
-  ObjectWrap(),
21  
-  this_(boost::make_shared<mapnik::•>(name)) {}
  20
+ObjectWrap(),
  21
+    this_(boost::make_shared<mapnik::•>(name)) {}
22 22
 
23 23
 •::~•()
24 24
 {
4  src/mapnik_.hpp
@@ -17,7 +17,7 @@ using namespace node;
17 17
 typedef boost::shared_ptr<mapnik::•> •_ptr;
18 18
 
19 19
 class •: public node::ObjectWrap {
20  
-  public:
  20
+public:
21 21
     static Persistent<FunctionTemplate> constructor;
22 22
     static void Initialize(Handle<Object> target);
23 23
     static Handle<Value> New(const Arguments &args);
@@ -25,7 +25,7 @@ class •: public node::ObjectWrap {
25 25
     •(std::string const& name);
26 26
     •(std::string const& name, std::string const& srs);
27 27
 
28  
-  private:
  28
+private:
29 29
     ~•();
30 30
     •_ptr this_;
31 31
 };
36  src/mapnik_color.cpp
@@ -25,14 +25,14 @@ void Color::Initialize(Handle<Object> target) {
25 25
     ATTR(constructor, "g", get_prop, set_prop);
26 26
     ATTR(constructor, "b", get_prop, set_prop);
27 27
     ATTR(constructor, "a", get_prop, set_prop);
28  
-	
  28
+
29 29
 
30 30
     target->Set(String::NewSymbol("Color"),constructor->GetFunction());
31 31
 }
32 32
 
33 33
 Color::Color() :
34  
-  ObjectWrap(),
35  
-  this_() {}
  34
+    ObjectWrap(),
  35
+    this_() {}
36 36
 
37 37
 Color::~Color()
38 38
 {
@@ -57,20 +57,20 @@ Handle<Value> Color::New(const Arguments& args)
57 57
     color_ptr c_p;
58 58
     try
59 59
     {
60  
-    
  60
+
61 61
         if (args.Length() == 1 && args[0]->IsString()){
62  
-    
  62
+
63 63
             c_p = boost::make_shared<mapnik::color>(TOSTR(args[0]));
64  
-    
  64
+
65 65
         } else if (args.Length() == 3) {
66 66
 
67 67
             int r = args[0]->IntegerValue();
68 68
             int g = args[1]->IntegerValue();
69 69
             int b = args[2]->IntegerValue();
70 70
             c_p = boost::make_shared<mapnik::color>(r,g,b);
71  
-        
  71
+
72 72
         } else if (args.Length() == 4) {
73  
-        
  73
+
74 74
             int r = args[0]->IntegerValue();
75 75
             int g = args[1]->IntegerValue();
76 76
             int b = args[2]->IntegerValue();
@@ -78,9 +78,9 @@ Handle<Value> Color::New(const Arguments& args)
78 78
             c_p = boost::make_shared<mapnik::color>(r,g,b,a);
79 79
         } else {
80 80
             return ThrowException(Exception::Error(
81  
-              String::New("invalid arguments: colors can be created from a string, integer r,g,b values, or integer r,g,b,a values")));
  81
+                                      String::New("invalid arguments: colors can be created from a string, integer r,g,b values, or integer r,g,b,a values")));
  82
+
82 83
 
83  
-        
84 84
         }
85 85
         // todo allow int,int,int and int,int,int,int contructor
86 86
 
@@ -88,12 +88,12 @@ Handle<Value> Color::New(const Arguments& args)
88 88
     catch (const std::exception & ex)
89 89
     {
90 90
         return ThrowException(Exception::Error(
91  
-          String::New(ex.what())));
  91
+                                  String::New(ex.what())));
92 92
     }
93 93
     catch (...)
94 94
     {
95 95
         return ThrowException(Exception::Error(
96  
-          String::New("unknown exception happened, please file bug")));
  96
+                                  String::New("unknown exception happened, please file bug")));
97 97
     }
98 98
 
99 99
     if (c_p)
@@ -106,7 +106,7 @@ Handle<Value> Color::New(const Arguments& args)
106 106
     else
107 107
     {
108 108
         return ThrowException(Exception::Error(
109  
-          String::New("unknown exception happened, please file bug")));
  109
+                                  String::New("unknown exception happened, please file bug")));
110 110
     }
111 111
 
112 112
     return Undefined();
@@ -123,7 +123,7 @@ Handle<Value> Color::New(mapnik::color const& color) {
123 123
 
124 124
 
125 125
 Handle<Value> Color::get_prop(Local<String> property,
126  
-                         const AccessorInfo& info)
  126
+                              const AccessorInfo& info)
127 127
 {
128 128
     HandleScope scope;
129 129
     Color* c = ObjectWrap::Unwrap<Color>(info.This());
@@ -135,20 +135,20 @@ Handle<Value> Color::get_prop(Local<String> property,
135 135
     else if (a == "g")
136 136
         return scope.Close(Integer::New(c->get()->green()));
137 137
     else if (a == "b")
138  
-        return scope.Close(Integer::New(c->get()->blue()));    
  138
+        return scope.Close(Integer::New(c->get()->blue()));
139 139
     return Undefined();
140 140
 }
141 141
 
142 142
 void Color::set_prop(Local<String> property,
143  
-                         Local<Value> value,
144  
-                         const AccessorInfo& info)
  143
+                     Local<Value> value,
  144
+                     const AccessorInfo& info)
145 145
 {
146 146
     HandleScope scope;
147 147
     Color* c = ObjectWrap::Unwrap<Color>(info.This());
148 148
     std::string a = TOSTR(property);
149 149
     if (!value->IsNumber())
150 150
         ThrowException(Exception::TypeError(
151  
-          String::New("color channel value must be an integer")));
  151
+                           String::New("color channel value must be an integer")));
152 152
     if (a == "a") {
153 153
         c->get()->set_alpha(value->IntegerValue());
154 154
     } else if (a == "r") {
6  src/mapnik_color.hpp
@@ -17,7 +17,7 @@ using namespace node;
17 17
 typedef boost::shared_ptr<mapnik::color> color_ptr;
18 18
 
19 19
 class Color: public node::ObjectWrap {
20  
-  public:
  20
+public:
21 21
     static Persistent<FunctionTemplate> constructor;
22 22
     static void Initialize(Handle<Object> target);
23 23
     static Handle<Value> New(const Arguments &args);
@@ -26,14 +26,14 @@ class Color: public node::ObjectWrap {
26 26
     static Handle<Value> hex(const Arguments &args);
27 27
 
28 28
     static Handle<Value> get_prop(Local<String> property,
29  
-                         const AccessorInfo& info);
  29
+                                  const AccessorInfo& info);
30 30
     static void set_prop(Local<String> property,
31 31
                          Local<Value> value,
32 32
                          const AccessorInfo& info);
33 33
     Color();
34 34
     inline color_ptr get() { return this_; }
35 35
 
36  
-  private:
  36
+private:
37 37
     ~Color();
38 38
     color_ptr this_;
39 39
 };
48  src/mapnik_datasource.cpp
@@ -29,8 +29,8 @@ void Datasource::Initialize(Handle<Object> target) {
29 29
 }
30 30
 
31 31
 Datasource::Datasource() :
32  
-  ObjectWrap(),
33  
-  datasource_() {}
  32
+    ObjectWrap(),
  33
+    datasource_() {}
34 34
 
35 35
 Datasource::~Datasource()
36 36
 {
@@ -52,26 +52,26 @@ Handle<Value> Datasource::New(const Arguments& args)
52 52
         if (d->datasource_->type() == mapnik::datasource::Raster)
53 53
         {
54 54
             args.This()->Set(String::NewSymbol("type"),
55  
-                String::NewSymbol("raster"),
56  
-                static_cast<v8::PropertyAttribute>(v8::ReadOnly|v8::DontDelete));
  55
+                             String::NewSymbol("raster"),
  56
+                             static_cast<v8::PropertyAttribute>(v8::ReadOnly|v8::DontDelete));
57 57
         }
58 58
         else
59 59
         {
60 60
             args.This()->Set(String::NewSymbol("type"),
61  
-                String::NewSymbol("vector"),
62  
-                static_cast<v8::PropertyAttribute>(v8::ReadOnly|v8::DontDelete));
  61
+                             String::NewSymbol("vector"),
  62
+                             static_cast<v8::PropertyAttribute>(v8::ReadOnly|v8::DontDelete));
63 63
         }
64 64
         d->Wrap(args.This());
65 65
         return args.This();
66 66
     }
67 67
     if (!args.Length() == 1){
68 68
         return ThrowException(Exception::TypeError(
69  
-          String::New("accepts only one argument, an object of key:value datasource options")));
  69
+                                  String::New("accepts only one argument, an object of key:value datasource options")));
70 70
     }
71 71
 
72 72
     if (!args[0]->IsObject())
73 73
         return ThrowException(Exception::TypeError(
74  
-          String::New("Must provide an object, eg {type: 'shape', file : 'world.shp'}")));
  74
+                                  String::New("Must provide an object, eg {type: 'shape', file : 'world.shp'}")));
75 75
 
76 76
     Local<Object> options = args[0]->ToObject();
77 77
 
@@ -82,8 +82,8 @@ Handle<Value> Datasource::New(const Arguments& args)
82 82
     {
83 83
         Local<Value> bind_opt = options->Get(String::New("bind"));
84 84
         if (!bind_opt->IsBoolean())
85  
-          return ThrowException(Exception::TypeError(
86  
-            String::New("'bind' must be a Boolean")));
  85
+            return ThrowException(Exception::TypeError(
  86
+                                      String::New("'bind' must be a Boolean")));
87 87
 
88 88
         bind = bind_opt->BooleanValue();
89 89
     }
@@ -108,26 +108,26 @@ Handle<Value> Datasource::New(const Arguments& args)
108 108
     catch (const std::exception & ex)
109 109
     {
110 110
         return ThrowException(Exception::Error(
111  
-          String::New(ex.what())));
  111
+                                  String::New(ex.what())));
112 112
     }
113 113
     catch (...)
114 114
     {
115 115
         return ThrowException(Exception::Error(
116  
-          String::New("unknown exception happened, please file bug")));
  116
+                                  String::New("unknown exception happened, please file bug")));
117 117
     }
118 118
     if (ds)
119 119
     {
120 120
         if (ds->type() == mapnik::datasource::Raster)
121 121
         {
122 122
             args.This()->Set(String::NewSymbol("type"),
123  
-                String::NewSymbol("raster"),
124  
-                static_cast<v8::PropertyAttribute>(v8::ReadOnly|v8::DontDelete));
  123
+                             String::NewSymbol("raster"),
  124
+                             static_cast<v8::PropertyAttribute>(v8::ReadOnly|v8::DontDelete));
125 125
         }
126 126
         else
127 127
         {
128 128
             args.This()->Set(String::NewSymbol("type"),
129  
-                String::NewSymbol("vector"),
130  
-                static_cast<v8::PropertyAttribute>(v8::ReadOnly|v8::DontDelete));
  129
+                             String::NewSymbol("vector"),
  130
+                             static_cast<v8::PropertyAttribute>(v8::ReadOnly|v8::DontDelete));
131 131
         }
132 132
         Datasource* d = new Datasource();
133 133
         d->Wrap(args.This());
@@ -173,12 +173,12 @@ Handle<Value> Datasource::describe(const Arguments& args)
173 173
     catch (const std::exception & ex )
174 174
     {
175 175
         return ThrowException(Exception::Error(
176  
-          String::New(ex.what())));
  176
+                                  String::New(ex.what())));
177 177
     }
178 178
     catch (...)
179 179
     {
180 180
         return ThrowException(Exception::Error(
181  
-          String::New("unknown exception happened describing datasource, please file bug")));
  181
+                                  String::New("unknown exception happened describing datasource, please file bug")));
182 182
     }
183 183
 
184 184
     return scope.Close(description);
@@ -196,7 +196,7 @@ Handle<Value> Datasource::features(const Arguments& args)
196 196
     {
197 197
         if (!args[0]->IsNumber() || !args[1]->IsNumber())
198 198
             return ThrowException(Exception::Error(
199  
-               String::New("Index of 'first' and 'last' feature must be an integer")));
  199
+                                      String::New("Index of 'first' and 'last' feature must be an integer")));
200 200
         first = args[0]->IntegerValue();
201 201
         last = args[1]->IntegerValue();
202 202
     }
@@ -212,12 +212,12 @@ Handle<Value> Datasource::features(const Arguments& args)
212 212
     catch (const std::exception & ex )
213 213
     {
214 214
         return ThrowException(Exception::Error(
215  
-          String::New(ex.what())));
  215
+                                  String::New(ex.what())));
216 216
     }
217 217
     catch (...)
218 218
     {
219 219
         return ThrowException(Exception::Error(
220  
-          String::New("unknown exception happened slicing datasource, please file bug")));
  220
+                                  String::New("unknown exception happened slicing datasource, please file bug")));
221 221
     }
222 222
 
223 223
     return scope.Close(a);
@@ -243,18 +243,18 @@ Handle<Value> Datasource::featureset(const Arguments& args)
243 243
             q.add_property_name(itr->get_name());
244 244
             ++itr;
245 245
         }
246  
-        
  246
+
247 247
         fs = ds->datasource_->features(q);
248 248
     }
249 249
     catch (const std::exception & ex)
250 250
     {
251 251
         return ThrowException(Exception::Error(
252  
-          String::New(ex.what())));
  252
+                                  String::New(ex.what())));
253 253
     }
254 254
     catch (...)
255 255
     {
256 256
         return ThrowException(Exception::Error(
257  
-          String::New("unknown exception happened getting featureset, please file bug")));
  257
+                                  String::New("unknown exception happened getting featureset, please file bug")));
258 258
     }
259 259
 
260 260
     if (fs)
4  src/mapnik_datasource.hpp
@@ -11,7 +11,7 @@ using namespace v8;
11 11
 using namespace node;
12 12
 
13 13
 class Datasource: public node::ObjectWrap {
14  
-  public:
  14
+public:
15 15
     static Persistent<FunctionTemplate> constructor;
16 16
     static void Initialize(Handle<Object> target);
17 17
     static Handle<Value> New(const Arguments &args);
@@ -25,7 +25,7 @@ class Datasource: public node::ObjectWrap {
25 25
     Datasource();
26 26
     inline mapnik::datasource_ptr get() { return datasource_; }
27 27
 
28  
-  private:
  28
+private:
29 29
     ~Datasource();
30 30
     mapnik::datasource_ptr datasource_;
31 31
 };
18  src/mapnik_expression.cpp
@@ -22,8 +22,8 @@ void Expression::Initialize(Handle<Object> target) {
22 22
 }
23 23
 
24 24
 Expression::Expression() :
25  
-  ObjectWrap(),
26  
-  this_() {}
  25
+    ObjectWrap(),
  26
+    this_() {}
27 27
 
28 28
 Expression::~Expression()
29 29
 {
@@ -50,21 +50,21 @@ Handle<Value> Expression::New(const Arguments& args)
50 50
     {
51 51
         if (args.Length() == 1 && args[0]->IsString()){
52 52
             e_ptr = mapnik::parse_expression(TOSTR(args[0]),"utf8");
53  
-    
  53
+
54 54
         } else {
55 55
             return ThrowException(Exception::Error(
56  
-              String::New("invalid arguments: accepts a single argument of string type")));
  56
+                                      String::New("invalid arguments: accepts a single argument of string type")));
57 57
         }
58 58
     }
59 59
     catch (const std::exception & ex)
60 60
     {
61 61
         return ThrowException(Exception::Error(
62  
-          String::New(ex.what())));
  62
+                                  String::New(ex.what())));
63 63
     }
64 64
     catch (...)
65 65
     {
66 66
         return ThrowException(Exception::Error(
67  
-          String::New("unknown exception happened, please file bug")));
  67
+                                  String::New("unknown exception happened, please file bug")));
68 68
     }
69 69
 
70 70
     if (e_ptr)
@@ -77,7 +77,7 @@ Handle<Value> Expression::New(const Arguments& args)
77 77
     else
78 78
     {
79 79
         return ThrowException(Exception::Error(
80  
-          String::New("unknown exception happened, please file bug")));
  80
+                                  String::New("unknown exception happened, please file bug")));
81 81
     }
82 82
 
83 83
     return Undefined();
@@ -97,7 +97,7 @@ Handle<Value> Expression::evaluate(const Arguments& args)
97 97
 
98 98
     if (!args.Length() > 0) {
99 99
         return ThrowException(Exception::Error(
100  
-          String::New("requires a mapnik.Feature as an argument")));
  100
+                                  String::New("requires a mapnik.Feature as an argument")));
101 101
     }
102 102
 
103 103
     Local<Object> obj = args[0]->ToObject();
@@ -114,4 +114,4 @@ Handle<Value> Expression::evaluate(const Arguments& args)
114 114
     Expression* e = ObjectWrap::Unwrap<Expression>(args.This());
115 115
     mapnik::value value_obj = boost::apply_visitor(mapnik::evaluate<mapnik::Feature,mapnik::value>(*(f->get())),*(e->get()));
116 116
     return scope.Close(boost::apply_visitor(node_mapnik::value_converter(),value_obj.base()));
117  
-}
  117
+}
4  src/mapnik_expression.hpp
@@ -19,7 +19,7 @@ using namespace v8;
19 19
 using namespace node;
20 20
 
21 21
 class Expression: public node::ObjectWrap {
22  
-  public:
  22
+public:
23 23
     static Persistent<FunctionTemplate> constructor;
24 24
     static void Initialize(Handle<Object> target);
25 25
     static Handle<Value> New(const Arguments &args);
@@ -29,7 +29,7 @@ class Expression: public node::ObjectWrap {
29 29
     Expression();
30 30
     inline mapnik::expression_ptr get() { return this_; }
31 31
 
32  
-  private:
  32
+private:
33 33
     ~Expression();
34 34
     mapnik::expression_ptr this_;
35 35
 };
40  src/mapnik_feature.cpp
@@ -22,7 +22,7 @@ void Feature::Initialize(Handle<Object> target) {
22 22
     constructor = Persistent<FunctionTemplate>::New(FunctionTemplate::New(Feature::New));
23 23
     constructor->InstanceTemplate()->SetInternalFieldCount(1);
24 24
     constructor->SetClassName(String::NewSymbol("Feature"));
25  
-    
  25
+
26 26
     NODE_SET_PROTOTYPE_METHOD(constructor, "id", id);
27 27
     NODE_SET_PROTOTYPE_METHOD(constructor, "extent", extent);
28 28
     NODE_SET_PROTOTYPE_METHOD(constructor, "attributes", attributes);
@@ -35,16 +35,16 @@ void Feature::Initialize(Handle<Object> target) {
35 35
 }
36 36
 
37 37
 Feature::Feature(mapnik::feature_ptr f) :
38  
-  ObjectWrap(),
39  
-  this_(f) {}
  38
+    ObjectWrap(),
  39
+    this_(f) {}
40 40
 
41 41
 Feature::Feature(int id) :
42  
-  ObjectWrap(),
43  
-  this_() {
  42
+    ObjectWrap(),
  43
+    this_() {
44 44
     // TODO - accept/require context object to reused
45 45
     ctx_ = boost::make_shared<mapnik::context_type>();
46 46
     this_ = mapnik::feature_factory::create(ctx_,id);
47  
-  }
  47
+}
48 48
 
49 49
 Feature::~Feature()
50 50
 {
@@ -67,12 +67,12 @@ Handle<Value> Feature::New(const Arguments& args)
67 67
     }
68 68
 
69 69
     // TODO - expose mapnik.Context
70  
-    
  70
+
71 71
     if (args.Length() > 1 || args.Length() < 1 || !args[0]->IsNumber()) {
72 72
         return ThrowException(Exception::TypeError(
73  
-          String::New("requires one argument: an integer feature id")));
  73
+                                  String::New("requires one argument: an integer feature id")));
74 74
     }
75  
-    
  75
+
76 76
     Feature* f = new Feature(args[0]->IntegerValue());
77 77
     f->Wrap(args.This());
78 78
     return args.This();
@@ -108,7 +108,7 @@ Handle<Value> Feature::extent(const Arguments& args)
108 108
     a->Set(1, Number::New(e.miny()));
109 109
     a->Set(2, Number::New(e.maxx()));
110 110
     a->Set(3, Number::New(e.maxy()));
111  
- 
  111
+
112 112
     return scope.Close(a);
113 113
 }
114 114
 
@@ -117,7 +117,7 @@ Handle<Value> Feature::attributes(const Arguments& args)
117 117
     HandleScope scope;
118 118
 
119 119
     Feature* fp = ObjectWrap::Unwrap<Feature>(args.This());
120  
-    
  120
+
121 121
     Local<Object> feat = Object::New();
122 122
 
123 123
     mapnik::feature_ptr feature = fp->get();
@@ -128,7 +128,7 @@ Handle<Value> Feature::attributes(const Arguments& args)
128 128
         node_mapnik::params_to_object serializer( feat , boost::get<0>(*itr));
129 129
         boost::apply_visitor( serializer, boost::get<1>(*itr).base() );
130 130
     }
131  
-    
  131
+
132 132
     return scope.Close(feat);
133 133
 }
134 134
 
@@ -154,7 +154,7 @@ Handle<Value> Feature::addGeometry(const Arguments& args)
154 154
             Local<Object> obj = value->ToObject();
155 155
             if (Geometry::constructor->HasInstance(obj)) {
156 156
                 Geometry* g = ObjectWrap::Unwrap<Geometry>(obj);
157  
-            
  157
+
158 158
                 try
159 159
                 {
160 160
                     std::auto_ptr<mapnik::geometry_type> geom_ptr = g->get();
@@ -163,17 +163,17 @@ Handle<Value> Feature::addGeometry(const Arguments& args)
163 163
                         geom_ptr.release();
164 164
                     } else {
165 165
                         return ThrowException(Exception::Error(
166  
-                          String::New("empty geometry!")));
  166
+                                                  String::New("empty geometry!")));
167 167
                     }
168 168
                 }
169 169
                 catch (const std::exception & ex )
170 170
                 {
171 171
                     return ThrowException(Exception::Error(
172  
-                      String::New(ex.what())));
  172
+                                              String::New(ex.what())));
173 173
                 }
174 174
                 catch (...) {
175 175
                     return ThrowException(Exception::Error(
176  
-                      String::New("Unknown exception happended - please report bug")));
  176
+                                              String::New("Unknown exception happended - please report bug")));
177 177
                 }
178 178
             }
179 179
         }
@@ -225,11 +225,11 @@ Handle<Value> Feature::addAttributes(const Arguments& args)
225 225
             catch (const std::exception & ex )
226 226
             {
227 227
                 return ThrowException(Exception::Error(
228  
-                  String::New(ex.what())));
  228
+                                          String::New(ex.what())));
229 229
             }
230 230
             catch (...) {
231 231
                 return ThrowException(Exception::Error(
232  
-                  String::New("Unknown exception happended - please report bug")));
  232
+                                          String::New("Unknown exception happended - please report bug")));
233 233
             }
234 234
         }
235 235
     }
@@ -256,11 +256,11 @@ Handle<Value> Feature::toJSON(const Arguments& args)
256 256
     if (!generator.generate(json,*(fp->get())))
257 257
     {
258 258
         return ThrowException(Exception::Error(
259  
-          String::New("Failed to generate GeoJSON")));
  259
+                                  String::New("Failed to generate GeoJSON")));
260 260
     }
261 261
 #else
262 262
     return ThrowException(Exception::Error(
263  
-      String::New("GeoJSON output requires at least boost 1.47 ")));
  263
+                              String::New("GeoJSON output requires at least boost 1.47 ")));
264 264
 #endif
265 265
 
266 266
     return scope.Close(String::New(json.c_str()));
4  src/mapnik_feature.hpp
@@ -17,7 +17,7 @@ using namespace node;
17 17
 
18 18
 
19 19
 class Feature: public node::ObjectWrap {
20  
-  public:
  20
+public:
21 21
     static Persistent<FunctionTemplate> constructor;
22 22
     static void Initialize(Handle<Object> target);
23 23
     static Handle<Value> New(const Arguments &args);
@@ -38,7 +38,7 @@ class Feature: public node::ObjectWrap {
38 38
     Feature(int id);
39 39
     inline mapnik::feature_ptr get() { return this_; }
40 40
 
41  
-  private:
  41
+private:
42 42
     ~Feature();
43 43
     mapnik::feature_ptr this_;
44 44
     mapnik::context_ptr ctx_;
14  src/mapnik_featureset.cpp
@@ -18,8 +18,8 @@ void Featureset::Initialize(Handle<Object> target) {
18 18
 }
19 19
 
20 20
 Featureset::Featureset() :
21  
-  ObjectWrap(),
22  
-  this_() {}
  21
+    ObjectWrap(),
  22
+    this_() {}
23 23
 
24 24
 Featureset::~Featureset()
25 25
 {
@@ -42,30 +42,30 @@ Handle<Value> Featureset::New(const Arguments& args)
42 42
     }
43 43
 
44 44
     return ThrowException(Exception::TypeError(
45  
-      String::New("Sorry a Featureset cannot currently be created, only accessed via an existing datasource")));
  45
+                              String::New("Sorry a Featureset cannot currently be created, only accessed via an existing datasource")));
46 46
 }
47 47
 
48 48
 Handle<Value> Featureset::next(const Arguments& args)
49 49
 {
50 50
     HandleScope scope;
51  
-    
  51
+
52 52
     Featureset* fs = ObjectWrap::Unwrap<Featureset>(args.This());
53 53
 
54 54
     if (fs->this_) {
55 55
         mapnik::feature_ptr fp;
56 56
         try
57 57
         {
58  
-             fp = fs->this_->next();
  58
+            fp = fs->this_->next();
59 59
         }
60 60
         catch (const std::exception & ex)
61 61
         {
62 62
             return ThrowException(Exception::Error(
63  
-              String::New(ex.what())));
  63
+                                      String::New(ex.what())));
64 64
         }
65 65
         catch (...)
66 66
         {
67 67
             return ThrowException(Exception::Error(
68  
-              String::New("unknown exception happened when accessing a feature with next(), please file bug")));
  68
+                                      String::New("unknown exception happened when accessing a feature with next(), please file bug")));
69 69
         }
70 70
         if (fp) {
71 71
             return scope.Close(Feature::New(fp));
6  src/mapnik_featureset.hpp
@@ -12,16 +12,16 @@ using namespace node;
12 12
 typedef mapnik::featureset_ptr fs_ptr;
13 13
 
14 14
 class Featureset: public node::ObjectWrap {
15  
-  public:
  15
+public:
16 16
     static Persistent<FunctionTemplate> constructor;
17 17
     static void Initialize(Handle<Object> target);
18 18
     static Handle<Value> New(const Arguments &args);
19 19
     static Handle<Value> New(mapnik::featureset_ptr fs_ptr);
20 20
     static Handle<Value> next(const Arguments &args);
21  
-    
  21
+
22 22
     Featureset();
23 23
 
24  
-  private:
  24
+private:
25 25
     ~Featureset();
26 26
     fs_ptr this_;
27 27
 };
34  src/mapnik_fonts.hpp
@@ -24,31 +24,31 @@ namespace node_mapnik {
24 24
 static inline Handle<Value> register_fonts(const Arguments& args)
25 25
 {
26 26
     HandleScope scope;
27  
-    
  27
+
28 28
     try
29 29
     {
30 30
         if (!args.Length() >= 1 || !args[0]->IsString())
31  
-          return ThrowException(Exception::TypeError(
32  
-            String::New("first argument must be a path to a directory of fonts")));
33  
-        
  31
+            return ThrowException(Exception::TypeError(
  32
+                                      String::New("first argument must be a path to a directory of fonts")));
  33
+
34 34
         bool found = false;
35  
-        
  35
+
36 36
         std::vector<std::string> const names_before = mapnik::freetype_engine::face_names();
37  
-        
  37
+
38 38
         // option hash
39 39
         if (args.Length() == 2){
40  
-          if (!args[1]->IsObject())
41  
-            return ThrowException(Exception::TypeError(
42  
-              String::New("second argument is optional, but if provided must be an object, eg. { recurse:Boolean }")));
43  
-        
  40
+            if (!args[1]->IsObject())
  41
+                return ThrowException(Exception::TypeError(
  42
+                                          String::New("second argument is optional, but if provided must be an object, eg. { recurse:Boolean }")));
  43
+
44 44
             Local<Object> options = args[1]->ToObject();
45 45
             if (options->Has(String::New("recurse")))
46 46
             {
47 47
                 Local<Value> recurse_opt = options->Get(String::New("recurse"));
48 48
                 if (!recurse_opt->IsBoolean())
49  
-                  return ThrowException(Exception::TypeError(
50  
-                    String::New("'recurse' must be a Boolean")));
51  
-        
  49
+                    return ThrowException(Exception::TypeError(
  50
+                                              String::New("'recurse' must be a Boolean")));
  51
+
52 52
                 bool recurse = recurse_opt->BooleanValue();
53 53
                 std::string const& path = TOSTR(args[0]);
54 54
                 found = mapnik::freetype_engine::register_fonts(path,recurse);
@@ -59,17 +59,17 @@ static inline Handle<Value> register_fonts(const Arguments& args)
59 59
             std::string const& path = TOSTR(args[0]);
60 60
             found = mapnik::freetype_engine::register_fonts(path);
61 61
         }
62  
-        
  62
+
63 63
         std::vector<std::string> const& names_after = mapnik::freetype_engine::face_names();
64 64
         if (names_after.size() == names_before.size())
65 65
             found = false;
66  
-        
67  
-        return scope.Close(Boolean::New(found));    
  66
+
  67
+        return scope.Close(Boolean::New(found));
68 68
     }
69 69
     catch (const std::exception & ex)
70 70
     {
71 71
         return ThrowException(Exception::Error(
72  
-          String::New(ex.what())));
  72
+                                  String::New(ex.what())));
73 73
     }
74 74
 }
75 75
 
20  src/mapnik_geometry.cpp
@@ -19,20 +19,20 @@ void Geometry::Initialize(Handle<Object> target) {
19 19
 
20 20
     NODE_SET_PROTOTYPE_METHOD(constructor, "extent", extent);
21 21
     NODE_SET_PROTOTYPE_METHOD(constructor, "type", type);
22  
-    
  22
+
23 23
     NODE_MAPNIK_DEFINE_CONSTANT(constructor->GetFunction(),
24 24
                                 "Point",mapnik::Point)
25  
-    NODE_MAPNIK_DEFINE_CONSTANT(constructor->GetFunction(),
26  
-                                "LineString",mapnik::LineString)
27  
-    NODE_MAPNIK_DEFINE_CONSTANT(constructor->GetFunction(),
28  
-                                "Polygon",mapnik::Polygon)
  25
+        NODE_MAPNIK_DEFINE_CONSTANT(constructor->GetFunction(),
  26
+                                    "LineString",mapnik::LineString)
  27
+        NODE_MAPNIK_DEFINE_CONSTANT(constructor->GetFunction(),
  28
+                                    "Polygon",mapnik::Polygon)
29 29
 
30  
-    target->Set(String::NewSymbol("Geometry"),constructor->GetFunction());