From a216624321ce19862341457aacadbb8a7ab13bb4 Mon Sep 17 00:00:00 2001
From: artemp <artem@mapnik.org>
Date: Thu, 20 Jul 2017 16:50:14 +0200
Subject: [PATCH 01/22] enable `strict` SVG parsing mode.

---
 src/mapnik_image.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/mapnik_image.cpp b/src/mapnik_image.cpp
index f4ed8474ed..8fd76143f1 100644
--- a/src/mapnik_image.cpp
+++ b/src/mapnik_image.cpp
@@ -2635,7 +2635,7 @@ v8::Local<v8::Value> Image::_fromSVGSync(bool fromFile, Nan::NAN_METHOD_ARGS_TYP
         vertex_stl_adapter<svg_path_storage> stl_storage(marker_path->source());
         svg_path_adapter svg_path(stl_storage);
         svg_converter_type svg(svg_path, marker_path->attributes());
-        svg_parser p(svg);
+        svg_parser p(svg, true);
         if (fromFile)
         {
             if (!p.parse(TOSTR(info[0])))
@@ -2869,7 +2869,7 @@ void Image::EIO_FromSVG(uv_work_t* req)
         vertex_stl_adapter<svg_path_storage> stl_storage(marker_path->source());
         svg_path_adapter svg_path(stl_storage);
         svg_converter_type svg(svg_path, marker_path->attributes());
-        svg_parser p(svg);
+        svg_parser p(svg, true);
         if (!p.parse(closure->filename))
         {
             std::ostringstream errorMessage("");
@@ -3083,7 +3083,7 @@ void Image::EIO_FromSVGBytes(uv_work_t* req)
         vertex_stl_adapter<svg_path_storage> stl_storage(marker_path->source());
         svg_path_adapter svg_path(stl_storage);
         svg_converter_type svg(svg_path, marker_path->attributes());
-        svg_parser p(svg);
+        svg_parser p(svg, true);
 
         std::string svg_buffer(closure->data,closure->dataLength);
         if (!p.parse_from_string(svg_buffer))

From d654c4366494b210c26b0f138cee6a7c91ce6126 Mon Sep 17 00:00:00 2001
From: mapsam <matthews.sam@gmail.com>
Date: Thu, 20 Jul 2017 09:42:43 -0700
Subject: [PATCH 02/22] update error messages

---
 test/image.svg.test.js | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/test/image.svg.test.js b/test/image.svg.test.js
index 2e2ad27a8f..c5edb485bd 100644
--- a/test/image.svg.test.js
+++ b/test/image.svg.test.js
@@ -25,10 +25,10 @@ describe('mapnik.Image SVG', function() {
         }, /first argument is invalid, must be a Buffer/);
         assert.throws(function() {
           new mapnik.Image.fromSVGBytesSync(new Buffer('asdfasdf'));
-        }, /SVG parse error:\s+Unable to parse 'asdfasdf'/);
+        }, /Unable to parse 'asdfasdf'/);
         assert.throws(function() {
           mapnik.Image.fromSVGSync('./test/data/SVG_DOES_NOT_EXIST.svg');
-        }, /SVG parse error:\s+Unable to open '.\/test\/data\/SVG_DOES_NOT_EXIST.svg'/);
+        }, /Unable to open '.\/test\/data\/SVG_DOES_NOT_EXIST.svg'/);
         assert.throws(function() {
           mapnik.Image.fromSVGSync('./test/data/vector_tile/tile0.expected-svg.svg', 256);
         }, /optional second arg must be an options object/);
@@ -149,7 +149,7 @@ describe('mapnik.Image SVG', function() {
         done();
       });
     });
-    
+
     it('should err with async file w/o width or height as Bytes', function(done) {
         var svgdata = "<svg width='0' height='0'><g id='a'><ellipse fill='#FFFFFF' stroke='#000000' stroke-width='4' cx='50' cy='50' rx='25' ry='25'/></g></svg>";
         var buffer = new Buffer(svgdata);
@@ -164,7 +164,7 @@ describe('mapnik.Image SVG', function() {
     it('should err with async invalid buffer', function(done) {
       mapnik.Image.fromSVGBytes(new Buffer('asdfasdf'), function(err, svg) {
         assert.ok(err);
-        assert.ok(err.message.match(/SVG parse error:\s+Unable to parse 'asdfasdf'/));
+        assert.ok(err.message.match(/Unable to parse 'asdfasdf'/));
         assert.equal(svg, undefined);
         done();
       });
@@ -173,7 +173,7 @@ describe('mapnik.Image SVG', function() {
     it('should err with async non-existent file', function(done) {
       mapnik.Image.fromSVG('./test/data/SVG_DOES_NOT_EXIST.svg', function(err, svg) {
         assert.ok(err);
-        assert.ok(err.message.match(/SVG parse error:\s+Unable to open '.\/test\/data\/SVG_DOES_NOT_EXIST.svg'/));
+        assert.ok(err.message.match(/Failed to load: \.\/test\/data\/SVG_DOES_NOT_EXIST\.svg/));
         assert.equal(svg, undefined);
         done();
       });
@@ -181,6 +181,7 @@ describe('mapnik.Image SVG', function() {
 
     it('should error with async file full of errors', function(done) {
       mapnik.Image.fromSVG('./test/data/vector_tile/errors.svg', function(err, svg) {
+        console.log(err);
         assert.ok(err);
         assert.ok(err.message.match(/SVG parse error:/));
         assert.equal(svg, undefined);
@@ -196,7 +197,7 @@ describe('mapnik.Image SVG', function() {
         assert.equal(img.height(), 256);
         assert.equal(img.encodeSync('png32').length, 17571);
     });
-    
+
     it('#fromSVGSync load from SVG file - 2', function() {
         var img = mapnik.Image.fromSVG('./test/data/vector_tile/tile0.expected-svg.svg');
         assert.ok(img);

From 17377fcad38cf71e49cbe159049b5a846d429aa6 Mon Sep 17 00:00:00 2001
From: artemp <artem@mapnik.org>
Date: Fri, 21 Jul 2017 15:02:24 +0200
Subject: [PATCH 03/22] no need to initialise std::ostringstream with an empty
 string.

---
 src/mapnik_image.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/mapnik_image.cpp b/src/mapnik_image.cpp
index 8fd76143f1..5ca745de73 100644
--- a/src/mapnik_image.cpp
+++ b/src/mapnik_image.cpp
@@ -2640,7 +2640,7 @@ v8::Local<v8::Value> Image::_fromSVGSync(bool fromFile, Nan::NAN_METHOD_ARGS_TYP
         {
             if (!p.parse(TOSTR(info[0])))
             {
-                std::ostringstream errorMessage("");
+                std::ostringstream errorMessage;
                 errorMessage << "SVG parse error:" << std::endl;
                 for (auto const& error : p.err_handler().error_messages()) {
                     errorMessage <<  error << std::endl;
@@ -2660,7 +2660,7 @@ v8::Local<v8::Value> Image::_fromSVGSync(bool fromFile, Nan::NAN_METHOD_ARGS_TYP
             std::string svg_buffer(node::Buffer::Data(obj),node::Buffer::Length(obj));
             if (!p.parse_from_string(svg_buffer))
             {
-                std::ostringstream errorMessage("");
+                std::ostringstream errorMessage;
                 errorMessage << "SVG parse error:" << std::endl;
                 for (auto const& error : p.err_handler().error_messages()) {
                     errorMessage <<  error << std::endl;
@@ -2872,7 +2872,7 @@ void Image::EIO_FromSVG(uv_work_t* req)
         svg_parser p(svg, true);
         if (!p.parse(closure->filename))
         {
-            std::ostringstream errorMessage("");
+            std::ostringstream errorMessage;
             errorMessage << "SVG parse error:" << std::endl;
             for (auto const& error : p.err_handler().error_messages()) {
                 errorMessage <<  error << std::endl;
@@ -3088,7 +3088,7 @@ void Image::EIO_FromSVGBytes(uv_work_t* req)
         std::string svg_buffer(closure->data,closure->dataLength);
         if (!p.parse_from_string(svg_buffer))
         {
-            std::ostringstream errorMessage("");
+            std::ostringstream errorMessage;
             errorMessage << "SVG parse error:" << std::endl;
             for (auto const& error : p.err_handler().error_messages()) {
                 errorMessage <<  error << std::endl;

From 05afa948e7d9646a44f18c648bcb492fb7b25b6a Mon Sep 17 00:00:00 2001
From: artemp <artem@mapnik.org>
Date: Fri, 21 Jul 2017 15:10:07 +0200
Subject: [PATCH 04/22] remove stderr + update expected error message

---
 test/image.svg.test.js | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/test/image.svg.test.js b/test/image.svg.test.js
index c5edb485bd..1d1d79820c 100644
--- a/test/image.svg.test.js
+++ b/test/image.svg.test.js
@@ -181,9 +181,8 @@ describe('mapnik.Image SVG', function() {
 
     it('should error with async file full of errors', function(done) {
       mapnik.Image.fromSVG('./test/data/vector_tile/errors.svg', function(err, svg) {
-        console.log(err);
         assert.ok(err);
-        assert.ok(err.message.match(/SVG parse error:/));
+        assert.ok(err.message.match(/Failed to load: .\/test\/data\/vector_tile\/errors.svg/));
         assert.equal(svg, undefined);
         done();
       });

From 30eb3f6a4aa3512cb0d1ef63bc36305ba90e3476 Mon Sep 17 00:00:00 2001
From: artemp <artem@mapnik.org>
Date: Thu, 27 Jul 2017 14:52:34 +0100
Subject: [PATCH 05/22] make `strict` an option + update test and test data.

update mapnik version
---
 install_mason.sh                |  4 +-
 package.json                    |  4 +-
 src/mapnik_image.cpp            | 58 +++++++++++++++++----
 test/data/images/san-marino.svg | 92 +++++++++++++++++++++++++++++++++
 test/image.svg.test.js          | 14 ++++-
 5 files changed, 156 insertions(+), 16 deletions(-)
 create mode 100644 test/data/images/san-marino.svg

diff --git a/install_mason.sh b/install_mason.sh
index eabde5f4c1..20d2adc2a0 100755
--- a/install_mason.sh
+++ b/install_mason.sh
@@ -12,7 +12,7 @@ ICU_VERSION="57.1"
 
 if [ ! -f ./mason/mason.sh ]; then
     mkdir -p ./mason
-    curl -sSfL https://github.com/mapbox/mason/archive/e319a75b05838ca99bce1745f9d6c2fde1139b16.tar.gz | tar --gunzip --extract --strip-components=1 --exclude="*md" --exclude="test*" --directory=./mason
+    curl -sSfL https://github.com/mapbox/mason/archive/16c8c0e41c03c519338685928a1fed4945e50db1.tar.gz | tar --gunzip --extract --strip-components=1 --exclude="*md" --exclude="test*" --directory=./mason
 fi
 
 if [ ! -f ./mason_packages/.link/bin/mapnik-config ]; then
@@ -38,5 +38,5 @@ if [ ! -f ./mason_packages/.link/bin/mapnik-config ]; then
     # NOTE: sync this version with the `mapnik_version` in package.json (which is used for windows builds)
     # In the future we could pull from that version automatically if mason were to support knowing the right dep
     # versions to install automatically. Until then there is not much point since the deps are still hardcoded here.
-    install mapnik 249d6cc
+    install mapnik a623055
 fi
diff --git a/package.json b/package.json
index 998a2863cc..15ab3ded97 100644
--- a/package.json
+++ b/package.json
@@ -4,8 +4,8 @@
   "url": "http://github.com/mapnik/node-mapnik",
   "homepage": "http://mapnik.org",
   "author": "Dane Springmeyer <dane@mapbox.com> (mapnik.org)",
-  "version": "3.6.2-dev-249d6cc",
-  "mapnik_version":"249d6cc",
+  "version": "3.6.2-dev-a623055",
+  "mapnik_version":"mapnik-a623055",
   "main": "./lib/mapnik.js",
   "binary": {
     "module_name": "mapnik",
diff --git a/src/mapnik_image.cpp b/src/mapnik_image.cpp
index 5ca745de73..b5e5aa7e7c 100644
--- a/src/mapnik_image.cpp
+++ b/src/mapnik_image.cpp
@@ -2588,6 +2588,7 @@ v8::Local<v8::Value> Image::_fromSVGSync(bool fromFile, Nan::NAN_METHOD_ARGS_TYP
 
     double scale = 1.0;
     std::uint32_t max_size = 2048;
+    bool strict = false;
     if (info.Length() >= 2)
     {
         if (!info[1]->IsObject())
@@ -2616,16 +2617,26 @@ v8::Local<v8::Value> Image::_fromSVGSync(bool fromFile, Nan::NAN_METHOD_ARGS_TYP
             v8::Local<v8::Value> opt = options->Get(Nan::New("max_size").ToLocalChecked());
             if (!opt->IsNumber())
             {
-                Nan::ThrowTypeError("max_size must be a positive integer");
+                Nan::ThrowTypeError("'max_size' must be a positive integer");
                 return scope.Escape(Nan::Undefined());
             }
             auto max_size_val = opt->IntegerValue();
             if (max_size_val < 0 || max_size_val > 65535) {
-                Nan::ThrowTypeError("max_size must be a positive integer between 0 and 65535");
+                Nan::ThrowTypeError("'max_size' must be a positive integer between 0 and 65535");
                 return scope.Escape(Nan::Undefined());
             }
             max_size = static_cast<std::uint32_t>(max_size_val);
         }
+        if (options->Has(Nan::New("strict").ToLocalChecked()))
+        {
+            v8::Local<v8::Value> opt = options->Get(Nan::New("strict").ToLocalChecked());
+            if (!opt->IsBoolean())
+            {
+                Nan::ThrowTypeError("'strict' must be a boolean value");
+                return scope.Escape(Nan::Undefined());
+            }
+            strict = opt->BooleanValue();
+        }
     }
 
     try
@@ -2635,7 +2646,7 @@ v8::Local<v8::Value> Image::_fromSVGSync(bool fromFile, Nan::NAN_METHOD_ARGS_TYP
         vertex_stl_adapter<svg_path_storage> stl_storage(marker_path->source());
         svg_path_adapter svg_path(stl_storage);
         svg_converter_type svg(svg_path, marker_path->attributes());
-        svg_parser p(svg, true);
+        svg_parser p(svg, strict);
         if (fromFile)
         {
             if (!p.parse(TOSTR(info[0])))
@@ -2748,6 +2759,7 @@ typedef struct {
     bool error;
     double scale;
     std::uint32_t max_size;
+    bool strict;
     std::string error_name;
     Nan::Persistent<v8::Function> cb;
 } svg_file_ptr_baton_t;
@@ -2760,6 +2772,7 @@ typedef struct {
     bool error;
     double scale;
     std::uint32_t max_size;
+    bool strict;
     std::string error_name;
     Nan::Persistent<v8::Object> buffer;
     Nan::Persistent<v8::Function> cb;
@@ -2807,6 +2820,7 @@ NAN_METHOD(Image::fromSVG)
 
     double scale = 1.0;
     std::uint32_t max_size = 2048;
+    bool strict = false;
     if (info.Length() >= 3)
     {
         if (!info[1]->IsObject())
@@ -2835,16 +2849,26 @@ NAN_METHOD(Image::fromSVG)
             v8::Local<v8::Value> opt = options->Get(Nan::New("max_size").ToLocalChecked());
             if (!opt->IsNumber())
             {
-                Nan::ThrowTypeError("max_size must be a positive integer");
+                Nan::ThrowTypeError("'max_size' must be a positive integer");
                 return;
             }
             auto max_size_val = opt->IntegerValue();
             if (max_size_val < 0 || max_size_val > 65535) {
-                Nan::ThrowTypeError("max_size must be a positive integer between 0 and 65535");
+                Nan::ThrowTypeError("'max_size' must be a positive integer between 0 and 65535");
                 return;
             }
             max_size = static_cast<std::uint32_t>(max_size_val);
         }
+        if (options->Has(Nan::New("strict").ToLocalChecked()))
+        {
+            v8::Local<v8::Value> opt = options->Get(Nan::New("strict").ToLocalChecked());
+            if (!opt->IsBoolean())
+            {
+                Nan::ThrowTypeError("'strict' must be a boolean value");
+                return;
+            }
+            strict = opt->BooleanValue();
+        }
     }
 
     svg_file_ptr_baton_t *closure = new svg_file_ptr_baton_t();
@@ -2853,6 +2877,7 @@ NAN_METHOD(Image::fromSVG)
     closure->error = false;
     closure->scale = scale;
     closure->max_size = max_size;
+    closure->strict = strict;
     closure->cb.Reset(callback.As<v8::Function>());
     uv_queue_work(uv_default_loop(), &closure->request, EIO_FromSVG, (uv_after_work_cb)EIO_AfterFromSVG);
     return;
@@ -2869,7 +2894,7 @@ void Image::EIO_FromSVG(uv_work_t* req)
         vertex_stl_adapter<svg_path_storage> stl_storage(marker_path->source());
         svg_path_adapter svg_path(stl_storage);
         svg_converter_type svg(svg_path, marker_path->attributes());
-        svg_parser p(svg, true);
+        svg_parser p(svg, closure->strict);
         if (!p.parse(closure->filename))
         {
             std::ostringstream errorMessage;
@@ -2945,7 +2970,7 @@ void Image::EIO_FromSVG(uv_work_t* req)
         // it is a good idea to keep this. Therefore, any exceptions thrown will fail gracefully.
         // LCOV_EXCL_START
         closure->error = true;
-        closure->error_name = "Failed to load: " + closure->filename;
+        closure->error_name = ex.what();
         // LCOV_EXCL_STOP
     }
 }
@@ -2982,6 +3007,7 @@ void Image::EIO_AfterFromSVG(uv_work_t* req)
  * @param {number} [options.scale] - scale the image. For example passing `0.5` as scale would render
  * your SVG at 50% the original size.
  * @param {number} [options.max_size] - the maximum allowed size of the svg dimensions * scale. The default is 2048.
+ * @param {boolean} [options.strict] - enable `strict` parsing mode e.g throw on unsupported element/attribute. The default is `false`.
  * This option can be passed a smaller or larger size in order to control the final size of the image allocated for
  * rasterizing the SVG.
  * @param {Function} callback = `function(err, img)`
@@ -3019,6 +3045,7 @@ NAN_METHOD(Image::fromSVGBytes)
 
     double scale = 1.0;
     std::uint32_t max_size = 2048;
+    bool strict = true;
     if (info.Length() >= 3)
     {
         if (!info[1]->IsObject())
@@ -3047,16 +3074,26 @@ NAN_METHOD(Image::fromSVGBytes)
             v8::Local<v8::Value> opt = options->Get(Nan::New("max_size").ToLocalChecked());
             if (!opt->IsNumber())
             {
-                Nan::ThrowTypeError("max_size must be a positive integer");
+                Nan::ThrowTypeError("'max_size' must be a positive integer");
                 return;
             }
             auto max_size_val = opt->IntegerValue();
             if (max_size_val < 0 || max_size_val > 65535) {
-                Nan::ThrowTypeError("max_size must be a positive integer between 0 and 65535");
+                Nan::ThrowTypeError("'max_size' must be a positive integer between 0 and 65535");
                 return;
             }
             max_size = static_cast<std::uint32_t>(max_size_val);
         }
+        if (options->Has(Nan::New("strict").ToLocalChecked()))
+        {
+            v8::Local<v8::Value> opt = options->Get(Nan::New("strict").ToLocalChecked());
+            if (!opt->IsBoolean())
+            {
+                Nan::ThrowTypeError("'strict' must be a boolean value");
+                return;
+            }
+            strict = opt->BooleanValue();
+        }
     }
 
     svg_mem_ptr_baton_t *closure = new svg_mem_ptr_baton_t();
@@ -3067,6 +3104,7 @@ NAN_METHOD(Image::fromSVGBytes)
     closure->data = node::Buffer::Data(obj);
     closure->scale = scale;
     closure->max_size = max_size;
+    closure->strict = strict;
     closure->dataLength = node::Buffer::Length(obj);
     uv_queue_work(uv_default_loop(), &closure->request, EIO_FromSVGBytes, (uv_after_work_cb)EIO_AfterFromSVGBytes);
     return;
@@ -3083,7 +3121,7 @@ void Image::EIO_FromSVGBytes(uv_work_t* req)
         vertex_stl_adapter<svg_path_storage> stl_storage(marker_path->source());
         svg_path_adapter svg_path(stl_storage);
         svg_converter_type svg(svg_path, marker_path->attributes());
-        svg_parser p(svg, true);
+        svg_parser p(svg, closure->strict);
 
         std::string svg_buffer(closure->data,closure->dataLength);
         if (!p.parse_from_string(svg_buffer))
diff --git a/test/data/images/san-marino.svg b/test/data/images/san-marino.svg
new file mode 100644
index 0000000000..6ba011664b
--- /dev/null
+++ b/test/data/images/san-marino.svg
@@ -0,0 +1,92 @@
+<svg xmlns="http://www.w3.org/2000/svg" height="480" width="640" viewBox="0 0 640 480">
+  <g fill-rule="evenodd" stroke-width="1pt">
+    <path fill="#19b6ef" d="M0 240h640v240H0z"/>
+    <path fill="#fff" d="M0 0h640v240H0z"/>
+  </g>
+  <path d="M317.07 339.221c52.45-39.239 108.96-119.306 42.74-161.41-12.336-2.388-26.107-1.672-32.713 3.582-3.501-1.99-6.288-1.83-9.79 1.91-2.466-3.025-4.935-4.379-10.028-2.865-10.188-5.173-19.42-6.288-31.517-3.105-57.623 34.622-22.366 116.76 41.308 161.888z" fill-rule="evenodd" stroke="#7d6c00" stroke-width="2.3686254" fill="#fd0"/>
+  <g stroke="#3a9d4f">
+    <path stroke-linejoin="round" d="M414.08 250.106s5.903-7.939 6.106-7.939c5.904-3.46 6.515-7.938 6.515-7.938 5.903-1.833 4.07-6.718 4.477-7.328 2.852-3.053 1.833-6.108 1.426-7.126 0-.812 2.036-8.345-.814-9.362.135-8.008-4.818-7.261-8.754-2.036-4.207 1.221-5.157 4.682-3.664 8.55-5.497 0-5.7 7.939-4.071 12.416-7.328-.203-3.257 7.939-3.461 8.347-2.442 1.221 1.832 12.824 2.24 12.416zM367.857 318.3l3.664 2.239c.746 2.781 3.325 4.547 5.294 4.072.95 4.274 5.563 3.665 8.956 1.221 2.714 3.936 6.04 4.005 10.586 2.647 4.07 2.985 9.364 1.696 12.824-1.426 3.731 3.053 6.243.815 8.142-2.442 2.917.746 5.224.272 6.31-2.647 5.7-.474 2.85-5.835-1.83-8.142 3.73-3.258 7.87-9.975 2.035-10.993-1.833-1.356-5.292-1.084-7.94.205-.677-2.987-4.818-3.733-9.364-.408-1.56-3.325-6.989-1.764-9.568.611-3.256-2.85-7.124-2.85-12.824.406L367.857 318.3zM367.857 309.555c.678-3.731-1.9-10.517 2.035-11.195-.746-6.243.34-13.3 7.532-12.621 1.155-5.903.883-11.4 7.736-12.215 0 0 5.497-19.134 11.197-5.903 2.239 3.87 1.832 10.177-2.647 8.956.883 4.751-.678 8.889-5.903 8.754 2.307 3.324 1.56 7.872-1.018 9.976-6.311 4.748-12.62 9.5-18.932 14.248zM401.037 285.735l5.904-1.22c6.106-4.071 8.55-5.7 11.603-1.223 5.089-1.086 9.974-.543 9.771 3.461 6.04.407 5.971 4.274 5.294 7.328.949 5.36-1.358 12.35-5.09 3.867-11.807-7.192-18.525-6.243-37.253-2.035l9.771-10.178zM404.102 279.822c.205-.203 17.507-4.682 15.675-9.974 4.885-.815 5.904-5.7 6.108-5.7 10.177-3.256 9.566-9.161 9.566-9.161 2.918-3.122 8.075-6.243 6.922-11.807.34-6.31.882-10.177-7.532-6.106-6.311-.612-8.55 3.053-10.382 8.55-2.985-3.528-7.802 2.104-8.345 7.124 0 0-7.736 7.532-7.736 7.735s-6.514 12.01-6.514 12.01l2.238 7.33z" fill-rule="evenodd" stroke-width="2.3686254" fill="#4fd46b"/>
+    <path stroke-linejoin="round" d="M404.502 266.397c-4.14-3.122-6.446-6.853-5.7-10.586-2.713-3.664-4.614-5.903-2.035-9.16 0 0-2.036-7.329-2.036-7.532-5.292-2.035-3.053-6.513-1.629-8.142-2.51-3.461-2.578-7.126-.203-10.382-.068-6.515 4.546-4.071 8.345 0 0 0 6.311 4.479 1.63 8.55 4.681 1.629 6.107 5.698 3.46 7.327 4.071 1.833 4.681 5.497 2.442 7.94 4.14 3.326 2.579 7.465 3.868 11.196l-8.142 10.789z" fill-rule="evenodd" stroke-width="2.3686254" fill="#4fd46b"/>
+    <path stroke-linejoin="round" d="M411.831 236.064c-.203-.203-6.92-8.753-5.089-9.364-.406-2.647-2.441-5.497-1.22-8.142-3.325-3.325-3.394-7.26-.815-10.38-2.239-3.054-1.221-7.125 1.832-9.772-.95-5.022 2.579-6.175 5.7-7.126 2.307-8.075 6.038-5.971 8.142.203 3.19 2.782 2.715 6.99 1.63 10.18 3.799 2.578 1.492 5.766-.204 7.124l-9.976 27.277z" fill-rule="evenodd" stroke-width="2.3686254" fill="#4fd46b"/>
+    <path stroke-linejoin="round" d="M410.815 193.106l-5.7-5.7c1.473-3.02 2.659-8.344-1.627-10.789-2.364-5.757-14.182-12.892-16.083.815-1.799-4.136-5.563-8.21-8.345-3.46-6.175-5.292-9.5-3.665-6.311 3.053 0 0-2.848 4.478 4.682 7.939.611.61-2.442 8.142 6.515 8.345-1.696 2.579 1.086 6.175 4.682 5.903-2.579 3.19 1.764 6.583 4.477 5.294-1.154 3.528-1.086 5.225 3.868 5.7l5.497 6.31 4.477 6.106 3.868-29.516z" fill-rule="evenodd" stroke-width="2.3686254" fill="#4fd46b"/>
+    <path d="M414.28 246.508c.288-.288 10.938-24.757 12.378-32.243M415.43 203.05s1.726 19.864-3.167 34.545M382.615 182.895s21.879 21.015 23.893 29.651M397.873 180.596s1.439 17.274 7.484 34.259M436.45 243.343s-21.879 18.425-32.53 34.545M415.712 307.84s-28.788 4.03-41.454 4.318M406.218 320.215s-35.698-.864-38.29-3.454M388.361 273.859c0 .287-18.136 30.226-18.712 40.015" stroke-linecap="round" stroke-width="2.2203781" fill="none"/>
+  </g>
+  <path d="M316.87 333.441c-37.768-35.624-76.454-102.482-37.972-136.27 6.84 3.88 14.903.409 26.03-3.98 3.368 3.674 7.654 4.594 11.942 1.837 4.797 2.042 8.37.408 10.718-2.144 10.922 6.33 24.906 9.596 28.172 3.37 37.87 35.93-.511 103.095-38.89 137.187z" fill-rule="evenodd" stroke="#7d6c00" stroke-width="2.3686254" fill="#65c7ff"/>
+  <path d="M317.086 332.408c-16.219-16.307-31.017-34.385-42.347-57.66 1.939-1.632 2.84-2.138 3.861-4.997 5.818.818 8.88 1.021 16.536-.306 1.53 5.717 1.837 10.514 5.511 15.311l7.656-15.005c5.205 1.226 11.637 1.533 16.535 0 3.165 4.288 2.042 10.72 7.656 15.618 3.368-9.9 6.738-10.615 10.106-15.924 5.002 1.736 8.167 1.021 12.25-.307 2.143 2.45 1.072 2.41 4.975 6.007-10.233 20.32-24.265 40.728-42.739 57.263z" fill-rule="evenodd" fill="#8fc753"/>
+  <path d="M272.65 164.304a3.346 3.346 0 1 1-6.692 0 3.346 3.346 0 0 1 6.692 0zM269.158 156.594a3.346 3.346 0 1 1-6.691 0 3.346 3.346 0 0 1 6.691 0zM265.085 149.465a3.346 3.346 0 1 1-6.692 0 3.346 3.346 0 0 1 6.692 0zM262.321 142.482a3.346 3.346 0 1 1-6.692 0 3.346 3.346 0 0 1 6.692 0zM262.757 134.918a3.346 3.346 0 1 1-6.691 0 3.346 3.346 0 0 1 6.691 0zM280.42 122.407a3.346 3.346 0 1 1-6.692 0 3.346 3.346 0 0 1 6.692 0z" fill-rule="evenodd" stroke="#000" stroke-width="1.1110219000000001" fill="#fff"/>
+  <path d="M273.814 123.571a3.346 3.346 0 1 1-6.692 0 3.346 3.346 0 0 1 6.692 0zM266.54 127.935a3.346 3.346 0 1 1-6.692 0 3.346 3.346 0 0 1 6.692 0zM288.943 122.552a3.346 3.346 0 1 1-6.692 0 3.346 3.346 0 0 1 6.692 0zM298.254 123.28a3.346 3.346 0 1 1-6.692 0 3.346 3.346 0 0 1 6.692 0zM306.546 122.843a3.346 3.346 0 1 1-6.692 0 3.346 3.346 0 0 1 6.692 0z" fill-rule="evenodd" stroke="#000" stroke-width="1.1110219000000001" fill="#fff"/>
+  <path d="M325.874 117.504a8.583 8.583 0 1 1-17.166 0 8.583 8.583 0 0 1 17.166 0z" fill-rule="evenodd" stroke="#7d6c00" stroke-width="1.110941" fill="#fd0"/>
+  <path d="M334.913 122.698a3.346 3.346 0 1 1-6.692 0 3.346 3.346 0 0 1 6.692 0zM343.642 123.425a3.346 3.346 0 1 1-6.691 0 3.346 3.346 0 0 1 6.691 0zM352.08 122.988a3.346 3.346 0 1 1-6.693 0 3.346 3.346 0 0 1 6.692 0zM359.207 122.698a3.346 3.346 0 1 1-6.692 0 3.346 3.346 0 0 1 6.692 0zM368.082 123.716a3.346 3.346 0 1 1-6.692 0 3.346 3.346 0 0 1 6.692 0zM375.064 128.08a3.346 3.346 0 1 1-6.692 0 3.346 3.346 0 0 1 6.692 0z" fill-rule="evenodd" stroke="#000" stroke-width="1.1110219000000001" fill="#fff"/>
+  <path d="M269.414 151.697c2.85 5.42 5.698 11.05 8.548 16.47h79.23l9.174-15.846c-5.352-3.683-9.035-6.533-16.68-4.795-4.31-6.185-9.035-7.366-16.054-6.671-2.086-2.154-3.963-3.475-7.508-3.961l-16.678.416c-4.38.416-7.716 3.753-7.924 3.753-7.09-.835-13.552-.627-15.22 6.254-6.463-1.599-11.05.14-16.888 4.38z" fill-rule="evenodd" stroke="#ac0000" stroke-width="2.3686254" fill="#e40000"/>
+  <path d="M377.974 135.354a3.346 3.346 0 1 1-6.692 0 3.346 3.346 0 0 1 6.692 0zM378.556 143.21a3.346 3.346 0 1 1-6.692 0 3.346 3.346 0 0 1 6.692 0zM376.082 150.484a3.346 3.346 0 1 1-6.692 0 3.346 3.346 0 0 1 6.692 0zM373.027 156.448a3.346 3.346 0 1 1-6.692 0 3.346 3.346 0 0 1 6.692 0zM369.39 164.013a3.346 3.346 0 1 1-6.69 0 3.346 3.346 0 0 1 6.69 0z" fill-rule="evenodd" stroke="#000" stroke-width="1.1110219000000001" fill="#fff"/>
+  <path d="M322.566 154.424a4.946 4.946 0 1 1-9.893 0 4.946 4.946 0 0 1 9.893 0z" fill-rule="evenodd" stroke="#000" stroke-width="1.1105424000000002" fill="#fff"/>
+  <path d="M323.546 143.045a5.964 5.964 0 1 1-11.93 0 5.964 5.964 0 0 1 11.93 0z" fill-rule="evenodd" stroke="#000" stroke-width="1.11051072" fill="#fff"/>
+  <path d="M322.685 131.995a5.383 5.383 0 1 1-10.765 0 5.383 5.383 0 0 1 10.765 0z" fill-rule="evenodd" stroke="#000" stroke-width="1.10935854" fill="#fff"/>
+  <path d="M315.487 109.055c0-.926-.028-4.165.037-4.295l-3.572-.064.102-3.175 3.1-.037.037-2.775h4.395v2.544h3.47l-.072 3.378-3.6-.037-.03 4.526-3.867-.065z" fill-rule="evenodd" stroke="#7d6c00" stroke-width="1.1110219000000001" fill="#fd0"/>
+  <path d="M277.56 168.17c-7.092-12.023-17.51-28.367-11.053-35.444 8.955-10.143 29.953-.973 43.367-6.881.972 11.468-2.224 30.44 2.92 34.403l-4.796 4.17c-2.92-3.753-8.418-8.782-15.22.208-3.892-3.403-8.316-2.805-10.4 1.72-1.982.267-1.867 1.06-4.819 1.824zM357.68 167.754c7.09-12.023 17.51-28.367 11.051-35.444-8.955-10.143-29.952-.973-43.366-6.882-.973 11.469 2.223 30.441-2.92 34.404l4.795 4.17c4.614-6.489 10.373-6.699 15.22.207 3.893-3.403 7.925-2.936 10.4 1.721 1.983.267 1.868 1.06 4.82 1.824z" stroke="#fd0" stroke-width="3.3314" fill="none"/>
+  <path d="M277.343 177.132c28.495-2.918 54.904-1.877 79.23 0l3.127-8.967c-27.66-5.003-46.773-5.628-82.982-.624l.625 9.59z" fill-rule="evenodd" stroke="#7d6c00" stroke-width="2.3686254" fill="#fd0"/>
+  <path d="M314.121 329.377c.205-1.43.408-2.762.613-4.191 2.834.763 4.996.468 7.35-.402.815-1.225 1.633-2.45 2.45-3.676l-1.838-2.142c-1.615.348-2.941 1.85-3.98 3.158-1.628.077-3.064-.71-4.595-1.016l-1.53-6.43c-1.52-1.795-4.671-1.668-3.982 1.531l.307 2.45c.613 1.531.841 3.639 1.837 4.785v2.511c1.123 1.141 2.246 2.28 3.368 3.422zM315.337 311.087c-2.13 1.056-4.659-.78-7.349-1.837-2.45-.168-4.419 1.872-7.349 1.224.535-1.59 1.837-1.837 2.757-2.756-.673-4.131 1.53-5.512 2.144-5.512.61 0 3.061.613 3.061.613l2.45.306c1.43 2.654 3.433 5.02 4.286 7.962z" fill-rule="evenodd" fill="#c76e2e"/>
+  <path d="M300.779 366.089c7.066-11.472 56.259-34.508 102.422-84.251-46.99 45.243-76.357 56.35-114.812 83.974l12.39.277z" fill-rule="evenodd" stroke="#e9bf00" stroke-width="2.3686254" fill="#ffe100"/>
+  <path d="M368.406 313.186a3.582 3.582 0 1 1-7.163 0 3.582 3.582 0 0 1 7.163 0zM402.786 278.323a4.06 4.06 0 1 1-8.118 0 4.06 4.06 0 0 1 8.118 0zM414.252 248.713a3.582 3.582 0 1 1-7.163 0 3.582 3.582 0 0 1 7.163 0zM403.02 210.28a3.582 3.582 0 1 1-7.164 0 3.582 3.582 0 0 1 7.164 0z" fill-rule="evenodd" stroke="#68300e" stroke-width="1.1110219000000001" fill="#9d4916"/>
+  <path d="M279.125 269.595v-15.148l-1.54-1.283v-3.594l2.824-.257.513-16.945-1.797-1.028-.257-2.823s2.054.77 2.054.257.513-3.339.513-3.339-1.282-.256-1.282-.77 1.539-1.796 1.539-1.796-.77-.772-1.026-1.285-.77-2.823-.77-2.823l.77-2.825-.513-1.54-1.285-2.311 1.798-1.797s-.513-2.31-.513-2.824 1.282-2.567 1.539-2.825c.258-.256 2.312-3.08 2.312-3.08l4.364-1.027 5.135.77 2.824 1.798.513 4.62s-.513 2.824-.77 2.824-2.31 1.028-2.31 1.028-2.569.256-2.825 0 .77 3.081.77 3.081v3.08l-.256 3.851s0 1.798-.258 2.054c-.256.257-.77 1.028-.77 1.028l-.256 3.851 4.108 1.026-.257 2.312-2.825.257.515 15.66 4.108.77v4.366l-1.798 1.026-.513 15.66h-14.378zM341.522 269.861v-15.148l-1.54-1.282v-3.595l2.824-.256.513-16.945-1.797-1.028-.257-2.823s2.054.77 2.054.256.513-3.338.513-3.338-1.282-.257-1.282-.77 1.539-1.797 1.539-1.797-.77-.771-1.026-1.284-.77-2.823-.77-2.823l.77-2.826-.513-1.54-1.285-2.31 1.798-1.798s-.513-2.31-.513-2.823 1.282-2.567 1.539-2.825c.258-.257 2.312-3.08 2.312-3.08l4.364-1.028 5.135.771 2.824 1.798.513 4.62s-.513 2.824-.77 2.824-2.31 1.027-2.31 1.027-2.569.257-2.825 0 .771 3.082.771 3.082V218l-.256 3.85s0 1.798-.259 2.055c-.256.256-.77 1.027-.77 1.027l-.256 3.852 4.108 1.026-.257 2.312-2.825.256.515 15.661 4.108.77v4.365l-1.798 1.026-.513 15.661h-14.378zM309.94 270.378V255.23l-1.54-1.283v-3.594l2.825-.257.513-16.945-1.798-1.028-.256-2.823s2.054.77 2.054.256.513-3.338.513-3.338-1.283-.256-1.283-.77 1.54-1.797 1.54-1.797-.77-.77-1.027-1.284-.77-2.823-.77-2.823l.77-2.825-.513-1.54-1.284-2.311 1.797-1.798s-.513-2.31-.513-2.823 1.283-2.567 1.54-2.825c.257-.256 2.311-3.08 2.311-3.08l4.364-1.028 5.136.772 2.823 1.797.513 4.62s-.513 2.824-.77 2.824-2.31 1.028-2.31 1.028-2.568.256-2.825 0 .771 3.081.771 3.081v3.08l-.256 3.851s0 1.798-.258 2.054c-.257.257-.77 1.028-.77 1.028l-.256 3.85 4.107 1.027-.256 2.312-2.825.256.514 15.661 4.108.77v4.366l-1.797 1.026-.513 15.66H309.94z" fill-rule="evenodd" stroke="#a9a9a9" stroke-width="1.1110219000000001" fill="#fff"/>
+  <path fill-rule="evenodd" d="M282.923 269.495v-11.938h6.686v12.416l-6.686-.478zM314.438 270.444l.238-12.178h5.97v11.938l-6.208.24zM345.486 270.211l-.478-11.46 6.448-.24v11.94l-5.97-.24zM284.588 234.149h3.82v6.208h-3.82zM314.92 234.399h5.254v5.97h-5.253zM345.953 234.865h4.537v5.73h-4.537z"/>
+  <path d="M286.57 206.965c4.108 4.62 4.365 4.62 4.365 4.62M317.12 206.965c.769 1.539 2.053 4.877 3.594 5.133M349.984 207.73s1.284 3.595 3.081 4.108" stroke="#a8a8a8" stroke-width="1.1110219000000001" fill="none"/>
+  <path d="M282.206 194.022c12.012-3.883-2.806-11.648-5.267 0-3.886.628-4.389 3.511-12.789 2.259-20.313 33.102-5.267 86.518 54.169 141.816-106.457-90.594-63.194-157.604-33.714-155.077 16.034 1.096 7.945 21.096-2.399 11.002z" fill-rule="evenodd" fill="#b97700"/>
+  <path d="M285.554 177.049s9.781 2.633 9.781 6.77M295.332 176.299s6.771 3.008 8.275 5.642M348.751 177.432s-8.653 1.129-10.534 3.76M335.575 178.181s-4.888 4.138-4.514 5.265M334.46 196.237c-.753-.376-4.138-4.89-3.387-10.533M301.345 193.24s2.257-2.634 2.257-7.525M317.153 183.828l.376 10.909M326.93 193.24c0-.754 3.01-7.9-.376-11.286M306.242 180.447s-2.633 7.147-.75 13.165M325.431 186.843s-4.137 1.128-6.02 3.01M307.742 187.959c0-.375 4.514-1.128 6.018 1.506" stroke="#7d6c00" stroke-width="2.3686254" fill="none"/>
+  <path d="M300.63 301.86c.19.096 3.745-.674 3.745-2.403 1.826-1.152.48-4.419.48-4.419l-3.361-.673-4.613-5.187c-.223-1.6.322-3.104-.671-4.802-3.17.833-4.995 3.49-6.053 6.531.77.962.866 2.018 2.307 2.882 1.504.257 2.528-.64 3.938-.383.736 1.28.51 2.37.767 3.555 1.923 1.344 2.307 3.266 3.46 4.898zM296.498 279.672v-6.148l-4.419-.193c-.545.93-1.57 1.378-2.21 2.21l-3.074 1.538c1.281 1.537 2.85 2.402 3.843 3.17 2.242.673 4.1.673 5.86-.577zM282.656 288.8l-2.402-4.036c1.473-.48 3.33-.288 4.707.289 0 0 1.058 2.498.289 3.458-.385.864-2.69.48-2.594.29zM319.168 292.931c1.281-.64 2.466-1.76 2.69-3.361l-4.419-5.092-4.034-.095c-.928-.961-2.434-1.153-3.65-1.153 0 0 1.25 1.92 2.882 2.306 1.153 2.591 6.148 7.395 6.531 7.395zM323.5 293.498c0-.095 3.937-1.441 6.05-1.248-.19-1.634 2.979-5.38 2.979-5.38l5.572 7.3c-1.025.865-2.819.577-4.228.865 0 0-2.69 2.594-2.978 2.69s-5.187 1.248-7.59-.191c-1.055-2.018.29-4.325.194-4.036zM326.664 280.722c.673-2.337.864-4.676 0-7.59 0 0-6.341-.096-6.341 0s-4.226 1.921-4.226 2.018 1.346 4.13 2.978 3.746c.736 2.146 2.913 1.6 3.938 2.402 1.217-.192 2.433-.385 3.651-.576zM351.55 274.292c-.865 2.659-1.345 5.509-.097 8.07 1.153.192 2.498.96 3.555.768l5.092-9.223c-3.523-1.12-6.373-.992-8.55.385z" fill-rule="evenodd" fill="#c76e2e"/>
+  <path d="M353.115 193.19c-12.011-3.884 2.807-11.65 5.267 0 3.886.627 4.39 3.51 12.79 2.258 20.313 33.102 5.266 86.518-54.17 141.816 106.457-90.594 63.194-157.604 33.715-155.077-16.034 1.096-7.946 21.096 2.398 11.002z" fill-rule="evenodd" fill="#b97700"/>
+  <path d="M354.331 284.67c-.191 0-3.073 2.112-3.073 2.112-1.378.544-2.753 1.089-4.13 1.634l-4.42.095-.961-3.074 3.363-2.978c-2.85-.416-5.7.705-7.974 2.787 0 0 0 3.361 1.922 4.995 1.153 1.44 4.514 4.035 4.514 4.035 2.114.416 4.131.063 5.476-1.058 1.76-2.85 3.523-5.699 5.283-8.549zM331.078 314.835c1.443.385 11.337-12.776 11.337-12.776-.865-2.465-2.787-4.259-4.9-5.38 0 0-4.805 5.667-4.9 7.589-.767 1.729-2.976 8.357-2.017 9.223-.096.192-.48 2.88.48 1.344z" fill-rule="evenodd" fill="#c76e2e"/>
+  <path stroke-linejoin="round" d="M266.366 317.4c-14.817-12.887-34.809-19.991-62.716-10.35 7.51 3.248 15.628 4.364 22.529 7.915l40.187 2.435z" fill-rule="evenodd" stroke="#004100" stroke-width="2.3686254" fill="#006800"/>
+  <path d="M223.44 308.256c29.227.608 37.752 7.913 36.23 6.696" stroke="#00a400" stroke-linecap="round" stroke-width="2.2203781" fill="none"/>
+  <path stroke-linejoin="round" d="M266.965 318.916c-8.728 1.724-20.804 10.154-24.356 9.741-9.54-1.11-18.454-4.975-27.704-7.915-3.842-1.221-7.713 0-11.57 0 32.78-15.526 43.943-13.396 63.63-1.826z" fill-rule="evenodd" stroke="#004100" stroke-width="2.2203781" fill="#006800"/>
+  <path stroke-linejoin="round" d="M245.361 296.08s-10.959 1.52-15.83 1.825c-4.873-.303-11.955-4.842-19.79-13.09-4.088-4.48-13.395-3.958-13.395-3.958 20.602-4.365 36.634-.204 49.015 15.222zM230.436 274.775c-14.92-.914-33.49-14.308-37.751-30.139-.002.202 5.479 3.45 4.566 4.263 24.457 6.19 26.081 11.161 33.185 25.876zM255.405 300.344c2.13-13.498 2.74-22.427-3.653-30.444-5.277-6.09-6.596-9.743-10.35-18.268-1.116 17.76-4.974 32.474 14.003 48.712zM231.952 262.899c11.06-16.136 12.99-28.314 11.264-47.494-.305 1.522-3.958 10.96-4.261 10.96-16.44 10.35-9.133 26.488-7.003 36.534z" fill-rule="evenodd" stroke="#004100" stroke-width="2.3686254" fill="#006800"/>
+  <path stroke-linejoin="round" d="M222.225 184.96c11.06 16.136 9.336 31.36 7.61 50.54-.305-1.523-3.958-10.96-4.26-10.96-16.441-10.351-5.48-29.534-3.35-39.58z" fill-rule="evenodd" stroke="#004100" stroke-width="2.3686254" fill="#006800"/>
+  <path stroke-linejoin="round" d="M231.353 209.93c26.79-13.498 16.438-30.648 21.31-43.84-18.57 13.802-21.006 28.515-21.31 43.84z" fill-rule="evenodd" stroke="#004100" stroke-width="2.3686254" fill="#006800"/>
+  <path d="M235 206.581c3.35-9.437 10.048-25.573 10.656-25.573M227.088 226.37c-.608-6.7-3.956-24.662-4.26-26.488" stroke="#00a400" stroke-linecap="round" stroke-width="2.2203781" fill="none"/>
+  <path stroke-linejoin="round" d="M228.304 256.502c-14.92-.914-31.055-21.31-35.316-37.141-.001.201 5.479 3.45 4.566 4.262 21.412 9.538 23.646 18.165 30.75 32.88zM223.874 242.494c-11.06-16.136-12.99-28.314-11.264-47.494.305 1.522 3.958 10.96 4.261 10.96 16.44 10.35 9.133 26.488 7.003 36.534zM233.785 214.194c27.703-12.28 19.178-25.167 27.399-38.665-18.571 13.802-27.095 23.34-27.4 38.665z" fill-rule="evenodd" stroke="#004100" stroke-width="2.3686254" fill="#006800"/>
+  <path d="M235 211.445c11.266-11.265 15.223-20.703 15.223-20.703" stroke="#00a400" stroke-linecap="round" stroke-width="2.2203781" fill="none"/>
+  <g fill-rule="evenodd">
+    <path d="M333.56 366.355l13.49.275c-44.787-41.942-130.599-60.205-118.667-137.39-12.298 83.701 70.117 91.41 105.177 137.115z" stroke="#e9bf00" stroke-width="2.3686254" fill="#ffe100"/>
+    <path d="M235.417 212.661a4.298 4.298 0 1 1-8.596 0 4.298 4.298 0 0 1 8.596 0zM232.785 236.297a4.06 4.06 0 1 1-8.118 0 4.06 4.06 0 0 1 8.118 0zM236.6 269.978a3.582 3.582 0 1 1-7.164 0 3.582 3.582 0 0 1 7.164 0zM267.876 307.223a3.582 3.582 0 1 1-7.163 0 3.582 3.582 0 0 1 7.163 0zM272.412 317.907a3.582 3.582 0 1 1-7.163 0 3.582 3.582 0 0 1 7.163 0z" stroke="#68300e" stroke-width="1.1110219000000001" fill="#9d4916"/>
+  </g>
+  <g fill-rule="evenodd" fill="#fff">
+    <g stroke="#000" stroke-width=".667">
+      <path d="M288.203 349.032c-2.355-2.134-3.853-3.503-4.777-5.828l-14.044-1.528c-.063 2.675-.126 5.349-.191 8.024l19.012-.668z" stroke-width="1.1110219000000001"/>
+      <path stroke-linejoin="round" d="M185.313 339.57c8.157 1.507 20.456-.752 24.472 4.518 4.822 5.465-15.093 13.872-12.241 18.6 6.16 6.517 12.5 3.83 19.394.226 1.624-3.523 2.878-9.804 3.766-11.672-2.51-5.773-9.253-8.601-7.53-17.32 11.37-4.249 33.23-3.897 35.583-2.258 1.848 3.623.187 5.273.564 8.16-1.883 3.64-6.728 9.81-6.738 13.074 11.93 4.203 15.074-.648 25.806-.363 12.575.155 20.225 3.531 22.955-1.467-1.87-4.315-13.403-.805-17.78-3.577-2.19-.74-3.604-2.5-5.496-4.44s-7.21-2.04-8.007-6.817c2.225-10.214 16.965-8.653 19.375-10.217l38.405 2.635c6.957-.196 10.892 12.323 1.497 16.09-9.394 3.767-37.18-5.588-49.233.842-.623-2.622-9.283-6.588-9.907-6.713-3.69 1.105-10.88.7-10.88.7-1.758 3.263-3.764 5.652-5.521 8.915-7.975-3.497-15.514 2.715-24.224.874 0 0-13.178 1.506-13.554 1.506s-8.658-.753-8.658-.753c-4.393 1.254-8.785 2.51-13.178 3.765l9.412-8.284-8.282-6.023z" stroke-width="1.1110219000000001"/>
+      <path d="M184.732 337.954a3.63 3.63 0 1 1-7.26 0 3.63 3.63 0 0 1 7.26 0zM183.78 355.911a3.63 3.63 0 1 1-7.26 0 3.63 3.63 0 0 1 7.26 0z" stroke-width="1.1110219000000001"/>
+    </g>
+    <g stroke="#000" stroke-width=".667">
+      <path d="M346.253 349.097c2.355-2.134 3.852-3.503 4.777-5.828l14.043-1.528.192 8.024-19.012-.668z" stroke-width="1.1110219000000001"/>
+      <path stroke-linejoin="round" d="M449.143 339.636c-8.157 1.506-20.457-.753-24.473 4.517-4.822 5.465 15.093 13.872 12.242 18.6-6.16 6.517-12.5 3.83-19.394.226-1.624-3.523-2.878-9.804-3.766-11.671 2.51-5.774 9.253-8.602 7.53-17.32-11.371-4.25-33.23-3.898-35.584-2.26-1.847 3.624-.187 5.274-.563 8.161 1.882 3.64 6.728 9.81 6.738 13.074-11.93 4.203-15.075-.648-25.807-.363-12.574.155-20.225 3.531-22.955-1.467 1.87-4.315 13.404-.805 17.781-3.577 2.19-.74 3.603-2.5 5.496-4.44s7.21-2.04 8.007-6.816c-2.226-10.215-16.966-8.654-19.376-10.218l-38.404 2.635c-6.958-.196-10.892 12.323-1.498 16.091 9.395 3.766 37.18-5.588 49.233.841.623-2.622 9.283-6.588 9.908-6.713 3.69 1.105 10.88.7 10.88.7 1.758 3.263 3.763 5.652 5.52 8.915 7.976-3.497 15.515 2.715 24.225.874 0 0 13.177 1.506 13.554 1.506s8.658-.753 8.658-.753l13.177 3.765c-3.136-2.762-6.274-5.522-9.411-8.284l8.282-6.023z" stroke-width="1.1110219000000001"/>
+      <path d="M449.723 338.02a3.63 3.63 0 1 0 7.261 0 3.63 3.63 0 0 0-7.26 0zM450.675 355.976a3.63 3.63 0 1 0 7.26 0 3.63 3.63 0 0 0-7.26 0z" stroke-width="1.1110219000000001"/>
+    </g>
+    <path d="M316.986 329.343c-3.231-.606-4.38-.433-6.57-.65-1.715 5.271-3.427 10.541-5.141 15.812 7.938.716 15.29.716 15.29.651-4.816-.976-3.644-15.748-3.579-15.813z"/>
+  </g>
+  <g font-size="9" font-family="Trebuchet MS" font-weight="bold">
+    <text y="344.274" x="448.605" transform="translate(-464.91 -233.28) scale(1.6657)">
+      <tspan y="344.274" x="448.605">L</tspan>
+    </text>
+    <text y="344.622" x="453.64" transform="translate(-464.91 -233.28) scale(1.6657)">
+      <tspan y="344.622" x="453.64">I</tspan>
+    </text>
+    <text y="345.056" x="456.678" transform="translate(-464.91 -233.28) scale(1.6657)">
+      <tspan y="345.056" x="456.678">B</tspan>
+    </text>
+    <text y="345.49" x="462.58" transform="translate(-464.91 -233.28) scale(1.6657)">
+      <tspan y="345.49" x="462.58">E</tspan>
+    </text>
+    <text y="345.576" x="468.309" transform="translate(-464.91 -233.28) scale(1.6657)">
+      <tspan y="345.576" x="468.309">R</tspan>
+    </text>
+    <text y="345.403" x="473.952" transform="translate(-464.91 -233.28) scale(1.6657)">
+      <tspan y="345.403" x="473.952">T</tspan>
+    </text>
+    <text y="344.535" x="479.247" transform="translate(-464.91 -233.28) scale(1.6657)">
+      <tspan y="344.535" x="479.247">A</tspan>
+    </text>
+    <text y="344.274" x="485.497" transform="translate(-464.91 -233.28) scale(1.6657)">
+      <tspan y="344.274" x="485.497">S</tspan>
+    </text>
+  </g>
+  <path d="M231.353 318.616c10.047 1.218 24.052.304 30.14-.001M216.128 284.203c8.525 6.698 27.096 10.654 26.791 10.654M253.573 296.696c-2.74-14.004-5.783-17.353-8.219-26.183M201.82 254.67c14.31 6.393 16.44 10.654 25.573 17.047M232.569 257.718c1.219-17.355 3.654-21.922 7.917-25.88M201.82 229.718c5.177 5.785 22.225 23.746 22.225 23.746M217.044 213.877c6.395 4.566 6.395 21.005 6.395 21.005" stroke="#00a400" stroke-linecap="round" stroke-width="2.2203781" fill="none"/>
+</svg>
diff --git a/test/image.svg.test.js b/test/image.svg.test.js
index 1d1d79820c..5ac5da590d 100644
--- a/test/image.svg.test.js
+++ b/test/image.svg.test.js
@@ -90,6 +90,16 @@ describe('mapnik.Image SVG', function() {
         });
 
     });
+    // Parsing well-known unsupported elements and attributes: if `strict` option is `false` (default) then succeed returning parsing errors, else fail
+    it('strict:false', function(done) {
+        var buffer = fs.readFileSync('./test/data/images/san-marino.svg');
+        mapnik.Image.fromSVGBytes(buffer, {strict: false}, function(err, img) {
+            assert.ok(err);
+            // [Error: Unsupported:"font-size]
+            assert.ok(err.message.match(/Unsupported:\"font-size/));
+            done();
+         });
+    });
 
     it('blocks allocating a very large image', function(done) {
         // 65535 is the max width/height in mapnik
@@ -173,7 +183,7 @@ describe('mapnik.Image SVG', function() {
     it('should err with async non-existent file', function(done) {
       mapnik.Image.fromSVG('./test/data/SVG_DOES_NOT_EXIST.svg', function(err, svg) {
         assert.ok(err);
-        assert.ok(err.message.match(/Failed to load: \.\/test\/data\/SVG_DOES_NOT_EXIST\.svg/));
+        assert.ok(err.message.match(/Unable to open '.\/test\/data\/SVG_DOES_NOT_EXIST.svg'/));
         assert.equal(svg, undefined);
         done();
       });
@@ -182,7 +192,7 @@ describe('mapnik.Image SVG', function() {
     it('should error with async file full of errors', function(done) {
       mapnik.Image.fromSVG('./test/data/vector_tile/errors.svg', function(err, svg) {
         assert.ok(err);
-        assert.ok(err.message.match(/Failed to load: .\/test\/data\/vector_tile\/errors.svg/));
+        assert.ok(err.message.match(/SVG parse error:/));
         assert.equal(svg, undefined);
         done();
       });

From 91bbfb6fcd30ec81f1f4c5c5bb9396acf48bd47e Mon Sep 17 00:00:00 2001
From: artemp <artem@mapnik.org>
Date: Mon, 31 Jul 2017 13:59:02 +0100
Subject: [PATCH 06/22] image SVG: update to use mapnik-a623055 error handling
 logic.

cleanup
---
 src/mapnik_image.cpp   | 26 +++++++++++++++-----------
 test/image.svg.test.js | 23 +++++++++++++++++++----
 2 files changed, 34 insertions(+), 15 deletions(-)

diff --git a/src/mapnik_image.cpp b/src/mapnik_image.cpp
index b5e5aa7e7c..125ae544f6 100644
--- a/src/mapnik_image.cpp
+++ b/src/mapnik_image.cpp
@@ -2649,15 +2649,16 @@ v8::Local<v8::Value> Image::_fromSVGSync(bool fromFile, Nan::NAN_METHOD_ARGS_TYP
         svg_parser p(svg, strict);
         if (fromFile)
         {
-            if (!p.parse(TOSTR(info[0])))
+            p.parse(TOSTR(info[0]));
+            if (!p.err_handler().error_messages().empty())
             {
                 std::ostringstream errorMessage;
                 errorMessage << "SVG parse error:" << std::endl;
                 for (auto const& error : p.err_handler().error_messages()) {
                     errorMessage <<  error << std::endl;
                 }
-                Nan::ThrowTypeError(errorMessage.str().c_str());
-                return scope.Escape(Nan::Undefined());
+                //Nan::ThrowTypeError(errorMessage.str().c_str());
+                //return scope.Escape(Nan::Undefined());
             }
         }
         else
@@ -2669,15 +2670,16 @@ v8::Local<v8::Value> Image::_fromSVGSync(bool fromFile, Nan::NAN_METHOD_ARGS_TYP
                 return scope.Escape(Nan::Undefined());
             }
             std::string svg_buffer(node::Buffer::Data(obj),node::Buffer::Length(obj));
-            if (!p.parse_from_string(svg_buffer))
+            p.parse_from_string(svg_buffer);
+            if (!p.err_handler().error_messages().empty())
             {
                 std::ostringstream errorMessage;
                 errorMessage << "SVG parse error:" << std::endl;
                 for (auto const& error : p.err_handler().error_messages()) {
                     errorMessage <<  error << std::endl;
                 }
-                Nan::ThrowTypeError(errorMessage.str().c_str());
-                return scope.Escape(Nan::Undefined());
+                //Nan::ThrowTypeError(errorMessage.str().c_str());
+                //return scope.Escape(Nan::Undefined());
             }
         }
 
@@ -2895,7 +2897,8 @@ void Image::EIO_FromSVG(uv_work_t* req)
         svg_path_adapter svg_path(stl_storage);
         svg_converter_type svg(svg_path, marker_path->attributes());
         svg_parser p(svg, closure->strict);
-        if (!p.parse(closure->filename))
+        p.parse(closure->filename);
+        if (!p.err_handler().error_messages().empty())
         {
             std::ostringstream errorMessage;
             errorMessage << "SVG parse error:" << std::endl;
@@ -2904,7 +2907,7 @@ void Image::EIO_FromSVG(uv_work_t* req)
             }
             closure->error = true;
             closure->error_name = errorMessage.str();
-            return;
+            //return;
         }
 
         double lox,loy,hix,hiy;
@@ -3013,7 +3016,7 @@ void Image::EIO_AfterFromSVG(uv_work_t* req)
  * @param {Function} callback = `function(err, img)`
  * @example
  * var buffer = fs.readFileSync('./path/to/image.svg');
- * mapnik.Image.fromSVGBytesSync(buffer, function(err, img) {
+ * mapnik.Image.fromSVGBytes(buffer, function(err, img) {
  *   if (err) throw err;
  *   // your custom code with `img`
  * });
@@ -3124,7 +3127,8 @@ void Image::EIO_FromSVGBytes(uv_work_t* req)
         svg_parser p(svg, closure->strict);
 
         std::string svg_buffer(closure->data,closure->dataLength);
-        if (!p.parse_from_string(svg_buffer))
+        p.parse_from_string(svg_buffer);
+        if (!p.err_handler().error_messages().empty())
         {
             std::ostringstream errorMessage;
             errorMessage << "SVG parse error:" << std::endl;
@@ -3133,7 +3137,7 @@ void Image::EIO_FromSVGBytes(uv_work_t* req)
             }
             closure->error = true;
             closure->error_name = errorMessage.str();
-            return;
+            //return;
         }
 
         double lox,loy,hix,hiy;
diff --git a/test/image.svg.test.js b/test/image.svg.test.js
index 5ac5da590d..8f0b2936ad 100644
--- a/test/image.svg.test.js
+++ b/test/image.svg.test.js
@@ -94,13 +94,28 @@ describe('mapnik.Image SVG', function() {
     it('strict:false', function(done) {
         var buffer = fs.readFileSync('./test/data/images/san-marino.svg');
         mapnik.Image.fromSVGBytes(buffer, {strict: false}, function(err, img) {
-            assert.ok(err);
-            // [Error: Unsupported:"font-size]
-            assert.ok(err.message.match(/Unsupported:\"font-size/));
-            done();
+          assert.ok(err);
+          // [Error: Unsupported:"text]
+          assert.ok(err.message.match(/Unsupported:\"text/));
+          done();
          });
     });
 
+    it('strict:true', function(done) {
+        var buffer = fs.readFileSync('./test/data/images/san-marino.svg');
+      try {
+        mapnik.Image.fromSVGBytes(buffer, {strict: true}, function(err, img) {
+          assert.ok(err);
+          // [Error: Unsupported:"text]
+          assert.ok(err.message.match(/Unsupported:\"text/));
+          done();
+        });
+      } catch (err)
+      {
+        // currently we don't get here!
+      }
+    });
+
     it('blocks allocating a very large image', function(done) {
         // 65535 is the max width/height in mapnik
         var svgdata = "<svg width='65535' height='65535'><g id='a'><ellipse fill='#FFFFFF' stroke='#000000' stroke-width='4' cx='50' cy='50' rx='25' ry='25'/></g></svg>";

From c1e66029100c003e4b0ea1e4337b59528b8434d6 Mon Sep 17 00:00:00 2001
From: artemp <artem@mapnik.org>
Date: Tue, 1 Aug 2017 14:28:48 +0100
Subject: [PATCH 07/22] revert back to returning from Image::EIO_FromSVG early
 on parsing error(s)

---
 src/mapnik_image.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mapnik_image.cpp b/src/mapnik_image.cpp
index 125ae544f6..b40a745ae2 100644
--- a/src/mapnik_image.cpp
+++ b/src/mapnik_image.cpp
@@ -2907,7 +2907,7 @@ void Image::EIO_FromSVG(uv_work_t* req)
             }
             closure->error = true;
             closure->error_name = errorMessage.str();
-            //return;
+            return;
         }
 
         double lox,loy,hix,hiy;

From 29d7daaff750d9cea1d2fefeb1e1a16c19f0380b Mon Sep 17 00:00:00 2001
From: artemp <artem@mapnik.org>
Date: Tue, 1 Aug 2017 18:04:53 +0100
Subject: [PATCH 08/22] + restore all original return paths

update to mapnik f64c757

update some error strings
---
 install_mason.sh       |  4 ++--
 package.json           |  4 ++--
 src/mapnik_image.cpp   | 10 +++++-----
 test/image.svg.test.js | 35 +++++------------------------------
 4 files changed, 14 insertions(+), 39 deletions(-)

diff --git a/install_mason.sh b/install_mason.sh
index 20d2adc2a0..d641497d1c 100755
--- a/install_mason.sh
+++ b/install_mason.sh
@@ -12,7 +12,7 @@ ICU_VERSION="57.1"
 
 if [ ! -f ./mason/mason.sh ]; then
     mkdir -p ./mason
-    curl -sSfL https://github.com/mapbox/mason/archive/16c8c0e41c03c519338685928a1fed4945e50db1.tar.gz | tar --gunzip --extract --strip-components=1 --exclude="*md" --exclude="test*" --directory=./mason
+    curl -sSfL https://github.com/mapbox/mason/archive/23fe28bc578667fc81f4d6e3479ab4ffb4702b77.tar.gz | tar --gunzip --extract --strip-components=1 --exclude="*md" --exclude="test*" --directory=./mason
 fi
 
 if [ ! -f ./mason_packages/.link/bin/mapnik-config ]; then
@@ -38,5 +38,5 @@ if [ ! -f ./mason_packages/.link/bin/mapnik-config ]; then
     # NOTE: sync this version with the `mapnik_version` in package.json (which is used for windows builds)
     # In the future we could pull from that version automatically if mason were to support knowing the right dep
     # versions to install automatically. Until then there is not much point since the deps are still hardcoded here.
-    install mapnik a623055
+    install mapnik f64c757
 fi
diff --git a/package.json b/package.json
index 15ab3ded97..9c7f2f4481 100644
--- a/package.json
+++ b/package.json
@@ -4,8 +4,8 @@
   "url": "http://github.com/mapnik/node-mapnik",
   "homepage": "http://mapnik.org",
   "author": "Dane Springmeyer <dane@mapbox.com> (mapnik.org)",
-  "version": "3.6.2-dev-a623055",
-  "mapnik_version":"mapnik-a623055",
+  "version": "3.6.2-dev-f64c757",
+  "mapnik_version":"f64c757",
   "main": "./lib/mapnik.js",
   "binary": {
     "module_name": "mapnik",
diff --git a/src/mapnik_image.cpp b/src/mapnik_image.cpp
index b40a745ae2..6fea23f3bf 100644
--- a/src/mapnik_image.cpp
+++ b/src/mapnik_image.cpp
@@ -2657,8 +2657,8 @@ v8::Local<v8::Value> Image::_fromSVGSync(bool fromFile, Nan::NAN_METHOD_ARGS_TYP
                 for (auto const& error : p.err_handler().error_messages()) {
                     errorMessage <<  error << std::endl;
                 }
-                //Nan::ThrowTypeError(errorMessage.str().c_str());
-                //return scope.Escape(Nan::Undefined());
+                Nan::ThrowTypeError(errorMessage.str().c_str());
+                return scope.Escape(Nan::Undefined());
             }
         }
         else
@@ -2678,8 +2678,8 @@ v8::Local<v8::Value> Image::_fromSVGSync(bool fromFile, Nan::NAN_METHOD_ARGS_TYP
                 for (auto const& error : p.err_handler().error_messages()) {
                     errorMessage <<  error << std::endl;
                 }
-                //Nan::ThrowTypeError(errorMessage.str().c_str());
-                //return scope.Escape(Nan::Undefined());
+                Nan::ThrowTypeError(errorMessage.str().c_str());
+                return scope.Escape(Nan::Undefined());
             }
         }
 
@@ -3137,7 +3137,7 @@ void Image::EIO_FromSVGBytes(uv_work_t* req)
             }
             closure->error = true;
             closure->error_name = errorMessage.str();
-            //return;
+            return;
         }
 
         double lox,loy,hix,hiy;
diff --git a/test/image.svg.test.js b/test/image.svg.test.js
index 8f0b2936ad..7291e7cfb9 100644
--- a/test/image.svg.test.js
+++ b/test/image.svg.test.js
@@ -25,10 +25,10 @@ describe('mapnik.Image SVG', function() {
         }, /first argument is invalid, must be a Buffer/);
         assert.throws(function() {
           new mapnik.Image.fromSVGBytesSync(new Buffer('asdfasdf'));
-        }, /Unable to parse 'asdfasdf'/);
+        }, /SVG error: unable to parse "asdfasdf"/);
         assert.throws(function() {
           mapnik.Image.fromSVGSync('./test/data/SVG_DOES_NOT_EXIST.svg');
-        }, /Unable to open '.\/test\/data\/SVG_DOES_NOT_EXIST.svg'/);
+        }, /SVG error: unbale to open "\.\/test\/data\/SVG_DOES_NOT_EXIST\.svg"/);
         assert.throws(function() {
           mapnik.Image.fromSVGSync('./test/data/vector_tile/tile0.expected-svg.svg', 256);
         }, /optional second arg must be an options object/);
@@ -73,7 +73,7 @@ describe('mapnik.Image SVG', function() {
         }, /image created from svg must have a width and height greater then zero/);
         mapnik.Image.fromSVGBytes(new Buffer('a'), { scale: 1 }, function(err, res) {
             assert.ok(err);
-            assert.ok(err.message.match(/Unable to parse 'a'/));
+            assert.ok(err.message.match(/SVG error: unable to parse "a"/));
             var svgdata = "<svg width='1000000000000' height='1000000000000'><g id='a'><ellipse fill='#FFFFFF' stroke='#000000' stroke-width='4' cx='50' cy='50' rx='25' ry='25'/></g></svg>";
             var buffer = new Buffer(svgdata);
             mapnik.Image.fromSVGBytes(buffer, { scale: 1 }, function(err, img) {
@@ -90,31 +90,6 @@ describe('mapnik.Image SVG', function() {
         });
 
     });
-    // Parsing well-known unsupported elements and attributes: if `strict` option is `false` (default) then succeed returning parsing errors, else fail
-    it('strict:false', function(done) {
-        var buffer = fs.readFileSync('./test/data/images/san-marino.svg');
-        mapnik.Image.fromSVGBytes(buffer, {strict: false}, function(err, img) {
-          assert.ok(err);
-          // [Error: Unsupported:"text]
-          assert.ok(err.message.match(/Unsupported:\"text/));
-          done();
-         });
-    });
-
-    it('strict:true', function(done) {
-        var buffer = fs.readFileSync('./test/data/images/san-marino.svg');
-      try {
-        mapnik.Image.fromSVGBytes(buffer, {strict: true}, function(err, img) {
-          assert.ok(err);
-          // [Error: Unsupported:"text]
-          assert.ok(err.message.match(/Unsupported:\"text/));
-          done();
-        });
-      } catch (err)
-      {
-        // currently we don't get here!
-      }
-    });
 
     it('blocks allocating a very large image', function(done) {
         // 65535 is the max width/height in mapnik
@@ -189,7 +164,7 @@ describe('mapnik.Image SVG', function() {
     it('should err with async invalid buffer', function(done) {
       mapnik.Image.fromSVGBytes(new Buffer('asdfasdf'), function(err, svg) {
         assert.ok(err);
-        assert.ok(err.message.match(/Unable to parse 'asdfasdf'/));
+        assert.ok(err.message.match(/SVG error: unable to parse "asdfasdf"/));
         assert.equal(svg, undefined);
         done();
       });
@@ -198,7 +173,7 @@ describe('mapnik.Image SVG', function() {
     it('should err with async non-existent file', function(done) {
       mapnik.Image.fromSVG('./test/data/SVG_DOES_NOT_EXIST.svg', function(err, svg) {
         assert.ok(err);
-        assert.ok(err.message.match(/Unable to open '.\/test\/data\/SVG_DOES_NOT_EXIST.svg'/));
+        assert.ok(err.message.match(/SVG error: unbale to open "\.\/test\/data\/SVG_DOES_NOT_EXIST\.svg"/));
         assert.equal(svg, undefined);
         done();
       });

From fe5c358ba32697b8aff3fd27ab193321f79caced Mon Sep 17 00:00:00 2001
From: Artem Pavlenko <artem@mapnik.org>
Date: Fri, 8 Sep 2017 11:33:19 +0100
Subject: [PATCH 09/22] Update for mapnik v3.1.x (master)

Fix warning: 'NewInstance' is deprecated [-Wdeprecated-declarations]
---
 src/mapnik_datasource.cpp        |   2 +-
 src/mapnik_feature.cpp           |   2 +-
 src/mapnik_geometry.cpp          |   2 +-
 src/mapnik_image.cpp             |  15 +-
 src/mapnik_map.cpp               |   2 +-
 src/mapnik_memory_datasource.cpp |   2 +-
 src/mapnik_projection.cpp        |   2 +-
 src/mapnik_vector_tile.cpp       | 463 +++++++++++++++----------------
 src/object_to_container.hpp      |   2 +-
 src/utils.hpp                    |   2 +-
 10 files changed, 236 insertions(+), 258 deletions(-)

diff --git a/src/mapnik_datasource.cpp b/src/mapnik_datasource.cpp
index 3973527fe6..2b465c2478 100644
--- a/src/mapnik_datasource.cpp
+++ b/src/mapnik_datasource.cpp
@@ -5,7 +5,7 @@
 
 // mapnik
 #include <mapnik/attribute_descriptor.hpp>  // for attribute_descriptor
-#include <mapnik/box2d.hpp>             // for box2d
+#include <mapnik/geometry/box2d.hpp>             // for box2d
 #include <mapnik/datasource.hpp>        // for datasource, datasource_ptr, etc
 #include <mapnik/datasource_cache.hpp>  // for datasource_cache
 #include <mapnik/feature_layer_desc.hpp>  // for layer_descriptor
diff --git a/src/mapnik_feature.cpp b/src/mapnik_feature.cpp
index 03258e97f4..33ca4168c8 100644
--- a/src/mapnik_feature.cpp
+++ b/src/mapnik_feature.cpp
@@ -7,7 +7,7 @@
 #include <mapnik/unicode.hpp>
 #include <mapnik/feature_factory.hpp>
 #include <mapnik/json/feature_parser.hpp>
-#include <mapnik/value_types.hpp>
+#include <mapnik/value/types.hpp>
 #include <mapnik/util/feature_to_geojson.hpp>
 
 Nan::Persistent<v8::FunctionTemplate> Feature::constructor;
diff --git a/src/mapnik_geometry.cpp b/src/mapnik_geometry.cpp
index 24d7b08d45..ad340836dc 100644
--- a/src/mapnik_geometry.cpp
+++ b/src/mapnik_geometry.cpp
@@ -3,7 +3,7 @@
 #include "mapnik_projection.hpp"
 
 #include <mapnik/datasource.hpp>
-#include <mapnik/geometry_reprojection.hpp>
+#include <mapnik/geometry/reprojection.hpp>
 #include <mapnik/util/geometry_to_geojson.hpp>
 #include <mapnik/util/geometry_to_wkt.hpp>
 #include <mapnik/util/geometry_to_wkb.hpp>
diff --git a/src/mapnik_image.cpp b/src/mapnik_image.cpp
index 6fea23f3bf..6bcc7e3a04 100644
--- a/src/mapnik_image.cpp
+++ b/src/mapnik_image.cpp
@@ -1727,11 +1727,11 @@ v8::Local<v8::Value> Image::_copySync(Nan::NAN_METHOD_ARGS_TYPE info)
     try
     {
         image_ptr imagep = std::make_shared<mapnik::image_any>(
-                                                       mapnik::image_copy(*(im->this_),
-                                                                            type,
-                                                                            offset,
-                                                                            scaling)
-                                                    );
+            mapnik::image_copy(*(im->this_),
+                               type,
+                               offset,
+                               scaling)
+            );
         Image* new_im = new Image(imagep);
         v8::Local<v8::Value> ext = Nan::New<v8::External>(new_im);
         v8::MaybeLocal<v8::Object> maybe_local = Nan::NewInstance(Nan::New(constructor)->GetFunction(), 1, &ext);
@@ -3220,8 +3220,9 @@ void Image::EIO_AfterFromSVGBytes(uv_work_t* req)
     {
         Image* im = new Image(closure->im);
         v8::Local<v8::Value> ext = Nan::New<v8::External>(im);
-        v8::Local<v8::Object> image_obj = Nan::New(constructor)->GetFunction()->NewInstance(1, &ext);
-        v8::Local<v8::Value> argv[2] = { Nan::Null(), image_obj };
+        v8::MaybeLocal<v8::Object> maybe_local = Nan::NewInstance(Nan::New(constructor)->GetFunction(), 1, &ext);
+        if (maybe_local.IsEmpty()) Nan::ThrowError("Could not create new Image instance");
+        v8::Local<v8::Value> argv[2] = { Nan::Null(), maybe_local.ToLocalChecked() };
         Nan::MakeCallback(Nan::GetCurrentContext()->Global(), Nan::New(closure->cb), 2, argv);
     }
     closure->cb.Reset();
diff --git a/src/mapnik_map.cpp b/src/mapnik_map.cpp
index ec4f91f682..da81afab6e 100644
--- a/src/mapnik_map.cpp
+++ b/src/mapnik_map.cpp
@@ -16,7 +16,7 @@
 
 // mapnik
 #include <mapnik/agg_renderer.hpp>      // for agg_renderer
-#include <mapnik/box2d.hpp>             // for box2d
+#include <mapnik/geometry/box2d.hpp>             // for box2d
 #include <mapnik/color.hpp>             // for color
 #include <mapnik/attribute.hpp>        // for attributes
 #include <mapnik/featureset.hpp>        // for featureset_ptr
diff --git a/src/mapnik_memory_datasource.cpp b/src/mapnik_memory_datasource.cpp
index cb87e2a082..f46cac5328 100644
--- a/src/mapnik_memory_datasource.cpp
+++ b/src/mapnik_memory_datasource.cpp
@@ -3,7 +3,7 @@
 #include <mapnik/unicode.hpp>
 #include <mapnik/feature_factory.hpp>
 #include <mapnik/memory_datasource.hpp>
-#include <mapnik/value_types.hpp>
+#include <mapnik/value/types.hpp>
 
 #include "mapnik_memory_datasource.hpp"
 #include "mapnik_featureset.hpp"
diff --git a/src/mapnik_projection.cpp b/src/mapnik_projection.cpp
index e047e2eef4..b4962a4d9c 100644
--- a/src/mapnik_projection.cpp
+++ b/src/mapnik_projection.cpp
@@ -1,7 +1,7 @@
 #include "mapnik_projection.hpp"
 #include "utils.hpp"
 
-#include <mapnik/box2d.hpp>
+#include <mapnik/geometry/box2d.hpp>
 #include <mapnik/proj_transform.hpp>
 #include <mapnik/projection.hpp>
 #include <sstream>
diff --git a/src/mapnik_vector_tile.cpp b/src/mapnik_vector_tile.cpp
index dfeee99d39..873b22f774 100644
--- a/src/mapnik_vector_tile.cpp
+++ b/src/mapnik_vector_tile.cpp
@@ -23,13 +23,13 @@
 // mapnik
 #include <mapnik/agg_renderer.hpp>      // for agg_renderer
 #include <mapnik/datasource_cache.hpp>
-#include <mapnik/box2d.hpp>
+#include <mapnik/geometry/box2d.hpp>
 #include <mapnik/feature.hpp>
 #include <mapnik/featureset.hpp>
 #include <mapnik/feature_kv_iterator.hpp>
-#include <mapnik/geometry_is_simple.hpp>
-#include <mapnik/geometry_is_valid.hpp>
-#include <mapnik/geometry_reprojection.hpp>
+#include <mapnik/geometry/is_simple.hpp>
+#include <mapnik/geometry/is_valid.hpp>
+#include <mapnik/geometry/reprojection.hpp>
 #include <mapnik/geom_util.hpp>
 #include <mapnik/hit_test_filter.hpp>
 #include <mapnik/image_any.hpp>
@@ -117,7 +117,7 @@ struct p2p_distance
     p2p_result operator() (mapnik::geometry::line_string<double> const& geom) const
     {
         p2p_result p2p;
-        std::size_t num_points = geom.num_points();
+        auto num_points = geom.size();
         if (num_points > 1)
         {
             for (std::size_t i = 1; i < num_points; ++i)
@@ -150,53 +150,38 @@ struct p2p_distance
         }
         return p2p;
     }
-    p2p_result operator() (mapnik::geometry::polygon<double> const& geom) const
+    p2p_result operator() (mapnik::geometry::polygon<double> const& poly) const
     {
-        auto const& exterior = geom.exterior_ring;
-        std::size_t num_points = exterior.num_points();
         p2p_result p2p;
-        if (num_points < 4)
-        {
-            return p2p;
-        }
+        std::size_t num_rings = poly.size();
         bool inside = false;
-        for (std::size_t i = 1; i < num_points; ++i)
+        for (std::size_t ring_index = 0; ring_index < num_rings; ++ring_index)
         {
-            auto const& pt0 = exterior[i-1];
-            auto const& pt1 = exterior[i];
-            // todo - account for tolerance
-            if (mapnik::detail::pip(pt0.x,pt0.y,pt1.x,pt1.y,x_,y_))
+            auto ring = poly[ring_index];
+            auto num_points = ring.size();
+            if (num_points < 4)
             {
-                inside = !inside;
+                if (ring_index == 0) // exterior
+                    return p2p;
+                else // interior
+                    continue;
             }
-        }
-        if (!inside)
-        {
-            return p2p;
-        }
-        for (auto const& ring :  geom.interior_rings)
-        {
-            std::size_t num_interior_points = ring.size();
-            if (num_interior_points < 4)
+            for (std::size_t index = 1; index < num_points; ++index)
             {
-                continue;
-            }
-            for (std::size_t j = 1; j < num_interior_points; ++j)
-            {
-                auto const& pt0 = ring[j-1];
-                auto const& pt1 = ring[j];
-                if (mapnik::detail::pip(pt0.x,pt0.y,pt1.x,pt1.y,x_,y_))
+                auto const& pt0 = ring[index - 1];
+                auto const& pt1 = ring[index];
+                // todo - account for tolerance
+                if (mapnik::detail::pip(pt0.x, pt0.y, pt1.x, pt1.y, x_,y_))
                 {
-                    inside=!inside;
+                    inside = !inside;
                 }
             }
+            if (ring_index == 0 && !inside) return p2p;
         }
-        if (inside)
-        {
-            p2p.distance = 0;
-        }
+        if (inside) p2p.distance = 0;
         return p2p;
     }
+
     p2p_result operator() (mapnik::geometry::multi_polygon<double> const& geom) const
     {
         p2p_result p2p;
@@ -245,10 +230,10 @@ detail::p2p_result path_to_point_distance(mapnik::geometry::geometry<double> con
 Nan::Persistent<v8::FunctionTemplate> VectorTile::constructor;
 
 /**
- * **`mapnik.VectorTile`** 
+ * **`mapnik.VectorTile`**
 
  * A tile generator built according to the [Mapbox Vector Tile](https://github.com/mapbox/vector-tile-spec)
- * specification for compressed and simplified tiled vector data. 
+ * specification for compressed and simplified tiled vector data.
  * Learn more about vector tiles [here](https://www.mapbox.com/developers/vector-tiles/).
  *
  * @class VectorTile
@@ -314,16 +299,16 @@ void VectorTile::Initialize(v8::Local<v8::Object> target)
     ATTR(lcons, "z", get_tile_z, set_tile_z);
     ATTR(lcons, "tileSize", get_tile_size, set_tile_size);
     ATTR(lcons, "bufferSize", get_buffer_size, set_buffer_size);
-    
+
     Nan::SetMethod(lcons->GetFunction().As<v8::Object>(), "info", info);
-    
+
     target->Set(Nan::New("VectorTile").ToLocalChecked(),lcons->GetFunction());
     constructor.Reset(lcons);
 }
 
-VectorTile::VectorTile(std::uint64_t z, 
-                       std::uint64_t x, 
-                       std::uint64_t y, 
+VectorTile::VectorTile(std::uint64_t z,
+                       std::uint64_t x,
+                       std::uint64_t y,
                        std::uint32_t tile_size,
                        std::int32_t buffer_size) :
     Nan::ObjectWrap(),
@@ -335,7 +320,7 @@ VectorTile::VectorTile(std::uint64_t z,
 // I have tested it and it does print
 /* LCOV_EXCL_START */
 VectorTile::~VectorTile()
-{ 
+{
 }
 /* LCOV_EXCL_STOP */
 
@@ -346,7 +331,7 @@ NAN_METHOD(VectorTile::New)
         Nan::ThrowError("Cannot call constructor as function, you need to use 'new' keyword");
         return;
     }
-    
+
     if (info[0]->IsExternal())
     {
         v8::Local<v8::External> ext = info[0].As<v8::External>();
@@ -362,7 +347,7 @@ NAN_METHOD(VectorTile::New)
         Nan::ThrowError("please provide a z, x, y");
         return;
     }
-    
+
     if (!info[0]->IsNumber() ||
         !info[1]->IsNumber() ||
         !info[2]->IsNumber())
@@ -370,7 +355,7 @@ NAN_METHOD(VectorTile::New)
         Nan::ThrowTypeError("required parameters (z, x, and y) must be a integers");
         return;
     }
-    
+
     std::int64_t z = info[0]->IntegerValue();
     std::int64_t x = info[1]->IntegerValue();
     std::int64_t y = info[2]->IntegerValue();
@@ -513,7 +498,7 @@ void _composite(VectorTile* target_vt,
  * var vt2 = new mapnik.VectorTile(0,0,0);
  * var options = { ... };
  * vt1.compositeSync([vt2], options);
- * 
+ *
  */
 NAN_METHOD(VectorTile::compositeSync)
 {
@@ -638,8 +623,8 @@ v8::Local<v8::Value> VectorTile::_compositeSync(Nan::NAN_METHOD_ARGS_TYPE info)
                 return scope.Escape(Nan::Undefined());
             }
             threading_mode = static_cast<std::launch>(param_val->IntegerValue());
-            if (threading_mode != std::launch::async && 
-                threading_mode != std::launch::deferred && 
+            if (threading_mode != std::launch::async &&
+                threading_mode != std::launch::deferred &&
                 threading_mode != (std::launch::async | std::launch::deferred))
             {
                 Nan::ThrowTypeError("optional arg 'threading_mode' is invalid");
@@ -821,7 +806,7 @@ v8::Local<v8::Value> VectorTile::_compositeSync(Nan::NAN_METHOD_ARGS_TYPE info)
     return scope.Escape(Nan::Undefined());
 }
 
-typedef struct 
+typedef struct
 {
     uv_work_t request;
     VectorTile* d;
@@ -857,28 +842,28 @@ typedef struct
  * @param {float} [options.scale_factor=1.0]
  * @param {number} [options.offset_x=0]
  * @param {number} [options.offset_y=0]
- * @param {float} [options.area_threshold=0.1] - used to discard small polygons. 
- * If a value is greater than `0` it will trigger polygons with an area smaller 
+ * @param {float} [options.area_threshold=0.1] - used to discard small polygons.
+ * If a value is greater than `0` it will trigger polygons with an area smaller
  * than the value to be discarded. Measured in grid integers, not spherical mercator
  * coordinates.
  * @param {boolean} [options.strictly_simple=true] - ensure all geometry is valid according to
  * OGC Simple definition
  * @param {boolean} [options.multi_polygon_union=false] - union all multipolygons
  * @param {Object<mapnik.polygonFillType>} [options.fill_type=mapnik.polygonFillType.positive]
- * the fill type used in determining what are holes and what are outer rings. See the 
+ * the fill type used in determining what are holes and what are outer rings. See the
  * [Clipper documentation](http://www.angusj.com/delphi/clipper/documentation/Docs/Units/ClipperLib/Types/PolyFillType.htm)
  * to learn more about fill types.
  * @param {float} [options.scale_denominator=0.0]
  * @param {boolean} [options.reencode=false]
  * @param {Array<number>} [options.max_extent=minx,miny,maxx,maxy]
- * @param {float} [options.simplify_distance=0.0] - Simplification works to generalize 
- * geometries before encoding into vector tiles.simplification distance The 
+ * @param {float} [options.simplify_distance=0.0] - Simplification works to generalize
+ * geometries before encoding into vector tiles.simplification distance The
  * `simplify_distance` value works in integer space over a 4096 pixel grid and uses
  * the [Douglas-Peucker algorithm](https://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm).
- * @param {boolean} [options.process_all_rings=false] - if `true`, don't assume winding order and ring order of 
+ * @param {boolean} [options.process_all_rings=false] - if `true`, don't assume winding order and ring order of
  * polygons are correct according to the [`2.0` Mapbox Vector Tile specification](https://github.com/mapbox/vector-tile-spec)
  * @param {string} [options.image_format=webp] or `jpeg`, `png`, `tiff`
- * @param {string} [options.scaling_method=bilinear] - can be any 
+ * @param {string} [options.scaling_method=bilinear] - can be any
  * of the <mapnik.imageScaling> methods
  * @param {string} [options.threading_mode=deferred]
  * @param {Function} callback - `function(err)`
@@ -902,7 +887,7 @@ typedef struct
  *   if (err) throw err;
  *   // your custom code with `vt1`
  * });
- * 
+ *
  */
 NAN_METHOD(VectorTile::composite)
 {
@@ -1012,7 +997,7 @@ NAN_METHOD(VectorTile::composite)
                 return;
             }
             threading_mode = static_cast<std::launch>(param_val->IntegerValue());
-            if (threading_mode != std::launch::async && 
+            if (threading_mode != std::launch::async &&
                 threading_mode != std::launch::deferred &&
                 threading_mode != (std::launch::async | std::launch::deferred))
             {
@@ -1020,7 +1005,7 @@ NAN_METHOD(VectorTile::composite)
                 return;
             }
         }
-        if (options->Has(Nan::New("simplify_distance").ToLocalChecked())) 
+        if (options->Has(Nan::New("simplify_distance").ToLocalChecked()))
         {
             v8::Local<v8::Value> param_val = options->Get(Nan::New("simplify_distance").ToLocalChecked());
             if (!param_val->IsNumber())
@@ -1035,7 +1020,7 @@ NAN_METHOD(VectorTile::composite)
                 return;
             }
         }
-        if (options->Has(Nan::New("scale").ToLocalChecked())) 
+        if (options->Has(Nan::New("scale").ToLocalChecked()))
         {
             v8::Local<v8::Value> bind_opt = options->Get(Nan::New("scale").ToLocalChecked());
             if (!bind_opt->IsNumber())
@@ -1358,7 +1343,7 @@ NAN_METHOD(VectorTile::names)
  */
 NAN_METHOD(VectorTile::layer)
 {
-    if (info.Length() < 1) 
+    if (info.Length() < 1)
     {
         Nan::ThrowError("first argument must be either a layer name");
         return;
@@ -1430,7 +1415,7 @@ NAN_METHOD(VectorTile::emptyLayers)
 }
 
 /**
- * Get the names of all of the painted layers in this vector tile. "Painted" is 
+ * Get the names of all of the painted layers in this vector tile. "Painted" is
  * a check to see if data exists in the source dataset in a tile.
  *
  * @memberof VectorTile
@@ -1477,7 +1462,7 @@ NAN_METHOD(VectorTile::empty)
 }
 
 /**
- * Get whether the vector tile has been painted. "Painted" is 
+ * Get whether the vector tile has been painted. "Painted" is
  * a check to see if data exists in the source dataset in a tile.
  *
  * @memberof VectorTile
@@ -1495,7 +1480,7 @@ NAN_METHOD(VectorTile::painted)
     info.GetReturnValue().Set(Nan::New(d->tile_->is_painted()));
 }
 
-typedef struct 
+typedef struct
 {
     uv_work_t request;
     VectorTile* d;
@@ -1513,26 +1498,26 @@ typedef struct
  * Query a vector tile by longitude and latitude and get an array of
  * features in the vector tile that exist in relation to those coordinates.
  *
- * A note on `tolerance`: If you provide a positive value for tolerance you 
- * are saying that you'd like features returned in the query results that might 
- * not exactly intersect with a given lon/lat. The higher the tolerance the 
- * slower the query will run because it will do more work by comparing your query 
- * lon/lat against more potential features. However, this is an important parameter 
- * because vector tile storage, by design, results in reduced precision of coordinates. 
- * The amount of precision loss depends on the zoom level of a given vector tile 
- * and how aggressively it was simplified during encoding. So if you want at 
- * least one match - say the closest single feature to your query lon/lat - is is 
- * not possible to know the smallest tolerance that will work without experimentation. 
- * In general be prepared to provide a high tolerance (1-100) for low zoom levels 
- * while you should be okay with a low tolerance (1-10) at higher zoom levels and 
- * with vector tiles that are storing less simplified geometries. The units tolerance 
- * should be expressed in depend on the coordinate system of the underlying data. 
- * In the case of vector tiles this is spherical mercator so the units are meters. 
- * For points any features will be returned that contain a point which is, by distance 
- * in meters, not greater than the tolerance value. For lines any features will be 
- * returned that have a segment which is, by distance in meters, not greater than 
- * the tolerance value. For polygons tolerance is not supported which means that 
- * your lon/lat must fall inside a feature's polygon otherwise that feature will 
+ * A note on `tolerance`: If you provide a positive value for tolerance you
+ * are saying that you'd like features returned in the query results that might
+ * not exactly intersect with a given lon/lat. The higher the tolerance the
+ * slower the query will run because it will do more work by comparing your query
+ * lon/lat against more potential features. However, this is an important parameter
+ * because vector tile storage, by design, results in reduced precision of coordinates.
+ * The amount of precision loss depends on the zoom level of a given vector tile
+ * and how aggressively it was simplified during encoding. So if you want at
+ * least one match - say the closest single feature to your query lon/lat - is is
+ * not possible to know the smallest tolerance that will work without experimentation.
+ * In general be prepared to provide a high tolerance (1-100) for low zoom levels
+ * while you should be okay with a low tolerance (1-10) at higher zoom levels and
+ * with vector tiles that are storing less simplified geometries. The units tolerance
+ * should be expressed in depend on the coordinate system of the underlying data.
+ * In the case of vector tiles this is spherical mercator so the units are meters.
+ * For points any features will be returned that contain a point which is, by distance
+ * in meters, not greater than the tolerance value. For lines any features will be
+ * returned that have a segment which is, by distance in meters, not greater than
+ * the tolerance value. For polygons tolerance is not supported which means that
+ * your lon/lat must fall inside a feature's polygon otherwise that feature will
  * not be matched.
  *
  * @memberof VectorTile
@@ -1541,10 +1526,10 @@ typedef struct
  * @param {number} longitude - longitude
  * @param {number} latitude - latitude
  * @param {Object} [options]
- * @param {number} [options.tolerance=0] include features a specific distance from the 
+ * @param {number} [options.tolerance=0] include features a specific distance from the
  * lon/lat query in the response
- * @param {string} [options.layer] layer - Pass a layer name to restrict 
- * the query results to a single layer in the vector tile. Get all possible 
+ * @param {string} [options.layer] layer - Pass a layer name to restrict
+ * the query results to a single layer in the vector tile. Get all possible
  * layer names in the vector tile with {@link VectorTile#names}
  * @param {Function} callback(err, features)
  * @returns {Array<mapnik.Feature>} an array of {@link mapnik.Feature} objects
@@ -1606,7 +1591,7 @@ NAN_METHOD(VectorTile::query)
     // If last argument is not a function go with sync call.
     if (!info[info.Length()-1]->IsFunction())
     {
-        try  
+        try
         {
             std::vector<query_result> result = _query(d, lon, lat, tolerance, layer_name);
             v8::Local<v8::Array> arr = _queryResultToV8(result);
@@ -1618,8 +1603,8 @@ NAN_METHOD(VectorTile::query)
             Nan::ThrowError(ex.what());
             return;
         }
-    } 
-    else 
+    }
+    else
     {
         v8::Local<v8::Value> callback = info[info.Length()-1];
         vector_tile_query_baton_t *closure = new vector_tile_query_baton_t();
@@ -1815,7 +1800,7 @@ typedef struct
 } vector_tile_queryMany_baton_t;
 
 /**
- * Query a vector tile by multiple sets of latitude/longitude pairs. 
+ * Query a vector tile by multiple sets of latitude/longitude pairs.
  * Just like <mapnik.VectorTile.query> but with more points to search.
  *
  * @memberof VectorTile
@@ -1823,22 +1808,22 @@ typedef struct
  * @name queryMany
  * @param {array<number>} array - `longitude` and `latitude` array pairs [[lon1,lat1], [lon2,lat2]]
  * @param {Object} options
- * @param {number} [options.tolerance=0] include features a specific distance from the 
+ * @param {number} [options.tolerance=0] include features a specific distance from the
  * lon/lat query in the response. Read more about tolerance at {@link VectorTile#query}.
  * @param {string} options.layer - layer name
  * @param {Array<string>} [options.fields] - array of field names
  * @param {Function} [callback] - `function(err, results)`
- * @returns {Object} The response has contains two main objects: `hits` and `features`. 
- * The number of hits returned will correspond to the number of lon/lats queried and will 
- * be returned in the order of the query. Each hit returns 1) a `distance` and a 2) `feature_id`. 
- * The `distance` is number of meters the queried lon/lat is from the object in the vector tile. 
- * The `feature_id` is the corresponding object in features object. 
- * 
+ * @returns {Object} The response has contains two main objects: `hits` and `features`.
+ * The number of hits returned will correspond to the number of lon/lats queried and will
+ * be returned in the order of the query. Each hit returns 1) a `distance` and a 2) `feature_id`.
+ * The `distance` is number of meters the queried lon/lat is from the object in the vector tile.
+ * The `feature_id` is the corresponding object in features object.
+ *
  * The values for the query is contained in the features object. Use attributes() to extract a value.
  * @example
  * vt.queryMany([[139.61, 37.17], [140.64, 38.1]], {tolerance: 0}, function(err, results) {
  *   if (err) throw err;
- *   console.log(results.hits); // 
+ *   console.log(results.hits); //
  *   console.log(results.features); // array of feature objects
  *   if (features.length) {
  *     console.log(results.features[0].layer); // 'layer-name'
@@ -1981,11 +1966,11 @@ NAN_METHOD(VectorTile::queryMany)
     }
 }
 
-void VectorTile::_queryMany(queryMany_result & result, 
-                            VectorTile* d, 
-                            std::vector<query_lonlat> const& query, 
-                            double tolerance, 
-                            std::string const& layer_name, 
+void VectorTile::_queryMany(queryMany_result & result,
+                            VectorTile* d,
+                            std::vector<query_lonlat> const& query,
+                            double tolerance,
+                            std::string const& layer_name,
                             std::vector<std::string> const& fields)
 {
     protozero::pbf_reader layer_msg;
@@ -1993,7 +1978,7 @@ void VectorTile::_queryMany(queryMany_result & result,
     {
         throw std::runtime_error("Could not find layer in vector tile");
     }
-    
+
     std::map<unsigned,query_result> features;
     std::map<unsigned,std::vector<query_hit> > hits;
 
@@ -2255,7 +2240,7 @@ struct geometry_array_visitor
         // therefore no known tests reach this point
         // LCOV_EXCL_START
         Nan::EscapableHandleScope scope;
-        return scope.Escape(Nan::New<v8::Array>());   
+        return scope.Escape(Nan::New<v8::Array>());
         // LCOV_EXCL_STOP
     }
 
@@ -2354,23 +2339,15 @@ struct geometry_array_visitor
     }
 
     template <typename T>
-    v8::Local<v8::Array> operator() (mapnik::geometry::polygon<T> const & geom)
+    v8::Local<v8::Array> operator() (mapnik::geometry::polygon<T> const & poly)
     {
         Nan::EscapableHandleScope scope;
-        if (geom.exterior_ring.empty())
-        {
-            // Removed as it should be a bug if a vector tile has reached this point
-            // therefore no known tests reach this point
-            // LCOV_EXCL_START
-            return scope.Escape(Nan::New<v8::Array>());
-            // LCOV_EXCL_STOP
-        }
-        v8::Local<v8::Array> arr = Nan::New<v8::Array>(1 + geom.interior_rings.size());
-        std::uint32_t c = 0;
-        arr->Set(c++, (*this)(geom.exterior_ring));
-        for (auto const & pt : geom.interior_rings)
+        v8::Local<v8::Array> arr = Nan::New<v8::Array>(poly.size());
+        std::uint32_t index = 0;
+
+        for (auto const & ring : poly)
         {
-            arr->Set(c++, (*this)(pt));
+            arr->Set(index++, (*this)(ring));
         }
         return scope.Escape(arr);
     }
@@ -2424,7 +2401,7 @@ struct geometry_array_visitor
         {
             arr->Set(c++, (*this)(pt));
         }
-        return scope.Escape(arr);   
+        return scope.Escape(arr);
         // LCOV_EXCL_STOP
     }
 };
@@ -2445,7 +2422,7 @@ struct json_value_visitor
                        std::string const& name)
         : att_obj_(att_obj),
           name_(name) {}
-    
+
     void operator() (std::string const& val)
     {
         att_obj_->Set(Nan::New(name_).ToLocalChecked(), Nan::New(val).ToLocalChecked());
@@ -2495,10 +2472,10 @@ struct json_value_visitor
  * var buffer = fs.readFileSync('./path/to/data.mvt');
  * vt.setData(buffer);
  * var json = vectorTile.toJSON();
- * console.log(json); 
- * // { 
+ * console.log(json);
+ * // {
  * //   name: 'layer-name',
- * //   extent: 4096, 
+ * //   extent: 4096,
  * //   version: 2,
  * //   features: [ ... ] // array of objects
  * // }
@@ -2557,7 +2534,7 @@ NAN_METHOD(VectorTile::toJSON)
                         break;
                     case mapnik::vector_tile_impl::Layer_Encoding::VALUES:
                         val_msg = layer_msg.get_message();
-                        while (val_msg.next()) 
+                        while (val_msg.next())
                         {
                             switch(val_msg.tag())
                             {
@@ -2623,7 +2600,7 @@ NAN_METHOD(VectorTile::toJSON)
                 {
                     switch (feature_msg.tag())
                     {
-                        case mapnik::vector_tile_impl::Feature_Encoding::ID: 
+                        case mapnik::vector_tile_impl::Feature_Encoding::ID:
                             feature_obj->Set(Nan::New("id").ToLocalChecked(),Nan::New<v8::Number>(feature_msg.get_uint64()));
                             break;
                         case mapnik::vector_tile_impl::Feature_Encoding::TAGS:
@@ -2651,7 +2628,7 @@ NAN_METHOD(VectorTile::toJSON)
                             feature_msg.skip();
                             break;
                             // LCOV_EXCL_STOP
-                    }   
+                    }
                 }
                 v8::Local<v8::Object> att_obj = Nan::New<v8::Object>();
                 if (has_tags)
@@ -2710,7 +2687,7 @@ NAN_METHOD(VectorTile::toJSON)
         info.GetReturnValue().Set(arr);
         return;
     }
-    catch (std::exception const& ex) 
+    catch (std::exception const& ex)
     {
         // LCOV_EXCL_START
         Nan::ThrowError(ex.what());
@@ -2779,10 +2756,10 @@ bool layer_to_geojson(protozero::pbf_reader const& layer,
  * @memberof VectorTile
  * @instance
  * @name toGeoJSONSync
- * @param {string | number} [layer=__all__] Can be a zero-index integer representing 
- * a layer or the string keywords `__array__` or `__all__` to get all layers in the form 
- * of an array of GeoJSON `FeatureCollection`s or in the form of a single GeoJSON 
- * `FeatureCollection` with all layers smooshed inside 
+ * @param {string | number} [layer=__all__] Can be a zero-index integer representing
+ * a layer or the string keywords `__array__` or `__all__` to get all layers in the form
+ * of an array of GeoJSON `FeatureCollection`s or in the form of a single GeoJSON
+ * `FeatureCollection` with all layers smooshed inside
  * @returns {string} stringified GeoJSON of all the features in this tile.
  * @example
  * var geojson = vectorTile.toGeoJSONSync();
@@ -2806,7 +2783,7 @@ void write_geojson_array(std::string & result,
         {
             first = false;
         }
-        else 
+        else
         {
             result += ",";
         }
@@ -2856,7 +2833,7 @@ void write_geojson_all(std::string & result,
             {
                 first = false;
             }
-            else 
+            else
             {
                 result += ",";
             }
@@ -2877,8 +2854,8 @@ bool write_geojson_layer_index(std::string & result,
         std::string layer_name = v->get_tile()->get_layers()[layer_idx];
         result += "{\"type\":\"FeatureCollection\",";
         result += "\"name\":\"" + layer_name + "\",\"features\":[";
-        layer_to_geojson(layer_msg, 
-                         result, 
+        layer_to_geojson(layer_msg,
+                         result,
                          v->get_tile()->x(),
                          v->get_tile()->y(),
                          v->get_tile()->z());
@@ -2899,8 +2876,8 @@ bool write_geojson_layer_name(std::string & result,
     {
         result += "{\"type\":\"FeatureCollection\",";
         result += "\"name\":\"" + name + "\",\"features\":[";
-        layer_to_geojson(layer_msg, 
-                         result, 
+        layer_to_geojson(layer_msg,
+                         result,
                          v->get_tile()->x(),
                          v->get_tile()->y(),
                          v->get_tile()->z());
@@ -2913,7 +2890,7 @@ bool write_geojson_layer_name(std::string & result,
 v8::Local<v8::Value> VectorTile::_toGeoJSONSync(Nan::NAN_METHOD_ARGS_TYPE info)
 {
     Nan::EscapableHandleScope scope;
-    if (info.Length() < 1) 
+    if (info.Length() < 1)
     {
         Nan::ThrowError("first argument must be either a layer name (string) or layer index (integer)");
         return scope.Escape(Nan::Undefined());
@@ -3008,11 +2985,11 @@ struct to_geojson_baton
  * @memberof VectorTile
  * @instance
  * @name toGeoJSON
- * @param {string | number} [layer=__all__] Can be a zero-index integer representing 
- * a layer or the string keywords `__array__` or `__all__` to get all layers in the form 
- * of an array of GeoJSON `FeatureCollection`s or in the form of a single GeoJSON 
- * `FeatureCollection` with all layers smooshed inside  
- * @param {Function} callback - `function(err, geojson)`: a stringified 
+ * @param {string | number} [layer=__all__] Can be a zero-index integer representing
+ * a layer or the string keywords `__array__` or `__all__` to get all layers in the form
+ * of an array of GeoJSON `FeatureCollection`s or in the form of a single GeoJSON
+ * `FeatureCollection` with all layers smooshed inside
+ * @param {Function} callback - `function(err, geojson)`: a stringified
  * GeoJSON of all the features in this tile
  * @example
  * vectorTile.toGeoJSON(function(err, geojson) {
@@ -3158,22 +3135,22 @@ void VectorTile::after_to_geojson(uv_work_t* req)
  * @param {string} geojson as a string
  * @param {string} name of the layer to be added
  * @param {Object} [options]
- * @param {number} [options.area_threshold=0.1] used to discard small polygons. 
- * If a value is greater than `0` it will trigger polygons with an area smaller 
+ * @param {number} [options.area_threshold=0.1] used to discard small polygons.
+ * If a value is greater than `0` it will trigger polygons with an area smaller
  * than the value to be discarded. Measured in grid integers, not spherical mercator
  * coordinates.
- * @param {number} [options.simplify_distance=0.0] Simplification works to generalize 
- * geometries before encoding into vector tiles.simplification distance The 
+ * @param {number} [options.simplify_distance=0.0] Simplification works to generalize
+ * geometries before encoding into vector tiles.simplification distance The
  * `simplify_distance` value works in integer space over a 4096 pixel grid and uses
  * the [Douglas-Peucker algorithm](https://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm).
  * @param {boolean} [options.strictly_simple=true] ensure all geometry is valid according to
  * OGC Simple definition
  * @param {boolean} [options.multi_polygon_union=false] union all multipolygons
- * @param {Object<mapnik.polygonFillType>} [options.fill_type=mapnik.polygonFillType.positive] 
- * the fill type used in determining what are holes and what are outer rings. See the 
+ * @param {Object<mapnik.polygonFillType>} [options.fill_type=mapnik.polygonFillType.positive]
+ * the fill type used in determining what are holes and what are outer rings. See the
  * [Clipper documentation](http://www.angusj.com/delphi/clipper/documentation/Docs/Units/ClipperLib/Types/PolyFillType.htm)
  * to learn more about fill types.
- * @param {boolean} [options.process_all_rings=false] if `true`, don't assume winding order and ring order of 
+ * @param {boolean} [options.process_all_rings=false] if `true`, don't assume winding order and ring order of
  * polygons are correct according to the [`2.0` Mapbox Vector Tile specification](https://github.com/mapbox/vector-tile-spec)
  * @example
  * var geojson = { ... };
@@ -3214,7 +3191,7 @@ NAN_METHOD(VectorTile::addGeoJSON)
         }
 
         options = info[2]->ToObject();
-        if (options->Has(Nan::New("area_threshold").ToLocalChecked())) 
+        if (options->Has(Nan::New("area_threshold").ToLocalChecked()))
         {
             v8::Local<v8::Value> param_val = options->Get(Nan::New("area_threshold").ToLocalChecked());
             if (!param_val->IsNumber())
@@ -3229,7 +3206,7 @@ NAN_METHOD(VectorTile::addGeoJSON)
                 return;
             }
         }
-        if (options->Has(Nan::New("strictly_simple").ToLocalChecked())) 
+        if (options->Has(Nan::New("strictly_simple").ToLocalChecked()))
         {
             v8::Local<v8::Value> param_val = options->Get(Nan::New("strictly_simple").ToLocalChecked());
             if (!param_val->IsBoolean())
@@ -3249,7 +3226,7 @@ NAN_METHOD(VectorTile::addGeoJSON)
             }
             multi_polygon_union = mpu->BooleanValue();
         }
-        if (options->Has(Nan::New("fill_type").ToLocalChecked())) 
+        if (options->Has(Nan::New("fill_type").ToLocalChecked()))
         {
             v8::Local<v8::Value> ft = options->Get(Nan::New("fill_type").ToLocalChecked());
             if (!ft->IsNumber())
@@ -3264,7 +3241,7 @@ NAN_METHOD(VectorTile::addGeoJSON)
                 return;
             }
         }
-        if (options->Has(Nan::New("simplify_distance").ToLocalChecked())) 
+        if (options->Has(Nan::New("simplify_distance").ToLocalChecked()))
         {
             v8::Local<v8::Value> param_val = options->Get(Nan::New("simplify_distance").ToLocalChecked());
             if (!param_val->IsNumber())
@@ -3279,7 +3256,7 @@ NAN_METHOD(VectorTile::addGeoJSON)
                 return;
             }
         }
-        if (options->Has(Nan::New("process_all_rings").ToLocalChecked())) 
+        if (options->Has(Nan::New("process_all_rings").ToLocalChecked()))
         {
             v8::Local<v8::Value> param_val = options->Get(Nan::New("process_all_rings").ToLocalChecked());
             if (!param_val->IsBoolean())
@@ -3301,7 +3278,7 @@ NAN_METHOD(VectorTile::addGeoJSON)
         mapnik::layer lyr(geojson_name,"+init=epsg:4326");
         lyr.set_datasource(mapnik::datasource_cache::instance().create(p));
         map.add_layer(lyr);
-        
+
         mapnik::vector_tile_impl::processor ren(map);
         ren.set_area_threshold(area_threshold);
         ren.set_strictly_simple(strictly_simple);
@@ -3328,7 +3305,7 @@ NAN_METHOD(VectorTile::addGeoJSON)
  * @param {mapnik.Image} image
  * @param {string} name of the layer to be added
  * @param {Object} options
- * @param {string} [options.image_scaling=bilinear] can be any 
+ * @param {string} [options.image_scaling=bilinear] can be any
  * of the <mapnik.imageScaling> methods
  * @param {string} [options.image_format=webp] or `jpeg`, `png`, `tiff`
  * @example
@@ -3362,8 +3339,8 @@ v8::Local<v8::Value> VectorTile::_addImageSync(Nan::NAN_METHOD_ARGS_TYPE info)
     }
     std::string layer_name = TOSTR(info[1]);
     v8::Local<v8::Object> obj = info[0]->ToObject();
-    if (obj->IsNull() || 
-        obj->IsUndefined() || 
+    if (obj->IsNull() ||
+        obj->IsUndefined() ||
         !Nan::New(Image::constructor)->HasInstance(obj))
     {
         Nan::ThrowError("first argument must be an Image object");
@@ -3378,28 +3355,28 @@ v8::Local<v8::Value> VectorTile::_addImageSync(Nan::NAN_METHOD_ARGS_TYPE info)
 
     std::string image_format = "webp";
     mapnik::scaling_method_e scaling_method = mapnik::SCALING_BILINEAR;
-    
-    if (info.Length() > 2) 
+
+    if (info.Length() > 2)
     {
         // options object
-        if (!info[2]->IsObject()) 
+        if (!info[2]->IsObject())
         {
             Nan::ThrowError("optional third argument must be an options object");
             return scope.Escape(Nan::Undefined());
         }
 
         v8::Local<v8::Object> options = info[2]->ToObject();
-        if (options->Has(Nan::New("image_scaling").ToLocalChecked())) 
+        if (options->Has(Nan::New("image_scaling").ToLocalChecked()))
         {
             v8::Local<v8::Value> param_val = options->Get(Nan::New("image_scaling").ToLocalChecked());
-            if (!param_val->IsString()) 
+            if (!param_val->IsString())
             {
                 Nan::ThrowTypeError("option 'image_scaling' must be a string");
                 return scope.Escape(Nan::Undefined());
             }
             std::string image_scaling = TOSTR(param_val);
             boost::optional<mapnik::scaling_method_e> method = mapnik::scaling_method_from_string(image_scaling);
-            if (!method) 
+            if (!method)
             {
                 Nan::ThrowTypeError("option 'image_scaling' must be a string and a valid scaling method (e.g 'bilinear')");
                 return scope.Escape(Nan::Undefined());
@@ -3407,10 +3384,10 @@ v8::Local<v8::Value> VectorTile::_addImageSync(Nan::NAN_METHOD_ARGS_TYPE info)
             scaling_method = *method;
         }
 
-        if (options->Has(Nan::New("image_format").ToLocalChecked())) 
+        if (options->Has(Nan::New("image_format").ToLocalChecked()))
         {
             v8::Local<v8::Value> param_val = options->Get(Nan::New("image_format").ToLocalChecked());
-            if (!param_val->IsString()) 
+            if (!param_val->IsString())
             {
                 Nan::ThrowTypeError("option 'image_format' must be a string");
                 return scope.Escape(Nan::Undefined());
@@ -3434,7 +3411,7 @@ v8::Local<v8::Value> VectorTile::_addImageSync(Nan::NAN_METHOD_ARGS_TYPE info)
         mapnik::layer lyr(layer_name,"+init=epsg:3857");
         lyr.set_datasource(ds);
         map.add_layer(lyr);
-        
+
         mapnik::vector_tile_impl::processor ren(map);
         ren.set_scaling_method(scaling_method);
         ren.set_image_format(image_format);
@@ -3471,7 +3448,7 @@ typedef struct
  * @param {mapnik.Image} image
  * @param {string} name of the layer to be added
  * @param {Object} [options]
- * @param {string} [options.image_scaling=bilinear] can be any 
+ * @param {string} [options.image_scaling=bilinear] can be any
  * of the <mapnik.imageScaling> methods
  * @param {string} [options.image_format=webp] other options include `jpeg`, `png`, `tiff`
  * @example
@@ -3484,7 +3461,7 @@ typedef struct
  *   image_scaling: 'gaussian'
  * }, function(err) {
  *   if (err) throw err;
- *   // your custom code using `vt`  
+ *   // your custom code using `vt`
  * });
  */
 NAN_METHOD(VectorTile::addImage)
@@ -3514,8 +3491,8 @@ NAN_METHOD(VectorTile::addImage)
     }
     std::string layer_name = TOSTR(info[1]);
     v8::Local<v8::Object> obj = info[0]->ToObject();
-    if (obj->IsNull() || 
-        obj->IsUndefined() || 
+    if (obj->IsNull() ||
+        obj->IsUndefined() ||
         !Nan::New(Image::constructor)->HasInstance(obj))
     {
         Nan::ThrowError("first argument must be an Image object");
@@ -3530,28 +3507,28 @@ NAN_METHOD(VectorTile::addImage)
 
     std::string image_format = "webp";
     mapnik::scaling_method_e scaling_method = mapnik::SCALING_BILINEAR;
-    
-    if (info.Length() > 3) 
+
+    if (info.Length() > 3)
     {
         // options object
-        if (!info[2]->IsObject()) 
+        if (!info[2]->IsObject())
         {
             Nan::ThrowError("optional third argument must be an options object");
             return;
         }
 
         v8::Local<v8::Object> options = info[2]->ToObject();
-        if (options->Has(Nan::New("image_scaling").ToLocalChecked())) 
+        if (options->Has(Nan::New("image_scaling").ToLocalChecked()))
         {
             v8::Local<v8::Value> param_val = options->Get(Nan::New("image_scaling").ToLocalChecked());
-            if (!param_val->IsString()) 
+            if (!param_val->IsString())
             {
                 Nan::ThrowTypeError("option 'image_scaling' must be a string");
                 return;
             }
             std::string image_scaling = TOSTR(param_val);
             boost::optional<mapnik::scaling_method_e> method = mapnik::scaling_method_from_string(image_scaling);
-            if (!method) 
+            if (!method)
             {
                 Nan::ThrowTypeError("option 'image_scaling' must be a string and a valid scaling method (e.g 'bilinear')");
                 return;
@@ -3559,10 +3536,10 @@ NAN_METHOD(VectorTile::addImage)
             scaling_method = *method;
         }
 
-        if (options->Has(Nan::New("image_format").ToLocalChecked())) 
+        if (options->Has(Nan::New("image_format").ToLocalChecked()))
         {
             v8::Local<v8::Value> param_val = options->Get(Nan::New("image_format").ToLocalChecked());
-            if (!param_val->IsString()) 
+            if (!param_val->IsString())
             {
                 Nan::ThrowTypeError("option 'image_format' must be a string");
                 return;
@@ -3605,7 +3582,7 @@ void VectorTile::EIO_AddImage(uv_work_t* req)
         mapnik::layer lyr(closure->layer_name,"+init=epsg:3857");
         lyr.set_datasource(ds);
         map.add_layer(lyr);
-        
+
         mapnik::vector_tile_impl::processor ren(map);
         ren.set_scaling_method(closure->scaling_method);
         ren.set_image_format(closure->image_format);
@@ -3688,7 +3665,7 @@ v8::Local<v8::Value> VectorTile::_addImageBufferSync(Nan::NAN_METHOD_ARGS_TYPE i
     }
     try
     {
-        add_image_buffer_as_tile_layer(*d->get_tile(), layer_name, node::Buffer::Data(obj), buffer_size); 
+        add_image_buffer_as_tile_layer(*d->get_tile(), layer_name, node::Buffer::Data(obj), buffer_size);
     }
     catch (std::exception const& ex)
     {
@@ -3791,7 +3768,7 @@ void VectorTile::EIO_AddImageBuffer(uv_work_t* req)
 
     try
     {
-        add_image_buffer_as_tile_layer(*closure->d->get_tile(), closure->layer_name, closure->data, closure->dataLength); 
+        add_image_buffer_as_tile_layer(*closure->d->get_tile(), closure->layer_name, closure->data, closure->dataLength);
     }
     catch (std::exception const& ex)
     {
@@ -4258,7 +4235,7 @@ NAN_METHOD(VectorTile::setData)
 void VectorTile::EIO_SetData(uv_work_t* req)
 {
     vector_tile_setdata_baton_t *closure = static_cast<vector_tile_setdata_baton_t *>(req->data);
-    
+
     if (closure->dataLength <= 0)
     {
         closure->error = true;
@@ -4768,19 +4745,19 @@ struct baton_guard
  * @param {number} [options.buffer_size] the size of the tile's buffer
  * @param {number} [options.scale] floating point scale factor size to used
  * for rendering
- * @param {number} [options.scale_denominator] An floating point `scale_denominator` 
- * to be used by Mapnik when matching zoom filters. If provided this overrides the 
- * auto-calculated scale_denominator that is based on the map dimensions and bbox. 
+ * @param {number} [options.scale_denominator] An floating point `scale_denominator`
+ * to be used by Mapnik when matching zoom filters. If provided this overrides the
+ * auto-calculated scale_denominator that is based on the map dimensions and bbox.
  * Do not set this option unless you know what it means.
- * @param {Object} [options.variables] Mapnik 3.x ONLY: A javascript object 
- * containing key value pairs that should be passed into Mapnik as variables 
- * for rendering and for datasource queries. For example if you passed 
+ * @param {Object} [options.variables] Mapnik 3.x ONLY: A javascript object
+ * containing key value pairs that should be passed into Mapnik as variables
+ * for rendering and for datasource queries. For example if you passed
  * `vtile.render(map,image,{ variables : {zoom:1} },cb)` then the `@zoom`
  * variable would be usable in Mapnik symbolizers like `line-width:"@zoom"`
- * and as a token in Mapnik postgis sql sub-selects like 
+ * and as a token in Mapnik postgis sql sub-selects like
  * `(select * from table where some_field > @zoom)` as tmp
  * @param {string} [options.renderer] must be `cairo` or `svg`
- * @param {string|number} [options.layer] option required for grid rendering 
+ * @param {string|number} [options.layer] option required for grid rendering
  * and must be either a layer name (string) or layer index (integer)
  * @param {Array<string>} [options.fields] must be an array of strings
  * @param {Function} callback
@@ -4789,7 +4766,7 @@ struct baton_guard
  * var tileSize = vt.tileSize;
  * var map = new mapnik.Map(tileSize, tileSize);
  * vt.render(map, new mapnik.Image(256,256), function(err, image) {
- *   if (err) throw err;   
+ *   if (err) throw err;
  *   // save the rendered image to an existing image file somewhere
  *   // see mapnik.Image for available methods
  *   image.save('./path/to/image/file.png', 'png32');
@@ -5002,7 +4979,7 @@ NAN_METHOD(VectorTile::render)
             Nan::ThrowTypeError("'layer' option required for grid rendering and must be either a layer name(string) or layer index (integer)");
             return;
         }
-        else 
+        else
         {
             std::vector<mapnik::layer> const& layers = m->get()->layers();
             v8::Local<v8::Value> layer_id = options->Get(Nan::New("layer").ToLocalChecked());
@@ -5149,8 +5126,8 @@ void VectorTile::EIO_RenderTile(uv_work_t* req)
         if (closure->zxy_override)
         {
             merc.xyz(closure->x,closure->y,closure->z,minx,miny,maxx,maxy);
-        } 
-        else 
+        }
+        else
         {
             merc.xyz(closure->d->get_tile()->x(),
                      closure->d->get_tile()->y(),
@@ -5377,7 +5354,7 @@ typedef struct
  * @example
  * vt.clear(function(err) {
  *   if (err) throw err;
- *   console.log(vt.getData().length); // 0   
+ *   console.log(vt.getData().length); // 0
  * });
  */
 NAN_METHOD(VectorTile::clear)
@@ -5524,10 +5501,10 @@ struct visitor_geom_valid
           feature(feature_),
           layer_name(layer_name_),
           split_multi_features(split_multi_features_) {}
-    
+
     void operator() (mapnik::geometry::geometry_empty const&) {}
-          
-    template <typename T> 
+
+    template <typename T>
     void operator() (mapnik::geometry::point<T> const& geom)
     {
         std::string message;
@@ -5556,8 +5533,8 @@ struct visitor_geom_valid
             }
         }
     }
-    
-    template <typename T> 
+
+    template <typename T>
     void operator() (mapnik::geometry::multi_point<T> const& geom)
     {
         std::string message;
@@ -5586,8 +5563,8 @@ struct visitor_geom_valid
             }
         }
     }
-    
-    template <typename T> 
+
+    template <typename T>
     void operator() (mapnik::geometry::line_string<T> const& geom)
     {
         std::string message;
@@ -5616,8 +5593,8 @@ struct visitor_geom_valid
             }
         }
     }
-    
-    template <typename T> 
+
+    template <typename T>
     void operator() (mapnik::geometry::multi_line_string<T> const& geom)
     {
         if (split_multi_features)
@@ -5674,8 +5651,8 @@ struct visitor_geom_valid
             }
         }
     }
-    
-    template <typename T> 
+
+    template <typename T>
     void operator() (mapnik::geometry::polygon<T> const& geom)
     {
         std::string message;
@@ -5704,8 +5681,8 @@ struct visitor_geom_valid
             }
         }
     }
-    
-    template <typename T> 
+
+    template <typename T>
     void operator() (mapnik::geometry::multi_polygon<T> const& geom)
     {
         if (split_multi_features)
@@ -5762,8 +5739,8 @@ struct visitor_geom_valid
             }
         }
     }
-    
-    template <typename T> 
+
+    template <typename T>
     void operator() (mapnik::geometry::geometry_collection<T> const& geom)
     {
         // This should never be able to be reached.
@@ -5810,13 +5787,13 @@ void layer_not_valid(protozero::pbf_reader & layer_msg,
                     mapnik::proj_transform prj_trans(merc,wgs84);
                     unsigned int n_err = 0;
                     mapnik::util::apply_visitor(
-                            visitor_geom_valid(errors, feature, ds.get_name(), split_multi_features), 
+                            visitor_geom_valid(errors, feature, ds.get_name(), split_multi_features),
                             mapnik::geometry::reproject_copy(feature->get_geometry(), prj_trans, n_err));
                 }
                 else
                 {
                     mapnik::util::apply_visitor(
-                            visitor_geom_valid(errors, feature, ds.get_name(), split_multi_features), 
+                            visitor_geom_valid(errors, feature, ds.get_name(), split_multi_features),
                             feature->get_geometry());
                 }
             }
@@ -5856,7 +5833,7 @@ void layer_not_valid(protozero::pbf_reader & layer_msg,
             {
                 switch (feature_msg.tag())
                 {
-                    case mapnik::vector_tile_impl::Feature_Encoding::ID: 
+                    case mapnik::vector_tile_impl::Feature_Encoding::ID:
                         feature_id = feature_msg.get_uint64();
                         break;
                     case mapnik::vector_tile_impl::Feature_Encoding::TYPE:
@@ -5870,7 +5847,7 @@ void layer_not_valid(protozero::pbf_reader & layer_msg,
                     default:
                         feature_msg.skip();
                         break;
-                }   
+                }
             }
             if (has_geom && has_geom_type)
             {
@@ -5880,7 +5857,7 @@ void layer_not_valid(protozero::pbf_reader & layer_msg,
                 mapnik::vector_tile_impl::GeometryPBF geoms(geom_itr);
                 feature->set_geometry(mapnik::vector_tile_impl::decode_geometry<double>(geoms, geom_type_enum, version, 0.0, 0.0, 1.0, 1.0));
                 mapnik::util::apply_visitor(
-                        visitor_geom_valid(errors, feature, layer_name, split_multi_features), 
+                        visitor_geom_valid(errors, feature, layer_name, split_multi_features),
                         feature->get_geometry());
             }
         }
@@ -6209,7 +6186,7 @@ void VectorTile::EIO_AfterReportGeometrySimplicity(uv_work_t* req)
  * @example
  * vectorTile.reportGeometryValidity(function(err, valid) {
  *   console.log(valid); // array of invalid geometries and their layer info
- *   console.log(valid.length); // number    
+ *   console.log(valid.length); // number
  * });
  */
 NAN_METHOD(VectorTile::reportGeometryValidity)
@@ -6361,8 +6338,8 @@ NAN_SETTER(VectorTile::set_tile_x)
     if (!value->IsNumber())
     {
         Nan::ThrowError("Must provide a number");
-    } 
-    else 
+    }
+    else
     {
         int val = value->IntegerValue();
         if (val < 0)
@@ -6380,8 +6357,8 @@ NAN_SETTER(VectorTile::set_tile_y)
     if (!value->IsNumber())
     {
         Nan::ThrowError("Must provide a number");
-    } 
-    else 
+    }
+    else
     {
         int val = value->IntegerValue();
         if (val < 0)
@@ -6399,8 +6376,8 @@ NAN_SETTER(VectorTile::set_tile_z)
     if (!value->IsNumber())
     {
         Nan::ThrowError("Must provide a number");
-    } 
-    else 
+    }
+    else
     {
         int val = value->IntegerValue();
         if (val < 0)
@@ -6418,8 +6395,8 @@ NAN_SETTER(VectorTile::set_tile_size)
     if (!value->IsNumber())
     {
         Nan::ThrowError("Must provide a number");
-    } 
-    else 
+    }
+    else
     {
         int val = value->IntegerValue();
         if (val <= 0)
@@ -6437,8 +6414,8 @@ NAN_SETTER(VectorTile::set_buffer_size)
     if (!value->IsNumber())
     {
         Nan::ThrowError("Must provide a number");
-    } 
-    else 
+    }
+    else
     {
         int val = value->IntegerValue();
         if (static_cast<int>(d->tile_size()) + (2 * val) <= 0)
@@ -6454,7 +6431,7 @@ typedef struct {
     uv_work_t request;
     const char *data;
     size_t dataLength;
-    v8::Local<v8::Object> obj; 
+    v8::Local<v8::Object> obj;
     bool error;
     std::string error_str;
     Nan::Persistent<v8::Object> buffer;
@@ -6475,7 +6452,7 @@ typedef struct {
  * var buffer = fs.readFileSync('./path/to/tile.mvt');
  * var info = mapnik.VectorTile.info(buffer);
  * console.log(info);
- * // { layers: 
+ * // { layers:
  * //   [ { name: 'world',
  * //      features: 1,
  * //      point_features: 0,
@@ -6554,17 +6531,17 @@ NAN_METHOD(VectorTile::info)
                             layer_errors.insert(mapnik::vector_tile_impl::LAYER_HAS_UNSUPPORTED_VERSION);
                         }
                         protozero::pbf_reader layer_msg(layer_view);
-                        mapnik::vector_tile_impl::layer_is_valid(layer_msg, 
-                                                                 layer_errors, 
+                        mapnik::vector_tile_impl::layer_is_valid(layer_msg,
+                                                                 layer_errors,
                                                                  point_feature_count,
                                                                  line_feature_count,
                                                                  polygon_feature_count,
                                                                  unknown_feature_count,
                                                                  raster_feature_count);
-                        std::uint64_t feature_count = point_feature_count + 
-                                                      line_feature_count + 
-                                                      polygon_feature_count + 
-                                                      unknown_feature_count + 
+                        std::uint64_t feature_count = point_feature_count +
+                                                      line_feature_count +
+                                                      polygon_feature_count +
+                                                      unknown_feature_count +
                                                       raster_feature_count;
                         if (!layer_name.empty())
                         {
diff --git a/src/object_to_container.hpp b/src/object_to_container.hpp
index e7c11c5850..1cafd97ce4 100644
--- a/src/object_to_container.hpp
+++ b/src/object_to_container.hpp
@@ -4,7 +4,7 @@
 #include <mapnik/version.hpp>
 #include <mapnik/attribute.hpp>
 #include <mapnik/unicode.hpp>
-#include <mapnik/value_types.hpp>
+#include <mapnik/value/types.hpp>
 
 static inline void object_to_container(mapnik::attributes & cont, v8::Local<v8::Object> const& vars)
 {
diff --git a/src/utils.hpp b/src/utils.hpp
index 643679e780..3dfe52f60e 100644
--- a/src/utils.hpp
+++ b/src/utils.hpp
@@ -13,7 +13,7 @@
 
 // core types
 #include <mapnik/unicode.hpp>
-#include <mapnik/value_types.hpp>
+#include <mapnik/value/types.hpp>
 #include <mapnik/value.hpp>
 #include <mapnik/version.hpp>
 #include <mapnik/params.hpp>

From 3295621948b67f9afbb69e3ba1941044e9938eaf Mon Sep 17 00:00:00 2001
From: Dane Springmeyer <dane@mapbox.com>
Date: Sun, 10 Sep 2017 08:48:03 -0700
Subject: [PATCH 10/22] avoid copy of ring

---
 src/mapnik_vector_tile.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mapnik_vector_tile.cpp b/src/mapnik_vector_tile.cpp
index 873b22f774..49b1e791aa 100644
--- a/src/mapnik_vector_tile.cpp
+++ b/src/mapnik_vector_tile.cpp
@@ -157,7 +157,7 @@ struct p2p_distance
         bool inside = false;
         for (std::size_t ring_index = 0; ring_index < num_rings; ++ring_index)
         {
-            auto ring = poly[ring_index];
+            auto const& ring = poly[ring_index];
             auto num_points = ring.size();
             if (num_points < 4)
             {

From 272d132aa745b168627798e0c60f77531fbe8fd3 Mon Sep 17 00:00:00 2001
From: Dane Springmeyer <dane@mapbox.com>
Date: Sun, 10 Sep 2017 08:48:51 -0700
Subject: [PATCH 11/22] use mapnik-vt from mapbox/mapnik-vector-tile#254

---
 package.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package.json b/package.json
index 9c7f2f4481..7634aea184 100644
--- a/package.json
+++ b/package.json
@@ -36,7 +36,7 @@
   ],
   "license": "BSD-3-Clause",
   "dependencies": {
-    "mapnik-vector-tile": "1.4.0",
+    "mapnik-vector-tile": "https://github.com/mapbox/mapnik-vector-tile/tarball/make-strict-an-option-master",
     "protozero": "1.5.1",
     "nan": "~2.5.0",
     "node-pre-gyp": "~0.6.30"

From 7d4799763e766bd25346789b649c4cd8bbe7e3da Mon Sep 17 00:00:00 2001
From: Dane Springmeyer <dane@mapbox.com>
Date: Sun, 10 Sep 2017 08:54:48 -0700
Subject: [PATCH 12/22] update test fixtures for master

---
 test/data/vector_tile/tile0-c.expected.png   | Bin 13780 -> 18811 bytes
 test/data/vector_tile/tile0.expected-svg.svg |   2 --
 2 files changed, 2 deletions(-)

diff --git a/test/data/vector_tile/tile0-c.expected.png b/test/data/vector_tile/tile0-c.expected.png
index 558d5961a30aeba08749dbdf9ddd9a1039c8f942..1a95b7201552e542ac092b0477cb57332a5615a2 100644
GIT binary patch
diff --git a/test/data/vector_tile/tile0.expected-svg.svg b/test/data/vector_tile/tile0.expected-svg.svg
index e734c8571f..365391da72 100644
--- a/test/data/vector_tile/tile0.expected-svg.svg
+++ b/test/data/vector_tile/tile0.expected-svg.svg
@@ -2,7 +2,6 @@
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
 <svg width="256px" height="256px" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape">
 <rect x="0" y="0" width="256px" height="256px" fill="#4682b4"/>
-<g id="world" inkscape:groupmode="layer" inkscape:label="world">
 <path d="M84.0 115.1875 L84.0 115.3125 L84.125 115.25 L84.0 115.1875" stroke-dasharray="" fill="#ffffff" fill-opacity="1.0" stroke="none" stroke-opacity="1.0" stroke-width="0.0px" stroke-linecap="butt" stroke-linejoin="miter" stroke-dashoffset="0.0px"/>
 <path d="M132.5625 99.5625 L131.8125 99.9375 L131.375 99.75 L130.125 99.8125 L128.6875 100.125 L126.4375 101.3125 L126.75 101.625 L126.8125 102.875 L127.3125 103.5625 L127.1875 103.875 L126.0 103.875 L125.3125 104.1875 L125.4375 104.8125 L124.5 105.1875 L124.0625 105.6875 L122.9375 105.9375 L121.8125 106.6875 L121.8125 107.8125 L123.25 108.75 L124.5625 109.625 L128.8125 112.625 L128.8125 112.9375 L129.25 113.25 L130.3125 113.625 L130.375 114.25 L131.0 114.125 L132.125 113.875 L133.3125 112.8125 L136.5 110.8125 L136.25 110.1875 L135.3125 109.9375 L134.6875 108.75 L135.0 108.4375 L135.0625 107.375 L134.9375 106.0625 L134.625 105.5 L134.8125 105.4375 L134.4375 103.875 L133.9375 103.5 L133.3125 102.375 L133.875 101.6875 L133.8125 100.0625 L134.125 99.6875 L132.5625 99.5625" stroke-dasharray="" fill="#ffffff" fill-opacity="1.0" stroke="none" stroke-opacity="1.0" stroke-width="0.0px" stroke-linecap="butt" stroke-linejoin="miter" stroke-dashoffset="0.0px"/>
 <path d="M160.0625 97.125 L159.8125 97.1875 L159.875 97.25 L160.0 97.4375 L160.8125 98.0 L160.5625 97.3125 L160.0625 97.125 M160.4375 96.3125 L160.375 96.3125 L160.375 96.375 L160.4375 96.3125 M160.0 95.875 L160.0 95.9375 L160.0625 95.9375 L160.0 95.875 M161.125 95.125 L161.0625 95.125 L160.875 95.3125 L161.1875 95.6875 L161.0625 95.9375 L160.25 95.5625 L160.0 95.6875 L160.125 95.8125 L160.6875 96.6875 L160.4375 96.9375 L161.125 97.3125 L161.125 97.9375 L162.125 97.1875 L162.375 97.5 L162.125 98.0 L162.75 98.375 L163.1875 96.75 L163.8125 96.6875 L163.25 96.3125 L162.5625 95.1875 L161.9375 95.8125 L161.125 95.125" stroke-dasharray="" fill="#ffffff" fill-opacity="1.0" stroke="none" stroke-opacity="1.0" stroke-width="0.0px" stroke-linecap="butt" stroke-linejoin="miter" stroke-dashoffset="0.0px"/>
@@ -226,5 +225,4 @@
 <path d="M109.3125 179.4375 L109.1875 179.5 L109.3125 179.5625 L109.3125 179.4375 M108.4375 176.625 L108.375 176.625 L108.375 176.6875 L108.4375 176.625 M101.625 174.375 L101.625 174.4375 L101.6875 174.4375 L101.625 174.375 M101.3125 173.8125 L100.9375 173.875 L101.5 174.0 L101.375 174.125 L102.3125 174.875 L102.5625 174.75 L102.1875 174.125 L101.3125 173.8125" stroke-dasharray="" fill="#ffffff" fill-opacity="1.0" stroke="none" stroke-opacity="1.0" stroke-width="0.0px" stroke-linecap="butt" stroke-linejoin="miter" stroke-dashoffset="0.0px"/>
 <path d="M213.0625 110.6875 L213.0 110.75 L213.125 110.75 L213.0625 110.6875 M212.1875 110.0 L212.125 110.125 L212.1875 110.125 L212.1875 110.0 M214.5625 109.5 L214.0625 109.625 L213.4375 110.6875 L213.375 111.125 L213.8125 112.0 L214.625 110.0625 L214.75 109.625 L214.5625 109.5" stroke-dasharray="" fill="#ffffff" fill-opacity="1.0" stroke="none" stroke-opacity="1.0" stroke-width="0.0px" stroke-linecap="butt" stroke-linejoin="miter" stroke-dashoffset="0.0px"/>
 <path d="M221.6875 94.0 L221.75 94.125 L221.8125 94.0625 L221.6875 94.0 M232.0 93.5625 L231.875 93.5625 L231.9375 93.625 L232.0 93.5625 M232.4375 93.25 L232.25 93.25 L232.3125 93.375 L232.4375 93.25 M231.9375 92.5625 L231.4375 93.375 L232.25 92.625 L231.9375 92.5625 M233.1875 91.6875 L232.4375 92.6875 L233.8125 91.75 L233.1875 91.6875 M162.4375 91.3125 L162.375 91.3125 L162.4375 91.4375 L162.4375 91.3125 M235.0 90.875 L234.25 91.5 L234.6875 91.25 L235.0 90.875 M235.25 90.5625 L235.25 90.625 L235.3125 90.625 L235.25 90.5625 M236.25 89.875 L235.875 90.25 L236.125 90.1875 L236.25 89.875 M236.4375 89.625 L236.375 89.6875 L236.4375 89.75 L236.4375 89.625 M236.875 89.1875 L236.8125 89.3125 L236.875 89.3125 L236.875 89.1875 M237.6875 88.0 L237.5625 88.0 L237.5 88.1875 L237.6875 88.0 M238.125 87.25 L237.9375 87.5 L238.0 87.625 L238.125 87.25 M237.8125 87.0 L237.75 87.0 L237.8125 87.125 L237.8125 87.0 M239.0 86.0 L238.375 86.75 L238.75 86.625 L239.0 86.0 M239.25 85.875 L239.0625 86.0 L239.25 86.0625 L239.25 85.875 M238.6875 85.8125 L238.5625 85.8125 L238.6875 85.9375 L238.6875 85.8125 M230.1875 87.5625 L230.9375 88.3125 L229.875 85.125 L229.875 83.25 L229.5 81.6875 L229.25 81.9375 L229.5625 82.5625 L228.8125 82.9375 L228.75 84.1875 L229.1875 85.5625 L228.875 88.1875 L229.125 89.0 L228.875 90.5 L229.0625 91.1875 L229.5 90.3125 L229.9375 90.5 L230.0 91.0 L230.0625 90.25 L229.75 90.25 L229.375 89.0 L229.6875 87.75 L230.1875 87.5625 M230.1875 87.5625 L229.9375 87.5625 L229.875 87.5 L230.1875 87.5625 M226.0625 81.5625 L225.9375 81.75 L226.0 81.75 L226.0625 81.5625 M225.875 81.5 L225.8125 81.5625 L225.875 81.6875 L225.875 81.5 M225.5625 80.875 L225.1875 81.0625 L225.4375 81.0625 L225.5625 80.875 M225.8125 80.75 L225.5625 81.25 L225.9375 81.4375 L226.125 81.125 L226.25 80.9375 L225.8125 80.75 M142.9375 80.625 L142.875 80.625 L142.1875 81.0 L142.125 81.4375 L142.5 81.375 L142.0625 81.6875 L144.1875 81.75 L144.25 81.125 L143.25 80.6875 L143.125 80.6875 L143.0625 81.0625 L142.625 81.0625 L142.9375 80.625 M246.125 80.5625 L245.9375 80.625 L246.5 81.375 L246.125 80.5625 M245.0625 75.625 L244.4375 75.75 L244.1875 76.375 L245.0625 75.625 M233.9375 75.4375 L233.9375 75.5625 L234.0 75.5 L233.9375 75.4375 M148.3125 73.8125 L148.375 73.9375 L148.4375 73.875 L148.3125 73.8125 M153.5 67.625 L153.5625 67.75 L153.625 67.6875 L153.5 67.625 M156.4375 67.125 L156.75 67.375 L156.75 67.1875 L156.4375 67.125 M5.3125 66.875 L5.25 67.125 L5.5625 66.9375 L5.3125 66.875 M153.5 66.3125 L153.25 66.375 L153.4375 66.6875 L153.5 66.3125 M177.3125 63.625 L177.25 63.6875 L177.3125 63.75 L177.3125 63.625 M158.3125 63.5 L158.1875 63.5625 L158.375 63.6875 L158.3125 63.5 M177.375 63.5625 L177.6875 64.0625 L177.875 63.9375 L177.8125 63.6875 L177.375 63.5625 M166.4375 60.5625 L166.3125 60.625 L166.375 60.6875 L166.4375 60.5625 M164.375 60.3125 L164.125 60.5625 L164.5625 60.375 L164.375 60.3125 M169.1875 59.6875 L168.6875 59.875 L169.125 59.8125 L169.1875 59.6875 M175.875 59.6875 L175.75 59.6875 L175.9375 59.75 L175.875 59.6875 M166.875 59.3125 L166.8125 59.4375 L166.875 59.4375 L166.875 59.3125 M175.0625 59.125 L174.875 59.125 L175.3125 59.4375 L175.0625 59.125 M152.3125 58.5 L152.1875 58.5625 L152.4375 58.625 L152.3125 58.5 M175.625 58.4375 L175.75 58.625 L175.8125 58.5 L175.625 58.4375 M162.8125 58.3125 L162.375 58.75 L162.3125 59.5625 L162.8125 59.875 L163.75 59.0 L162.8125 58.3125 M242.8125 59.3125 L242.75 59.125 L242.6875 58.8125 L242.75 58.625 L242.6875 58.5 L242.75 58.375 L242.75 58.25 L242.5625 58.375 L242.5625 59.125 L242.8125 59.3125 M242.8125 59.3125 L242.8125 59.5625 L242.875 59.5 L242.875 59.375 L242.8125 59.3125 M175.875 58.125 L175.6875 58.375 L175.8125 58.4375 L175.875 58.125 M242.9375 58.125 L242.75 58.125 L242.8125 58.5 L242.9375 58.125 M247.3125 57.625 L248.0625 58.1875 L248.5 57.6875 L247.3125 57.625 M186.9375 56.75 L186.875 56.875 L187.0625 57.0625 L187.125 56.875 L187.0625 56.8125 L186.9375 56.75 M170.0 56.3125 L169.5625 56.75 L170.375 57.875 L171.0625 57.6875 L170.3125 56.6875 L170.0 56.3125 M187.4375 56.1875 L187.3125 56.375 L187.3125 56.5 L187.375 56.5 L187.4375 56.375 L187.4375 56.1875 M168.4375 56.0 L168.5 56.1875 L168.6875 56.25 L168.4375 56.0 M243.5 55.875 L243.375 55.875 L243.5625 55.9375 L243.5 55.875 M187.1875 55.5625 L187.0625 56.4375 L187.3125 55.8125 L187.1875 55.5625 M242.9375 55.5625 L242.8125 55.5625 L243.0 55.6875 L242.9375 55.5625 M242.0625 55.3125 L242.1875 55.5625 L242.3125 55.5625 L242.0625 55.3125 M166.0625 54.75 L166.0 54.875 L166.125 54.9375 L166.0625 54.75 M255.375 54.6875 L255.0 55.0625 L255.125 55.625 L255.375 55.5 L255.375 54.6875 M165.75 54.375 L165.8125 54.5 L165.9375 54.5 L165.75 54.375 M165.5625 54.3125 L165.125 54.5 L165.8125 55.1875 L165.8125 54.625 L165.5625 54.3125 M225.4375 54.0 L225.875 54.25 L226.125 54.0625 L225.4375 54.0 M226.375 53.1875 L226.3125 53.25 L226.5 53.25 L226.375 53.1875 M219.125 51.5625 L218.0625 51.875 L218.6875 51.9375 L219.5625 52.75 L220.125 52.375 L219.125 51.5625 M183.1875 51.4375 L182.625 52.125 L183.3125 52.25 L183.75 51.75 L183.1875 51.4375 M179.875 51.3125 L179.8125 51.3125 L179.875 51.5 L179.875 51.3125 M219.25 51.0625 L218.5625 51.375 L220.0 51.25 L219.25 51.0625 M219.25 50.875 L219.9375 51.0625 L219.875 50.9375 L219.25 50.875 M181.25 50.3125 L180.6875 50.5 L181.0625 50.875 L181.25 50.3125 M184.3125 50.3125 L183.875 50.9375 L184.5625 51.1875 L184.3125 50.3125 M213.375 50.1875 L213.0625 50.25 L213.5 50.4375 L213.375 50.1875 M182.375 50.0625 L182.125 50.0625 L182.5625 50.1875 L182.375 50.0625 M178.6875 49.5625 L178.5625 49.875 L178.75 49.75 L178.6875 49.5625 M166.0 54.5 L166.0 54.5625 L166.5625 54.875 L166.0625 55.0 L166.1875 55.3125 L166.0 55.5625 L167.25 56.125 L169.0 55.75 L168.0 54.75 L167.25 53.0625 L167.5 52.4375 L167.1875 51.875 L167.8125 51.375 L167.4375 51.0625 L168.0 50.625 L167.5625 50.625 L168.25 50.25 L167.375 49.75 L167.0625 49.5 L165.8125 50.1875 L165.9375 50.8125 L165.25 51.25 L165.875 51.375 L165.5 51.4375 L165.75 51.5 L165.25 52.75 L164.6875 52.75 L164.5625 53.5 L164.8125 54.125 L165.9375 53.875 L166.0 54.5 M178.5 49.3125 L177.75 49.5625 L177.6875 50.5 L179.0 50.125 L178.5 49.875 L178.6875 49.5 L178.5 49.3125 M218.5 49.25 L218.0625 49.5 L218.125 50.375 L217.8125 50.8125 L217.9375 51.0625 L217.8125 51.75 L218.0 52.0 L218.0 51.6875 L219.8125 50.3125 L218.5 49.25 M182.3125 49.25 L182.125 49.25 L182.5625 49.5 L182.3125 49.25 M218.8125 49.25 L218.5625 49.25 L219.0625 49.375 L218.8125 49.25 M185.1875 49.1875 L184.9375 49.1875 L185.125 49.3125 L185.1875 49.1875 M182.125 49.1875 L181.75 49.1875 L181.5625 49.5 L182.125 49.1875 M216.625 48.75 L215.75 48.9375 L215.625 49.5625 L215.9375 50.125 L215.0625 50.625 L216.75 51.375 L217.6875 52.25 L217.875 52.0625 L217.75 51.6875 L217.875 51.0625 L217.8125 50.875 L218.125 50.375 L217.6875 49.625 L217.8125 49.1875 L217.3125 49.5625 L216.625 48.75 M229.0625 48.3125 L227.3125 49.5625 L230.0625 50.0 L230.0 49.25 L229.0625 48.3125 M216.625 48.3125 L216.375 48.375 L216.5625 48.4375 L216.625 48.3125 M188.0625 47.9375 L187.625 48.0625 L188.0 48.1875 L188.0625 47.9375 M186.5625 47.75 L186.75 47.9375 L186.8125 47.8125 L186.5625 47.75 M187.1875 47.6875 L186.875 47.8125 L187.4375 47.8125 L187.1875 47.6875 M188.75 47.5625 L188.8125 47.75 L188.9375 47.625 L188.75 47.5625 M224.25 47.375 L224.875 48.1875 L224.4375 47.5 L224.25 47.375 M228.1875 47.375 L227.625 47.8125 L228.3125 48.0625 L228.1875 47.375 M210.5625 47.0625 L210.4375 47.1875 L210.5625 47.3125 L210.5625 47.0625 M170.0 47.0 L169.9375 47.125 L170.0 47.1875 L170.0 47.0 M188.375 46.8125 L188.0 46.875 L188.25 47.0 L188.375 46.8125 M208.125 46.75 L207.25 47.25 L208.1875 47.8125 L208.6875 47.0 L208.125 46.75 M188.5625 46.625 L188.75 46.875 L188.9375 46.6875 L188.5625 46.625 M189.0 46.5625 L188.9375 46.8125 L189.3125 46.6875 L189.0 46.5625 M188.9375 45.9375 L188.5 46.0625 L188.9375 46.125 L188.9375 45.9375 M189.875 45.4375 L189.3125 45.6875 L189.75 45.875 L189.875 45.4375 M186.375 44.9375 L186.3125 45.0625 L186.4375 45.0625 L186.375 44.9375 M186.375 44.25 L185.9375 44.375 L186.3125 44.9375 L186.5 44.5 L186.375 44.25 M232.125 43.75 L231.875 44.75 L233.75 46.0625 L235.375 45.0 L232.5625 44.4375 L232.125 43.75 M227.9375 43.375 L228.0625 43.5625 L228.125 43.5 L227.9375 43.375 M224.5 43.0 L224.3125 44.1875 L224.4375 44.375 L224.8125 43.625 L224.5 43.0 M187.0 42.625 L186.5 42.6875 L187.25 42.75 L187.0 42.625 M170.125 42.625 L169.75 42.8125 L169.75 42.875 L170.125 42.625 M197.1875 42.25 L196.75 42.5 L196.8125 42.625 L197.1875 42.25 M228.3125 42.25 L228.1875 42.25 L228.1875 42.375 L228.3125 42.25 M171.0 42.0625 L170.6875 42.0625 L170.5625 42.25 L171.0 42.0625 M228.5 42.0 L228.6875 42.5 L228.25 42.4375 L228.3125 43.5625 L227.875 43.625 L227.0 42.3125 L225.75 42.6875 L225.9375 43.25 L225.375 43.6875 L225.6875 44.4375 L225.3125 44.4375 L226.9375 46.375 L227.3125 45.4375 L230.1875 45.5625 L229.4375 45.125 L229.0625 44.375 L229.3125 43.375 L229.6875 43.5 L229.3125 44.125 L229.625 45.0 L230.375 45.3125 L231.375 43.9375 L228.5 42.0 M236.625 41.9375 L236.4375 42.0625 L236.625 42.25 L236.625 41.9375 M195.625 41.875 L195.5625 42.0625 L195.6875 42.0625 L195.625 41.875 M195.5625 41.75 L195.125 41.9375 L195.4375 42.0 L195.5625 41.75 M196.5 41.625 L195.75 41.9375 L196.75 41.8125 L196.5 41.625 M196.8125 41.5625 L196.5625 41.5625 L196.75 41.6875 L196.8125 41.5625 M196.875 41.5 L196.75 41.9375 L197.0 41.75 L196.875 41.5 M208.5625 41.25 L208.4375 41.4375 L208.6875 41.5 L208.5625 41.25 M194.8125 40.6875 L194.75 40.8125 L195.125 40.8125 L194.8125 40.6875 M208.0 40.6875 L207.625 40.75 L208.125 41.0 L208.0 40.6875 M195.625 40.4375 L195.4375 40.625 L195.8125 40.5625 L195.625 40.4375 M196.625 40.4375 L196.1875 40.6875 L196.4375 40.6875 L196.625 40.4375 M197.3125 40.375 L197.1875 40.75 L197.375 40.8125 L197.3125 40.375 M234.1875 40.25 L233.5 40.625 L234.0625 40.5625 L234.1875 40.25 M197.625 40.0 L197.5 40.0625 L197.625 40.25 L197.625 40.0 M176.5625 39.625 L173.5625 41.625 L171.4375 41.75 L171.1875 42.5 L169.25 43.5 L169.375 43.75 L168.875 44.0 L169.0625 44.5 L167.6875 45.0 L168.3125 45.5 L167.6875 45.9375 L168.5 46.25 L167.5 46.3125 L168.0 46.75 L167.1875 47.375 L167.75 47.8125 L166.125 48.6875 L167.25 48.8125 L166.5625 49.75 L167.0625 49.4375 L167.8125 49.75 L167.75 49.5 L168.375 49.9375 L168.6875 49.375 L168.3125 48.875 L169.0 48.9375 L168.1875 48.375 L169.0625 48.8125 L169.1875 48.25 L168.6875 47.875 L169.3125 48.0625 L169.75 47.375 L169.375 46.5625 L170.0625 46.875 L170.0625 46.125 L170.5 46.5 L170.3125 45.9375 L170.875 46.0625 L171.125 45.5625 L170.625 45.375 L171.5625 44.5 L176.9375 40.9375 L177.0 40.1875 L176.5625 39.625 M191.25 39.125 L191.0625 39.1875 L191.125 39.5 L191.25 39.125 M196.6875 39.0625 L195.6875 39.5 L196.375 39.5625 L196.6875 39.0625 M239.25 39.0625 L239.375 39.1875 L239.4375 39.125 L239.25 39.0625 M203.375 38.625 L203.25 38.625 L203.3125 38.6875 L203.375 38.625 M191.75 38.5625 L191.375 38.875 L191.625 38.9375 L191.75 38.5625 M204.5625 38.4375 L204.25 38.75 L204.5 38.6875 L204.5625 38.4375 M204.0 38.0 L203.75 38.25 L203.8125 38.3125 L204.0 38.0 M186.625 37.875 L186.375 37.875 L186.6875 38.0 L186.625 37.875 M193.25 37.375 L193.375 37.5625 L193.4375 37.4375 L193.25 37.375 M198.9375 42.4375 L198.625 41.9375 L196.0625 43.0 L196.4375 42.3125 L194.25 42.25 L194.0625 42.6875 L194.9375 42.6875 L189.875 45.0 L190.4375 45.3125 L190.0 45.4375 L190.125 45.5625 L189.8125 46.4375 L189.1875 45.875 L189.0 46.375 L189.9375 47.0625 L189.125 47.3125 L190.3125 48.3125 L189.0625 49.375 L189.9375 48.4375 L185.25 49.125 L185.0625 49.8125 L185.3125 50.0 L185.0625 50.125 L185.5 50.625 L185.375 51.6875 L186.4375 52.25 L187.5 53.75 L187.125 54.625 L187.5625 56.3125 L187.375 56.5625 L187.0 56.625 L187.125 56.875 L187.1875 57.0625 L187.125 57.125 L186.75 56.9375 L187.125 55.4375 L186.4375 56.0625 L186.625 55.6875 L186.5 54.5625 L187.1875 53.5625 L186.0625 53.5625 L183.875 52.0 L183.0 52.6875 L183.5625 53.1875 L182.125 53.0625 L182.25 53.875 L184.25 55.1875 L182.6875 55.0 L181.5 54.3125 L181.8125 51.625 L181.1875 50.9375 L181.3125 52.6875 L180.3125 53.3125 L179.9375 54.25 L180.875 55.875 L180.25 57.8125 L180.5625 58.5 L180.4375 59.0 L182.0625 58.875 L183.1875 59.5 L183.5625 60.75 L183.125 61.0 L183.0625 61.6875 L184.1875 62.0625 L182.8125 61.6875 L183.0 60.25 L182.4375 59.375 L181.0625 59.75 L180.875 60.5625 L181.125 61.0 L181.125 61.875 L180.5625 62.5625 L180.5 63.1875 L179.1875 64.5 L177.3125 64.0 L177.0625 63.5 L178.3125 63.5625 L178.0 63.8125 L178.25 64.0 L178.875 63.75 L178.75 63.1875 L179.375 62.8125 L179.25 62.5625 L179.9375 61.8125 L180.0 60.875 L180.375 60.375 L179.625 59.375 L179.6875 57.625 L179.5 56.75 L179.75 56.4375 L179.8125 55.4375 L179.0625 54.125 L179.8125 52.25 L179.8125 51.25 L178.875 50.75 L177.3125 50.6875 L176.6875 53.3125 L175.375 55.0625 L175.5625 55.0 L175.4375 55.6875 L175.875 55.6875 L175.6875 56.8125 L175.875 57.0625 L175.5625 57.3125 L175.5 58.1875 L175.625 58.25 L175.625 57.9375 L176.4375 58.25 L176.6875 59.375 L177.25 59.4375 L176.6875 60.8125 L176.5625 60.9375 L176.5 60.5 L175.8125 59.875 L175.6875 59.75 L175.75 59.625 L174.0625 59.0625 L174.25 58.75 L173.625 58.25 L171.3125 57.5625 L170.75 58.1875 L171.3125 59.5 L170.5625 59.9375 L170.5625 60.5625 L170.0 60.4375 L170.25 59.8125 L169.875 59.3125 L168.75 60.1875 L167.3125 60.1875 L166.9375 60.9375 L165.8125 60.75 L166.375 60.5 L166.1875 60.0 L166.4375 59.625 L166.125 59.5 L165.1875 60.0625 L165.5 60.375 L165.1875 60.6875 L165.0 60.1875 L162.5625 61.375 L162.9375 61.9375 L162.125 61.9375 L161.9375 63.125 L161.0 63.625 L161.125 63.375 L159.9375 62.4375 L160.25 61.75 L161.1875 61.625 L161.0625 61.0 L160.625 60.3125 L158.8125 59.9375 L159.4375 60.75 L159.125 62.5625 L159.625 63.3125 L159.4375 65.125 L159.1875 64.625 L158.8125 64.8125 L159.0625 64.5 L158.8125 64.1875 L158.0 64.0 L156.25 65.6875 L156.5625 66.625 L156.625 66.6875 L156.625 66.8125 L156.8125 67.375 L155.0625 67.25 L155.3125 66.875 L154.3125 66.25 L153.9375 66.6875 L154.4375 67.625 L155.0 67.75 L155.0625 68.25 L154.625 68.5625 L152.75 67.375 L152.8125 66.875 L152.4375 66.0 L152.6875 65.875 L152.6875 65.25 L152.875 65.375 L152.75 65.0625 L151.6875 64.375 L152.0 64.1875 L150.625 62.8125 L155.4375 64.8125 L156.5 64.4375 L157.3125 63.4375 L157.4375 62.875 L157.125 61.8125 L153.5625 59.0 L152.0 58.6875 L151.5 59.4375 L151.8125 58.5 L151.3125 58.75 L151.5 58.375 L150.75 58.0625 L151.5625 57.8125 L149.9375 57.75 L150.0 58.25 L149.4375 58.0 L148.5625 59.25 L148.1875 59.5 L148.5 59.625 L148.25 60.25 L148.375 60.875 L149.375 61.8125 L148.6875 63.3125 L149.4375 65.375 L149.1875 65.5 L149.0625 66.75 L149.75 67.9375 L149.3125 68.6875 L150.4375 70.0 L147.75 73.5625 L148.375 73.3125 L148.3125 73.8125 L149.5 74.375 L147.9375 74.625 L147.9375 75.0625 L148.0625 75.3125 L147.5 76.0 L147.8125 77.25 L147.4375 77.75 L147.8125 78.0625 L147.6875 78.5625 L148.0 79.5 L150.0 80.25 L150.0625 80.9375 L149.875 81.25 L150.625 82.125 L150.5625 82.4375 L151.3125 82.8125 L150.25 83.375 L150.625 84.4375 L151.75 84.125 L152.0625 84.125 L152.5 84.75 L152.25 84.9375 L152.4375 85.375 L153.125 85.625 L153.3125 86.4375 L154.625 86.3125 L155.0625 86.9375 L155.25 86.75 L156.5625 87.25 L156.5625 87.625 L156.25 87.875 L156.5 88.0625 L156.1875 88.3125 L156.4375 88.6875 L156.3125 89.125 L155.625 89.125 L155.25 89.4375 L155.1875 89.9375 L155.9375 89.9375 L155.3125 90.25 L155.4375 90.375 L154.8125 90.375 L155.4375 91.0 L155.0 91.0625 L154.75 91.4375 L154.8125 91.8125 L154.1875 91.625 L154.3125 91.8125 L154.0 91.875 L155.5625 92.8125 L156.4375 93.6875 L156.625 93.5 L158.5 93.875 L159.25 94.5 L159.9375 94.3125 L161.0625 95.125 L161.125 95.125 L161.9375 95.8125 L162.5625 95.1875 L161.75 94.0625 L161.9375 93.1875 L161.6875 93.5625 L161.6875 93.0625 L161.1875 92.5625 L161.8125 91.5 L161.6875 91.3125 L161.875 91.5 L161.8125 91.3125 L162.0 91.4375 L162.5625 91.125 L162.5625 91.0 L163.0 90.75 L162.5625 90.5 L162.875 90.25 L162.25 89.3125 L161.6875 89.3125 L161.5 88.6875 L161.0625 88.5625 L161.4375 87.75 L161.25 87.5625 L161.375 87.0 L161.8125 86.3125 L162.3125 86.9375 L162.6875 86.875 L162.625 86.1875 L164.125 84.8125 L164.5 85.1875 L165.1875 84.8125 L165.4375 85.1875 L166.0 85.125 L166.75 85.875 L166.75 86.25 L166.875 85.6875 L167.625 86.25 L168.1875 85.625 L168.875 85.875 L169.5 85.5 L170.3125 86.3125 L170.6875 85.875 L171.625 85.9375 L171.875 85.375 L170.6875 84.625 L171.4375 84.1875 L171.1875 83.75 L171.4375 83.4375 L172.1875 83.375 L171.5 83.0 L171.8125 82.8125 L171.3125 82.625 L171.5625 82.4375 L171.375 82.25 L172.5 82.3125 L172.9375 82.0 L174.375 81.8125 L174.5625 81.4375 L177.1875 80.5625 L178.375 80.625 L178.6875 81.375 L178.5 81.8125 L178.625 82.0625 L179.3125 82.0 L179.25 81.75 L179.5625 82.3125 L179.625 82.0 L180.4375 82.125 L180.0625 82.625 L180.25 82.875 L180.9375 82.8125 L182.625 81.625 L182.4375 82.1875 L183.375 83.0625 L184.9375 86.0 L185.375 85.375 L185.9375 86.0 L187.375 85.6875 L188.0 86.5625 L188.4375 86.75 L188.625 87.25 L189.3125 87.375 L189.6875 87.0625 L189.625 87.25 L190.125 87.8125 L190.4375 87.75 L193.625 85.9375 L195.0625 86.1875 L195.3125 86.8125 L197.25 87.125 L197.875 86.5 L197.5625 85.6875 L198.375 84.375 L200.6875 85.3125 L200.75 86.1875 L201.1875 86.5 L203.875 86.4375 L204.8125 86.875 L204.75 87.1875 L205.1875 87.5625 L206.8125 87.75 L208.4375 87.25 L209.3125 86.5 L211.0 87.0 L211.8125 87.375 L212.75 86.8125 L212.875 86.4375 L212.75 86.375 L213.875 84.4375 L213.8125 83.9375 L213.375 83.6875 L213.9375 83.0625 L215.75 82.75 L217.6875 83.6875 L218.75 86.5625 L218.6875 87.0625 L220.9375 88.0625 L220.8125 88.3125 L221.125 89.3125 L222.25 89.3125 L222.625 88.875 L223.8125 88.6875 L223.8125 89.3125 L223.4375 89.6875 L223.1875 90.8125 L222.6875 91.9375 L221.75 91.75 L221.125 92.25 L221.375 93.6875 L221.25 94.125 L220.75 94.3125 L220.875 94.625 L220.9375 94.75 L220.9375 94.375 L221.3125 94.5 L221.75 93.75 L221.9375 93.75 L221.8125 94.0 L222.125 93.8125 L222.0625 94.1875 L222.6875 94.375 L224.0625 93.5625 L227.6875 88.5 L227.875 86.9375 L228.0625 86.75 L227.875 86.0625 L228.625 84.3125 L228.0625 83.25 L228.4375 83.4375 L228.5625 83.0625 L227.375 81.8125 L226.5625 81.8125 L226.5 82.1875 L225.625 82.75 L226.0625 82.25 L225.625 82.0625 L225.9375 81.8125 L225.5625 81.9375 L225.4375 82.0 L225.625 82.125 L225.5625 82.375 L225.25 82.5 L225.3125 81.375 L224.5 81.5 L224.125 81.125 L227.9375 77.3125 L228.0625 76.8125 L229.0625 75.625 L230.375 75.1875 L233.875 75.4375 L233.75 75.0625 L234.375 74.6875 L236.3125 75.4375 L235.4375 75.5625 L235.625 75.9375 L236.6875 75.875 L237.0625 75.4375 L238.0625 75.5625 L238.375 75.25 L237.5625 75.125 L237.6875 74.5 L240.0 71.6875 L241.25 71.5 L241.4375 71.9375 L242.0 71.5 L241.625 72.5 L241.625 73.0 L242.0625 72.875 L241.875 73.5 L243.5 71.875 L244.125 71.9375 L243.875 71.6875 L244.125 70.5625 L244.875 70.3125 L245.8125 70.6875 L244.6875 71.0 L244.375 73.0625 L243.125 73.75 L240.5 77.0625 L239.4375 77.4375 L239.625 77.875 L238.875 78.875 L238.625 80.625 L239.4375 85.8125 L240.5625 84.625 L240.8125 83.5 L240.6875 83.375 L241.8125 83.3125 L241.625 82.75 L241.8125 82.0 L243.25 81.25 L243.0 80.375 L243.25 79.625 L243.625 79.375 L243.5 79.1875 L244.0 79.0625 L243.6875 79.5 L244.1875 79.4375 L244.0625 78.75 L243.75 78.6875 L243.75 77.9375 L244.0625 77.3125 L243.625 77.1875 L243.4375 77.5 L243.1875 77.0 L243.9375 75.75 L243.8125 75.5625 L244.0625 75.6875 L244.0625 74.9375 L244.375 74.25 L244.75 74.5625 L244.9375 74.1875 L245.1875 74.625 L245.4375 74.375 L245.3125 74.1875 L246.3125 73.625 L246.125 74.625 L246.8125 73.875 L248.3125 73.4375 L249.0625 74.5 L249.375 73.75 L251.0 72.4375 L250.8125 72.25 L254.0625 70.5 L253.875 70.0625 L255.3125 71.0 L255.375 70.875 L255.375 69.3125 L255.125 68.9375 L255.0625 69.25 L254.75 69.0 L255.125 68.875 L254.8125 67.8125 L254.3125 67.75 L254.1875 67.0 L252.0625 67.125 L254.0625 66.9375 L253.375 66.5625 L253.8125 66.5 L254.3125 67.0625 L255.125 67.125 L254.9375 67.3125 L255.375 67.0 L255.375 58.9375 L253.25 57.5 L251.1875 57.75 L249.25 57.0 L249.3125 57.75 L249.0 58.125 L249.3125 58.1875 L249.625 59.25 L249.3125 59.8125 L247.6875 58.8125 L247.3125 57.75 L246.6875 58.3125 L244.625 57.75 L242.8125 58.5625 L242.875 59.5 L242.6875 59.75 L242.8125 59.375 L242.4375 59.125 L242.5 58.125 L241.5625 57.625 L241.8125 56.4375 L241.125 55.4375 L238.875 54.9375 L236.5 55.5 L235.875 55.1875 L236.1875 55.1875 L235.6875 54.375 L234.6875 54.6875 L235.125 54.0625 L233.8125 53.6875 L234.75 53.1875 L234.0625 52.375 L232.625 52.1875 L231.875 53.375 L231.3125 53.6875 L231.0625 53.625 L231.25 53.3125 L231.0625 53.0 L231.6875 53.0625 L231.5625 52.75 L231.625 52.4375 L231.5625 52.375 L231.625 52.3125 L231.75 52.4375 L231.8125 52.75 L232.0625 52.625 L231.8125 52.875 L231.8125 53.25 L232.5 52.1875 L231.1875 52.3125 L230.6875 52.5 L230.5 52.3125 L232.4375 52.125 L228.0625 50.8125 L228.3125 51.5625 L226.875 52.375 L227.6875 52.4375 L227.0625 53.0625 L227.5 54.0625 L226.1875 53.875 L226.0 54.3125 L226.3125 54.5625 L226.0 54.9375 L224.625 53.75 L223.0625 54.1875 L222.375 53.0625 L221.8125 54.5 L222.0 54.6875 L221.25 55.75 L219.625 53.8125 L220.125 53.5625 L219.8125 52.9375 L219.875 53.375 L219.5 53.4375 L218.75 52.125 L218.125 52.0 L218.5625 53.125 L218.4375 54.3125 L218.375 53.25 L217.875 52.125 L217.6875 52.3125 L216.6875 51.4375 L214.6875 50.625 L213.1875 50.6875 L212.1875 50.0 L212.625 49.375 L212.375 49.125 L208.6875 49.3125 L209.0625 49.6875 L208.75 49.9375 L208.75 50.625 L208.4375 50.9375 L208.6875 50.625 L208.6875 49.75 L208.25 48.125 L207.8125 48.8125 L207.0625 48.125 L207.3125 47.9375 L206.375 48.0 L205.875 48.625 L206.875 48.8125 L203.625 50.125 L202.8125 51.125 L204.1875 49.0625 L204.9375 48.875 L208.875 44.25 L207.875 43.0 L208.6875 43.875 L209.0 43.0 L208.5 41.75 L208.0625 42.4375 L208.1875 41.5625 L207.0 40.25 L203.6875 41.0 L204.4375 39.75 L202.0625 39.1875 L203.5625 38.3125 L202.125 37.3125 L201.3125 37.4375 L199.6875 39.875 L200.0 40.25 L199.75 40.875 L200.6875 41.4375 L198.25 41.0625 L199.0 42.25 L198.9375 42.4375 M208.4375 50.9375 L209.125 51.5 L208.5 51.25 L208.4375 50.9375 M198.9375 42.4375 L198.5 43.8125 L199.25 44.9375 L198.4375 43.8125 L198.9375 42.4375 M189.0625 49.375 L189.6875 50.5625 L189.0 49.4375 L189.0625 49.375 M226.5 82.1875 L226.4375 82.8125 L226.3125 82.75 L226.5 82.1875 M186.4375 56.0625 L186.5625 56.875 L186.375 56.125 L186.4375 56.0625 M189.8125 48.8125 L189.6875 49.0625 L189.4375 49.125 L189.8125 48.8125 M166.125 59.5 L166.8125 59.3125 L166.25 59.375 L166.125 59.5 M204.5625 35.625 L203.75 35.8125 L204.375 36.0625 L204.5625 35.625 M194.5625 35.4375 L194.5 35.5625 L194.6875 35.6875 L194.5625 35.4375 M203.6875 35.0625 L203.375 35.5 L203.9375 35.1875 L203.6875 35.0625 M200.1875 31.3125 L199.8125 32.4375 L200.25 32.6875 L199.75 32.75 L199.9375 33.5625 L199.375 33.5625 L198.625 36.125 L202.9375 34.25 L201.9375 32.125 L200.8125 33.25 L201.25 31.375 L200.1875 31.3125 M194.125 31.0625 L193.8125 31.125 L194.0 31.1875 L194.125 31.0625 M193.75 31.0 L193.3125 31.0625 L193.625 31.1875 L193.75 31.0 M199.125 31.0 L199.0 31.0625 L199.0625 31.125 L199.125 31.0 M192.5625 30.5625 L193.0625 30.9375 L192.8125 30.625 L192.5625 30.5625 M182.0625 30.1875 L182.1875 30.3125 L183.1875 30.6875 L182.0625 30.1875 M192.8125 29.875 L193.1875 30.125 L193.3125 30.0625 L192.8125 29.875 M169.75 28.9375 L169.4375 29.0625 L169.9375 29.1875 L169.75 28.9375 M195.0625 28.6875 L194.8125 28.6875 L194.8125 28.875 L195.0625 28.6875 M164.4375 28.5625 L163.5625 28.875 L164.625 29.0 L164.4375 28.5625 M193.6875 29.8125 L194.6875 29.1875 L192.8125 28.5 L192.625 28.5 L193.6875 29.8125 M170.5625 28.4375 L169.8125 28.625 L170.25 29.0625 L170.5625 28.4375 M163.25 28.4375 L163.0625 28.5 L163.3125 28.5625 L163.25 28.4375 M163.75 28.125 L163.25 28.125 L163.5625 28.5 L163.75 28.125 M197.4375 28.0625 L195.9375 28.25 L195.75 28.6875 L195.5 28.3125 L195.0 29.125 L195.3125 29.5 L194.0 30.5 L194.75 30.3125 L194.625 30.9375 L195.0625 30.875 L195.375 32.3125 L197.1875 33.1875 L199.0625 32.8125 L198.4375 31.5625 L198.875 31.5 L199.125 29.4375 L198.0625 28.5 L197.125 29.9375 L197.6875 28.4375 L197.4375 28.0625 M167.5 27.5 L167.0 27.6875 L167.1875 27.8125 L167.5 27.5 M166.125 27.5 L165.125 27.625 L166.3125 27.6875 L166.125 27.5 M166.6875 27.5 L166.5 27.5 L166.5625 27.875 L166.6875 27.5 M168.625 27.3125 L167.625 28.3125 L168.5625 28.4375 L168.625 27.3125 M167.375 26.9375 L167.125 27.0 L167.25 27.1875 L167.375 26.9375 M167.75 26.9375 L167.6875 27.0625 L168.0625 27.125 L167.75 26.9375 M167.0 26.875 L166.6875 27.0625 L166.875 27.125 L167.0 26.875 M169.25 26.6875 L168.5 26.75 L169.0625 28.3125 L170.125 27.375 L169.25 26.6875 M166.75 26.625 L166.25 26.75 L166.625 27.0 L166.75 26.625 M167.125 26.375 L166.875 26.5 L167.25 26.6875 L167.125 26.375 M166.0 26.0625 L165.75 26.125 L166.0 26.6875 L166.0 26.0625 M169.875 26.0 L169.625 26.1875 L169.8125 26.25 L169.875 26.0 M169.25 26.0 L168.6875 26.1875 L169.125 26.4375 L169.25 26.0 M168.375 25.625 L167.4375 25.75 L168.5 25.8125 L168.375 25.625 M162.0625 25.3125 L159.875 26.125 L160.75 26.3125 L160.75 26.9375 L161.75 26.25 L161.625 25.9375 L161.9375 25.5 L162.6875 26.0 L162.0625 25.3125 M172.25 25.25 L170.125 26.0 L171.4375 27.0625 L172.25 25.25 M167.4375 25.125 L166.375 25.25 L167.8125 25.375 L167.4375 25.125 M169.8125 24.875 L169.125 25.3125 L169.9375 25.375 L169.8125 24.875 M163.875 24.875 L162.8125 25.625 L163.3125 25.6875 L163.0 26.5625 L161.6875 26.875 L162.25 27.375 L161.125 27.5 L162.375 28.375 L162.9375 28.0 L162.5625 27.5 L162.6875 27.1875 L164.8125 25.6875 L163.625 25.125 L163.875 24.875 M184.875 24.625 L184.1875 25.1875 L185.1875 24.75 L184.875 24.625 M169.125 24.25 L169.625 24.625 L169.75 24.3125 L169.125 24.25 M164.25 23.9375 L163.8125 24.0 L164.0 24.1875 L164.25 23.9375 M168.0 23.9375 L167.875 24.0 L169.4375 24.8125 L168.0 23.9375 M169.625 23.9375 L169.8125 24.0625 L169.8125 24.0 L169.625 23.9375 M166.9375 23.9375 L166.6875 24.375 L169.0625 25.375 L166.9375 23.9375 M171.8125 23.9375 L170.6875 24.4375 L171.375 24.8125 L171.8125 23.9375 M169.6875 23.8125 L169.375 23.8125 L169.5625 23.875 L169.6875 23.8125 M191.9375 23.625 L192.875 24.125 L193.125 23.75 L191.9375 23.625 M173.875 23.5625 L172.4375 25.25 L173.75 25.625 L174.5625 24.3125 L173.875 23.5625 M169.3125 23.4375 L168.5 23.6875 L168.9375 23.875 L169.3125 23.4375 M196.25 23.4375 L194.1875 24.4375 L193.75 25.5 L194.375 25.3125 L193.3125 26.8125 L193.875 27.125 L193.0 27.4375 L194.3125 27.4375 L193.4375 28.0625 L194.6875 28.75 L195.4375 28.1875 L197.0625 27.75 L197.25 27.4375 L197.0625 25.9375 L197.6875 25.6875 L196.25 23.4375 M170.5 23.125 L170.9375 23.3125 L171.125 23.1875 L170.5 23.125 M168.875 23.0 L167.4375 23.1875 L169.1875 23.0625 L168.875 23.0 M169.5625 22.875 L170.0 23.125 L170.25 22.9375 L169.5625 22.875 M166.5 22.8125 L166.6875 23.1875 L166.625 22.875 L166.5 22.8125 M169.125 21.9375 L168.375 22.3125 L169.625 22.5 L169.125 21.9375 M169.75 21.625 L169.375 21.6875 L169.5625 21.8125 L169.75 21.625 M171.8125 21.5625 L172.125 21.875 L172.25 21.75 L171.8125 21.5625 M172.625 21.0625 L172.1875 21.25 L173.375 21.3125 L172.625 21.0625 M170.25 20.5625 L169.1875 21.0625 L170.1875 20.875 L170.25 20.5625" stroke-dasharray="" fill="#ffffff" fill-opacity="1.0" stroke="none" stroke-opacity="1.0" stroke-width="0.0px" stroke-linecap="butt" stroke-linejoin="miter" stroke-dashoffset="0.0px"/>
-</g>
 </svg>
\ No newline at end of file

From 44ddde9ad8f422310fad2b4e5ea0d0c106ff7caa Mon Sep 17 00:00:00 2001
From: Dane Springmeyer <dane@mapbox.com>
Date: Sun, 10 Sep 2017 10:37:37 -0700
Subject: [PATCH 13/22] build in c++14 mode

---
 binding.gyp | 2 +-
 common.gypi | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/binding.gyp b/binding.gyp
index 10ca1d18fe..a71afc7d15 100644
--- a/binding.gyp
+++ b/binding.gyp
@@ -100,7 +100,7 @@
               'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
               'MACOSX_DEPLOYMENT_TARGET':'10.8',
               'CLANG_CXX_LIBRARY': 'libc++',
-              'CLANG_CXX_LANGUAGE_STANDARD':'c++11',
+              'CLANG_CXX_LANGUAGE_STANDARD':'c++14',
               'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0'
             }
           },
diff --git a/common.gypi b/common.gypi
index 5c0d62a878..8d7b555120 100644
--- a/common.gypi
+++ b/common.gypi
@@ -5,7 +5,7 @@
     'msbuild_toolset':'v140',
     'msvs_disabled_warnings': [ 4503, 4068,4244,4005,4506,4345,4804,4805,4661 ],
     'cflags_cc' : [
-      '-std=c++11',
+      '-std=c++14',
     ],
     'cflags_cc!': ['-std=gnu++0x','-fno-rtti', '-fno-exceptions'],
     'configurations': {

From 2b40155cb9210c5198b3d5c9286edc36196e1d5d Mon Sep 17 00:00:00 2001
From: Dane Springmeyer <dane@mapbox.com>
Date: Sun, 10 Sep 2017 10:55:54 -0700
Subject: [PATCH 14/22] Revert "update test fixtures for master"

The image fixture (at least) should not change in this way, so reverting back to original.

This reverts commit 7d4799763e766bd25346789b649c4cd8bbe7e3da.
---
 test/data/vector_tile/tile0-c.expected.png   | Bin 18811 -> 13780 bytes
 test/data/vector_tile/tile0.expected-svg.svg |   2 ++
 2 files changed, 2 insertions(+)

diff --git a/test/data/vector_tile/tile0-c.expected.png b/test/data/vector_tile/tile0-c.expected.png
index 1a95b7201552e542ac092b0477cb57332a5615a2..558d5961a30aeba08749dbdf9ddd9a1039c8f942 100644
GIT binary patch
diff --git a/test/data/vector_tile/tile0.expected-svg.svg b/test/data/vector_tile/tile0.expected-svg.svg
index 365391da72..e734c8571f 100644
--- a/test/data/vector_tile/tile0.expected-svg.svg
+++ b/test/data/vector_tile/tile0.expected-svg.svg
@@ -2,6 +2,7 @@
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
 <svg width="256px" height="256px" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape">
 <rect x="0" y="0" width="256px" height="256px" fill="#4682b4"/>
+<g id="world" inkscape:groupmode="layer" inkscape:label="world">
 <path d="M84.0 115.1875 L84.0 115.3125 L84.125 115.25 L84.0 115.1875" stroke-dasharray="" fill="#ffffff" fill-opacity="1.0" stroke="none" stroke-opacity="1.0" stroke-width="0.0px" stroke-linecap="butt" stroke-linejoin="miter" stroke-dashoffset="0.0px"/>
 <path d="M132.5625 99.5625 L131.8125 99.9375 L131.375 99.75 L130.125 99.8125 L128.6875 100.125 L126.4375 101.3125 L126.75 101.625 L126.8125 102.875 L127.3125 103.5625 L127.1875 103.875 L126.0 103.875 L125.3125 104.1875 L125.4375 104.8125 L124.5 105.1875 L124.0625 105.6875 L122.9375 105.9375 L121.8125 106.6875 L121.8125 107.8125 L123.25 108.75 L124.5625 109.625 L128.8125 112.625 L128.8125 112.9375 L129.25 113.25 L130.3125 113.625 L130.375 114.25 L131.0 114.125 L132.125 113.875 L133.3125 112.8125 L136.5 110.8125 L136.25 110.1875 L135.3125 109.9375 L134.6875 108.75 L135.0 108.4375 L135.0625 107.375 L134.9375 106.0625 L134.625 105.5 L134.8125 105.4375 L134.4375 103.875 L133.9375 103.5 L133.3125 102.375 L133.875 101.6875 L133.8125 100.0625 L134.125 99.6875 L132.5625 99.5625" stroke-dasharray="" fill="#ffffff" fill-opacity="1.0" stroke="none" stroke-opacity="1.0" stroke-width="0.0px" stroke-linecap="butt" stroke-linejoin="miter" stroke-dashoffset="0.0px"/>
 <path d="M160.0625 97.125 L159.8125 97.1875 L159.875 97.25 L160.0 97.4375 L160.8125 98.0 L160.5625 97.3125 L160.0625 97.125 M160.4375 96.3125 L160.375 96.3125 L160.375 96.375 L160.4375 96.3125 M160.0 95.875 L160.0 95.9375 L160.0625 95.9375 L160.0 95.875 M161.125 95.125 L161.0625 95.125 L160.875 95.3125 L161.1875 95.6875 L161.0625 95.9375 L160.25 95.5625 L160.0 95.6875 L160.125 95.8125 L160.6875 96.6875 L160.4375 96.9375 L161.125 97.3125 L161.125 97.9375 L162.125 97.1875 L162.375 97.5 L162.125 98.0 L162.75 98.375 L163.1875 96.75 L163.8125 96.6875 L163.25 96.3125 L162.5625 95.1875 L161.9375 95.8125 L161.125 95.125" stroke-dasharray="" fill="#ffffff" fill-opacity="1.0" stroke="none" stroke-opacity="1.0" stroke-width="0.0px" stroke-linecap="butt" stroke-linejoin="miter" stroke-dashoffset="0.0px"/>
@@ -225,4 +226,5 @@
 <path d="M109.3125 179.4375 L109.1875 179.5 L109.3125 179.5625 L109.3125 179.4375 M108.4375 176.625 L108.375 176.625 L108.375 176.6875 L108.4375 176.625 M101.625 174.375 L101.625 174.4375 L101.6875 174.4375 L101.625 174.375 M101.3125 173.8125 L100.9375 173.875 L101.5 174.0 L101.375 174.125 L102.3125 174.875 L102.5625 174.75 L102.1875 174.125 L101.3125 173.8125" stroke-dasharray="" fill="#ffffff" fill-opacity="1.0" stroke="none" stroke-opacity="1.0" stroke-width="0.0px" stroke-linecap="butt" stroke-linejoin="miter" stroke-dashoffset="0.0px"/>
 <path d="M213.0625 110.6875 L213.0 110.75 L213.125 110.75 L213.0625 110.6875 M212.1875 110.0 L212.125 110.125 L212.1875 110.125 L212.1875 110.0 M214.5625 109.5 L214.0625 109.625 L213.4375 110.6875 L213.375 111.125 L213.8125 112.0 L214.625 110.0625 L214.75 109.625 L214.5625 109.5" stroke-dasharray="" fill="#ffffff" fill-opacity="1.0" stroke="none" stroke-opacity="1.0" stroke-width="0.0px" stroke-linecap="butt" stroke-linejoin="miter" stroke-dashoffset="0.0px"/>
 <path d="M221.6875 94.0 L221.75 94.125 L221.8125 94.0625 L221.6875 94.0 M232.0 93.5625 L231.875 93.5625 L231.9375 93.625 L232.0 93.5625 M232.4375 93.25 L232.25 93.25 L232.3125 93.375 L232.4375 93.25 M231.9375 92.5625 L231.4375 93.375 L232.25 92.625 L231.9375 92.5625 M233.1875 91.6875 L232.4375 92.6875 L233.8125 91.75 L233.1875 91.6875 M162.4375 91.3125 L162.375 91.3125 L162.4375 91.4375 L162.4375 91.3125 M235.0 90.875 L234.25 91.5 L234.6875 91.25 L235.0 90.875 M235.25 90.5625 L235.25 90.625 L235.3125 90.625 L235.25 90.5625 M236.25 89.875 L235.875 90.25 L236.125 90.1875 L236.25 89.875 M236.4375 89.625 L236.375 89.6875 L236.4375 89.75 L236.4375 89.625 M236.875 89.1875 L236.8125 89.3125 L236.875 89.3125 L236.875 89.1875 M237.6875 88.0 L237.5625 88.0 L237.5 88.1875 L237.6875 88.0 M238.125 87.25 L237.9375 87.5 L238.0 87.625 L238.125 87.25 M237.8125 87.0 L237.75 87.0 L237.8125 87.125 L237.8125 87.0 M239.0 86.0 L238.375 86.75 L238.75 86.625 L239.0 86.0 M239.25 85.875 L239.0625 86.0 L239.25 86.0625 L239.25 85.875 M238.6875 85.8125 L238.5625 85.8125 L238.6875 85.9375 L238.6875 85.8125 M230.1875 87.5625 L230.9375 88.3125 L229.875 85.125 L229.875 83.25 L229.5 81.6875 L229.25 81.9375 L229.5625 82.5625 L228.8125 82.9375 L228.75 84.1875 L229.1875 85.5625 L228.875 88.1875 L229.125 89.0 L228.875 90.5 L229.0625 91.1875 L229.5 90.3125 L229.9375 90.5 L230.0 91.0 L230.0625 90.25 L229.75 90.25 L229.375 89.0 L229.6875 87.75 L230.1875 87.5625 M230.1875 87.5625 L229.9375 87.5625 L229.875 87.5 L230.1875 87.5625 M226.0625 81.5625 L225.9375 81.75 L226.0 81.75 L226.0625 81.5625 M225.875 81.5 L225.8125 81.5625 L225.875 81.6875 L225.875 81.5 M225.5625 80.875 L225.1875 81.0625 L225.4375 81.0625 L225.5625 80.875 M225.8125 80.75 L225.5625 81.25 L225.9375 81.4375 L226.125 81.125 L226.25 80.9375 L225.8125 80.75 M142.9375 80.625 L142.875 80.625 L142.1875 81.0 L142.125 81.4375 L142.5 81.375 L142.0625 81.6875 L144.1875 81.75 L144.25 81.125 L143.25 80.6875 L143.125 80.6875 L143.0625 81.0625 L142.625 81.0625 L142.9375 80.625 M246.125 80.5625 L245.9375 80.625 L246.5 81.375 L246.125 80.5625 M245.0625 75.625 L244.4375 75.75 L244.1875 76.375 L245.0625 75.625 M233.9375 75.4375 L233.9375 75.5625 L234.0 75.5 L233.9375 75.4375 M148.3125 73.8125 L148.375 73.9375 L148.4375 73.875 L148.3125 73.8125 M153.5 67.625 L153.5625 67.75 L153.625 67.6875 L153.5 67.625 M156.4375 67.125 L156.75 67.375 L156.75 67.1875 L156.4375 67.125 M5.3125 66.875 L5.25 67.125 L5.5625 66.9375 L5.3125 66.875 M153.5 66.3125 L153.25 66.375 L153.4375 66.6875 L153.5 66.3125 M177.3125 63.625 L177.25 63.6875 L177.3125 63.75 L177.3125 63.625 M158.3125 63.5 L158.1875 63.5625 L158.375 63.6875 L158.3125 63.5 M177.375 63.5625 L177.6875 64.0625 L177.875 63.9375 L177.8125 63.6875 L177.375 63.5625 M166.4375 60.5625 L166.3125 60.625 L166.375 60.6875 L166.4375 60.5625 M164.375 60.3125 L164.125 60.5625 L164.5625 60.375 L164.375 60.3125 M169.1875 59.6875 L168.6875 59.875 L169.125 59.8125 L169.1875 59.6875 M175.875 59.6875 L175.75 59.6875 L175.9375 59.75 L175.875 59.6875 M166.875 59.3125 L166.8125 59.4375 L166.875 59.4375 L166.875 59.3125 M175.0625 59.125 L174.875 59.125 L175.3125 59.4375 L175.0625 59.125 M152.3125 58.5 L152.1875 58.5625 L152.4375 58.625 L152.3125 58.5 M175.625 58.4375 L175.75 58.625 L175.8125 58.5 L175.625 58.4375 M162.8125 58.3125 L162.375 58.75 L162.3125 59.5625 L162.8125 59.875 L163.75 59.0 L162.8125 58.3125 M242.8125 59.3125 L242.75 59.125 L242.6875 58.8125 L242.75 58.625 L242.6875 58.5 L242.75 58.375 L242.75 58.25 L242.5625 58.375 L242.5625 59.125 L242.8125 59.3125 M242.8125 59.3125 L242.8125 59.5625 L242.875 59.5 L242.875 59.375 L242.8125 59.3125 M175.875 58.125 L175.6875 58.375 L175.8125 58.4375 L175.875 58.125 M242.9375 58.125 L242.75 58.125 L242.8125 58.5 L242.9375 58.125 M247.3125 57.625 L248.0625 58.1875 L248.5 57.6875 L247.3125 57.625 M186.9375 56.75 L186.875 56.875 L187.0625 57.0625 L187.125 56.875 L187.0625 56.8125 L186.9375 56.75 M170.0 56.3125 L169.5625 56.75 L170.375 57.875 L171.0625 57.6875 L170.3125 56.6875 L170.0 56.3125 M187.4375 56.1875 L187.3125 56.375 L187.3125 56.5 L187.375 56.5 L187.4375 56.375 L187.4375 56.1875 M168.4375 56.0 L168.5 56.1875 L168.6875 56.25 L168.4375 56.0 M243.5 55.875 L243.375 55.875 L243.5625 55.9375 L243.5 55.875 M187.1875 55.5625 L187.0625 56.4375 L187.3125 55.8125 L187.1875 55.5625 M242.9375 55.5625 L242.8125 55.5625 L243.0 55.6875 L242.9375 55.5625 M242.0625 55.3125 L242.1875 55.5625 L242.3125 55.5625 L242.0625 55.3125 M166.0625 54.75 L166.0 54.875 L166.125 54.9375 L166.0625 54.75 M255.375 54.6875 L255.0 55.0625 L255.125 55.625 L255.375 55.5 L255.375 54.6875 M165.75 54.375 L165.8125 54.5 L165.9375 54.5 L165.75 54.375 M165.5625 54.3125 L165.125 54.5 L165.8125 55.1875 L165.8125 54.625 L165.5625 54.3125 M225.4375 54.0 L225.875 54.25 L226.125 54.0625 L225.4375 54.0 M226.375 53.1875 L226.3125 53.25 L226.5 53.25 L226.375 53.1875 M219.125 51.5625 L218.0625 51.875 L218.6875 51.9375 L219.5625 52.75 L220.125 52.375 L219.125 51.5625 M183.1875 51.4375 L182.625 52.125 L183.3125 52.25 L183.75 51.75 L183.1875 51.4375 M179.875 51.3125 L179.8125 51.3125 L179.875 51.5 L179.875 51.3125 M219.25 51.0625 L218.5625 51.375 L220.0 51.25 L219.25 51.0625 M219.25 50.875 L219.9375 51.0625 L219.875 50.9375 L219.25 50.875 M181.25 50.3125 L180.6875 50.5 L181.0625 50.875 L181.25 50.3125 M184.3125 50.3125 L183.875 50.9375 L184.5625 51.1875 L184.3125 50.3125 M213.375 50.1875 L213.0625 50.25 L213.5 50.4375 L213.375 50.1875 M182.375 50.0625 L182.125 50.0625 L182.5625 50.1875 L182.375 50.0625 M178.6875 49.5625 L178.5625 49.875 L178.75 49.75 L178.6875 49.5625 M166.0 54.5 L166.0 54.5625 L166.5625 54.875 L166.0625 55.0 L166.1875 55.3125 L166.0 55.5625 L167.25 56.125 L169.0 55.75 L168.0 54.75 L167.25 53.0625 L167.5 52.4375 L167.1875 51.875 L167.8125 51.375 L167.4375 51.0625 L168.0 50.625 L167.5625 50.625 L168.25 50.25 L167.375 49.75 L167.0625 49.5 L165.8125 50.1875 L165.9375 50.8125 L165.25 51.25 L165.875 51.375 L165.5 51.4375 L165.75 51.5 L165.25 52.75 L164.6875 52.75 L164.5625 53.5 L164.8125 54.125 L165.9375 53.875 L166.0 54.5 M178.5 49.3125 L177.75 49.5625 L177.6875 50.5 L179.0 50.125 L178.5 49.875 L178.6875 49.5 L178.5 49.3125 M218.5 49.25 L218.0625 49.5 L218.125 50.375 L217.8125 50.8125 L217.9375 51.0625 L217.8125 51.75 L218.0 52.0 L218.0 51.6875 L219.8125 50.3125 L218.5 49.25 M182.3125 49.25 L182.125 49.25 L182.5625 49.5 L182.3125 49.25 M218.8125 49.25 L218.5625 49.25 L219.0625 49.375 L218.8125 49.25 M185.1875 49.1875 L184.9375 49.1875 L185.125 49.3125 L185.1875 49.1875 M182.125 49.1875 L181.75 49.1875 L181.5625 49.5 L182.125 49.1875 M216.625 48.75 L215.75 48.9375 L215.625 49.5625 L215.9375 50.125 L215.0625 50.625 L216.75 51.375 L217.6875 52.25 L217.875 52.0625 L217.75 51.6875 L217.875 51.0625 L217.8125 50.875 L218.125 50.375 L217.6875 49.625 L217.8125 49.1875 L217.3125 49.5625 L216.625 48.75 M229.0625 48.3125 L227.3125 49.5625 L230.0625 50.0 L230.0 49.25 L229.0625 48.3125 M216.625 48.3125 L216.375 48.375 L216.5625 48.4375 L216.625 48.3125 M188.0625 47.9375 L187.625 48.0625 L188.0 48.1875 L188.0625 47.9375 M186.5625 47.75 L186.75 47.9375 L186.8125 47.8125 L186.5625 47.75 M187.1875 47.6875 L186.875 47.8125 L187.4375 47.8125 L187.1875 47.6875 M188.75 47.5625 L188.8125 47.75 L188.9375 47.625 L188.75 47.5625 M224.25 47.375 L224.875 48.1875 L224.4375 47.5 L224.25 47.375 M228.1875 47.375 L227.625 47.8125 L228.3125 48.0625 L228.1875 47.375 M210.5625 47.0625 L210.4375 47.1875 L210.5625 47.3125 L210.5625 47.0625 M170.0 47.0 L169.9375 47.125 L170.0 47.1875 L170.0 47.0 M188.375 46.8125 L188.0 46.875 L188.25 47.0 L188.375 46.8125 M208.125 46.75 L207.25 47.25 L208.1875 47.8125 L208.6875 47.0 L208.125 46.75 M188.5625 46.625 L188.75 46.875 L188.9375 46.6875 L188.5625 46.625 M189.0 46.5625 L188.9375 46.8125 L189.3125 46.6875 L189.0 46.5625 M188.9375 45.9375 L188.5 46.0625 L188.9375 46.125 L188.9375 45.9375 M189.875 45.4375 L189.3125 45.6875 L189.75 45.875 L189.875 45.4375 M186.375 44.9375 L186.3125 45.0625 L186.4375 45.0625 L186.375 44.9375 M186.375 44.25 L185.9375 44.375 L186.3125 44.9375 L186.5 44.5 L186.375 44.25 M232.125 43.75 L231.875 44.75 L233.75 46.0625 L235.375 45.0 L232.5625 44.4375 L232.125 43.75 M227.9375 43.375 L228.0625 43.5625 L228.125 43.5 L227.9375 43.375 M224.5 43.0 L224.3125 44.1875 L224.4375 44.375 L224.8125 43.625 L224.5 43.0 M187.0 42.625 L186.5 42.6875 L187.25 42.75 L187.0 42.625 M170.125 42.625 L169.75 42.8125 L169.75 42.875 L170.125 42.625 M197.1875 42.25 L196.75 42.5 L196.8125 42.625 L197.1875 42.25 M228.3125 42.25 L228.1875 42.25 L228.1875 42.375 L228.3125 42.25 M171.0 42.0625 L170.6875 42.0625 L170.5625 42.25 L171.0 42.0625 M228.5 42.0 L228.6875 42.5 L228.25 42.4375 L228.3125 43.5625 L227.875 43.625 L227.0 42.3125 L225.75 42.6875 L225.9375 43.25 L225.375 43.6875 L225.6875 44.4375 L225.3125 44.4375 L226.9375 46.375 L227.3125 45.4375 L230.1875 45.5625 L229.4375 45.125 L229.0625 44.375 L229.3125 43.375 L229.6875 43.5 L229.3125 44.125 L229.625 45.0 L230.375 45.3125 L231.375 43.9375 L228.5 42.0 M236.625 41.9375 L236.4375 42.0625 L236.625 42.25 L236.625 41.9375 M195.625 41.875 L195.5625 42.0625 L195.6875 42.0625 L195.625 41.875 M195.5625 41.75 L195.125 41.9375 L195.4375 42.0 L195.5625 41.75 M196.5 41.625 L195.75 41.9375 L196.75 41.8125 L196.5 41.625 M196.8125 41.5625 L196.5625 41.5625 L196.75 41.6875 L196.8125 41.5625 M196.875 41.5 L196.75 41.9375 L197.0 41.75 L196.875 41.5 M208.5625 41.25 L208.4375 41.4375 L208.6875 41.5 L208.5625 41.25 M194.8125 40.6875 L194.75 40.8125 L195.125 40.8125 L194.8125 40.6875 M208.0 40.6875 L207.625 40.75 L208.125 41.0 L208.0 40.6875 M195.625 40.4375 L195.4375 40.625 L195.8125 40.5625 L195.625 40.4375 M196.625 40.4375 L196.1875 40.6875 L196.4375 40.6875 L196.625 40.4375 M197.3125 40.375 L197.1875 40.75 L197.375 40.8125 L197.3125 40.375 M234.1875 40.25 L233.5 40.625 L234.0625 40.5625 L234.1875 40.25 M197.625 40.0 L197.5 40.0625 L197.625 40.25 L197.625 40.0 M176.5625 39.625 L173.5625 41.625 L171.4375 41.75 L171.1875 42.5 L169.25 43.5 L169.375 43.75 L168.875 44.0 L169.0625 44.5 L167.6875 45.0 L168.3125 45.5 L167.6875 45.9375 L168.5 46.25 L167.5 46.3125 L168.0 46.75 L167.1875 47.375 L167.75 47.8125 L166.125 48.6875 L167.25 48.8125 L166.5625 49.75 L167.0625 49.4375 L167.8125 49.75 L167.75 49.5 L168.375 49.9375 L168.6875 49.375 L168.3125 48.875 L169.0 48.9375 L168.1875 48.375 L169.0625 48.8125 L169.1875 48.25 L168.6875 47.875 L169.3125 48.0625 L169.75 47.375 L169.375 46.5625 L170.0625 46.875 L170.0625 46.125 L170.5 46.5 L170.3125 45.9375 L170.875 46.0625 L171.125 45.5625 L170.625 45.375 L171.5625 44.5 L176.9375 40.9375 L177.0 40.1875 L176.5625 39.625 M191.25 39.125 L191.0625 39.1875 L191.125 39.5 L191.25 39.125 M196.6875 39.0625 L195.6875 39.5 L196.375 39.5625 L196.6875 39.0625 M239.25 39.0625 L239.375 39.1875 L239.4375 39.125 L239.25 39.0625 M203.375 38.625 L203.25 38.625 L203.3125 38.6875 L203.375 38.625 M191.75 38.5625 L191.375 38.875 L191.625 38.9375 L191.75 38.5625 M204.5625 38.4375 L204.25 38.75 L204.5 38.6875 L204.5625 38.4375 M204.0 38.0 L203.75 38.25 L203.8125 38.3125 L204.0 38.0 M186.625 37.875 L186.375 37.875 L186.6875 38.0 L186.625 37.875 M193.25 37.375 L193.375 37.5625 L193.4375 37.4375 L193.25 37.375 M198.9375 42.4375 L198.625 41.9375 L196.0625 43.0 L196.4375 42.3125 L194.25 42.25 L194.0625 42.6875 L194.9375 42.6875 L189.875 45.0 L190.4375 45.3125 L190.0 45.4375 L190.125 45.5625 L189.8125 46.4375 L189.1875 45.875 L189.0 46.375 L189.9375 47.0625 L189.125 47.3125 L190.3125 48.3125 L189.0625 49.375 L189.9375 48.4375 L185.25 49.125 L185.0625 49.8125 L185.3125 50.0 L185.0625 50.125 L185.5 50.625 L185.375 51.6875 L186.4375 52.25 L187.5 53.75 L187.125 54.625 L187.5625 56.3125 L187.375 56.5625 L187.0 56.625 L187.125 56.875 L187.1875 57.0625 L187.125 57.125 L186.75 56.9375 L187.125 55.4375 L186.4375 56.0625 L186.625 55.6875 L186.5 54.5625 L187.1875 53.5625 L186.0625 53.5625 L183.875 52.0 L183.0 52.6875 L183.5625 53.1875 L182.125 53.0625 L182.25 53.875 L184.25 55.1875 L182.6875 55.0 L181.5 54.3125 L181.8125 51.625 L181.1875 50.9375 L181.3125 52.6875 L180.3125 53.3125 L179.9375 54.25 L180.875 55.875 L180.25 57.8125 L180.5625 58.5 L180.4375 59.0 L182.0625 58.875 L183.1875 59.5 L183.5625 60.75 L183.125 61.0 L183.0625 61.6875 L184.1875 62.0625 L182.8125 61.6875 L183.0 60.25 L182.4375 59.375 L181.0625 59.75 L180.875 60.5625 L181.125 61.0 L181.125 61.875 L180.5625 62.5625 L180.5 63.1875 L179.1875 64.5 L177.3125 64.0 L177.0625 63.5 L178.3125 63.5625 L178.0 63.8125 L178.25 64.0 L178.875 63.75 L178.75 63.1875 L179.375 62.8125 L179.25 62.5625 L179.9375 61.8125 L180.0 60.875 L180.375 60.375 L179.625 59.375 L179.6875 57.625 L179.5 56.75 L179.75 56.4375 L179.8125 55.4375 L179.0625 54.125 L179.8125 52.25 L179.8125 51.25 L178.875 50.75 L177.3125 50.6875 L176.6875 53.3125 L175.375 55.0625 L175.5625 55.0 L175.4375 55.6875 L175.875 55.6875 L175.6875 56.8125 L175.875 57.0625 L175.5625 57.3125 L175.5 58.1875 L175.625 58.25 L175.625 57.9375 L176.4375 58.25 L176.6875 59.375 L177.25 59.4375 L176.6875 60.8125 L176.5625 60.9375 L176.5 60.5 L175.8125 59.875 L175.6875 59.75 L175.75 59.625 L174.0625 59.0625 L174.25 58.75 L173.625 58.25 L171.3125 57.5625 L170.75 58.1875 L171.3125 59.5 L170.5625 59.9375 L170.5625 60.5625 L170.0 60.4375 L170.25 59.8125 L169.875 59.3125 L168.75 60.1875 L167.3125 60.1875 L166.9375 60.9375 L165.8125 60.75 L166.375 60.5 L166.1875 60.0 L166.4375 59.625 L166.125 59.5 L165.1875 60.0625 L165.5 60.375 L165.1875 60.6875 L165.0 60.1875 L162.5625 61.375 L162.9375 61.9375 L162.125 61.9375 L161.9375 63.125 L161.0 63.625 L161.125 63.375 L159.9375 62.4375 L160.25 61.75 L161.1875 61.625 L161.0625 61.0 L160.625 60.3125 L158.8125 59.9375 L159.4375 60.75 L159.125 62.5625 L159.625 63.3125 L159.4375 65.125 L159.1875 64.625 L158.8125 64.8125 L159.0625 64.5 L158.8125 64.1875 L158.0 64.0 L156.25 65.6875 L156.5625 66.625 L156.625 66.6875 L156.625 66.8125 L156.8125 67.375 L155.0625 67.25 L155.3125 66.875 L154.3125 66.25 L153.9375 66.6875 L154.4375 67.625 L155.0 67.75 L155.0625 68.25 L154.625 68.5625 L152.75 67.375 L152.8125 66.875 L152.4375 66.0 L152.6875 65.875 L152.6875 65.25 L152.875 65.375 L152.75 65.0625 L151.6875 64.375 L152.0 64.1875 L150.625 62.8125 L155.4375 64.8125 L156.5 64.4375 L157.3125 63.4375 L157.4375 62.875 L157.125 61.8125 L153.5625 59.0 L152.0 58.6875 L151.5 59.4375 L151.8125 58.5 L151.3125 58.75 L151.5 58.375 L150.75 58.0625 L151.5625 57.8125 L149.9375 57.75 L150.0 58.25 L149.4375 58.0 L148.5625 59.25 L148.1875 59.5 L148.5 59.625 L148.25 60.25 L148.375 60.875 L149.375 61.8125 L148.6875 63.3125 L149.4375 65.375 L149.1875 65.5 L149.0625 66.75 L149.75 67.9375 L149.3125 68.6875 L150.4375 70.0 L147.75 73.5625 L148.375 73.3125 L148.3125 73.8125 L149.5 74.375 L147.9375 74.625 L147.9375 75.0625 L148.0625 75.3125 L147.5 76.0 L147.8125 77.25 L147.4375 77.75 L147.8125 78.0625 L147.6875 78.5625 L148.0 79.5 L150.0 80.25 L150.0625 80.9375 L149.875 81.25 L150.625 82.125 L150.5625 82.4375 L151.3125 82.8125 L150.25 83.375 L150.625 84.4375 L151.75 84.125 L152.0625 84.125 L152.5 84.75 L152.25 84.9375 L152.4375 85.375 L153.125 85.625 L153.3125 86.4375 L154.625 86.3125 L155.0625 86.9375 L155.25 86.75 L156.5625 87.25 L156.5625 87.625 L156.25 87.875 L156.5 88.0625 L156.1875 88.3125 L156.4375 88.6875 L156.3125 89.125 L155.625 89.125 L155.25 89.4375 L155.1875 89.9375 L155.9375 89.9375 L155.3125 90.25 L155.4375 90.375 L154.8125 90.375 L155.4375 91.0 L155.0 91.0625 L154.75 91.4375 L154.8125 91.8125 L154.1875 91.625 L154.3125 91.8125 L154.0 91.875 L155.5625 92.8125 L156.4375 93.6875 L156.625 93.5 L158.5 93.875 L159.25 94.5 L159.9375 94.3125 L161.0625 95.125 L161.125 95.125 L161.9375 95.8125 L162.5625 95.1875 L161.75 94.0625 L161.9375 93.1875 L161.6875 93.5625 L161.6875 93.0625 L161.1875 92.5625 L161.8125 91.5 L161.6875 91.3125 L161.875 91.5 L161.8125 91.3125 L162.0 91.4375 L162.5625 91.125 L162.5625 91.0 L163.0 90.75 L162.5625 90.5 L162.875 90.25 L162.25 89.3125 L161.6875 89.3125 L161.5 88.6875 L161.0625 88.5625 L161.4375 87.75 L161.25 87.5625 L161.375 87.0 L161.8125 86.3125 L162.3125 86.9375 L162.6875 86.875 L162.625 86.1875 L164.125 84.8125 L164.5 85.1875 L165.1875 84.8125 L165.4375 85.1875 L166.0 85.125 L166.75 85.875 L166.75 86.25 L166.875 85.6875 L167.625 86.25 L168.1875 85.625 L168.875 85.875 L169.5 85.5 L170.3125 86.3125 L170.6875 85.875 L171.625 85.9375 L171.875 85.375 L170.6875 84.625 L171.4375 84.1875 L171.1875 83.75 L171.4375 83.4375 L172.1875 83.375 L171.5 83.0 L171.8125 82.8125 L171.3125 82.625 L171.5625 82.4375 L171.375 82.25 L172.5 82.3125 L172.9375 82.0 L174.375 81.8125 L174.5625 81.4375 L177.1875 80.5625 L178.375 80.625 L178.6875 81.375 L178.5 81.8125 L178.625 82.0625 L179.3125 82.0 L179.25 81.75 L179.5625 82.3125 L179.625 82.0 L180.4375 82.125 L180.0625 82.625 L180.25 82.875 L180.9375 82.8125 L182.625 81.625 L182.4375 82.1875 L183.375 83.0625 L184.9375 86.0 L185.375 85.375 L185.9375 86.0 L187.375 85.6875 L188.0 86.5625 L188.4375 86.75 L188.625 87.25 L189.3125 87.375 L189.6875 87.0625 L189.625 87.25 L190.125 87.8125 L190.4375 87.75 L193.625 85.9375 L195.0625 86.1875 L195.3125 86.8125 L197.25 87.125 L197.875 86.5 L197.5625 85.6875 L198.375 84.375 L200.6875 85.3125 L200.75 86.1875 L201.1875 86.5 L203.875 86.4375 L204.8125 86.875 L204.75 87.1875 L205.1875 87.5625 L206.8125 87.75 L208.4375 87.25 L209.3125 86.5 L211.0 87.0 L211.8125 87.375 L212.75 86.8125 L212.875 86.4375 L212.75 86.375 L213.875 84.4375 L213.8125 83.9375 L213.375 83.6875 L213.9375 83.0625 L215.75 82.75 L217.6875 83.6875 L218.75 86.5625 L218.6875 87.0625 L220.9375 88.0625 L220.8125 88.3125 L221.125 89.3125 L222.25 89.3125 L222.625 88.875 L223.8125 88.6875 L223.8125 89.3125 L223.4375 89.6875 L223.1875 90.8125 L222.6875 91.9375 L221.75 91.75 L221.125 92.25 L221.375 93.6875 L221.25 94.125 L220.75 94.3125 L220.875 94.625 L220.9375 94.75 L220.9375 94.375 L221.3125 94.5 L221.75 93.75 L221.9375 93.75 L221.8125 94.0 L222.125 93.8125 L222.0625 94.1875 L222.6875 94.375 L224.0625 93.5625 L227.6875 88.5 L227.875 86.9375 L228.0625 86.75 L227.875 86.0625 L228.625 84.3125 L228.0625 83.25 L228.4375 83.4375 L228.5625 83.0625 L227.375 81.8125 L226.5625 81.8125 L226.5 82.1875 L225.625 82.75 L226.0625 82.25 L225.625 82.0625 L225.9375 81.8125 L225.5625 81.9375 L225.4375 82.0 L225.625 82.125 L225.5625 82.375 L225.25 82.5 L225.3125 81.375 L224.5 81.5 L224.125 81.125 L227.9375 77.3125 L228.0625 76.8125 L229.0625 75.625 L230.375 75.1875 L233.875 75.4375 L233.75 75.0625 L234.375 74.6875 L236.3125 75.4375 L235.4375 75.5625 L235.625 75.9375 L236.6875 75.875 L237.0625 75.4375 L238.0625 75.5625 L238.375 75.25 L237.5625 75.125 L237.6875 74.5 L240.0 71.6875 L241.25 71.5 L241.4375 71.9375 L242.0 71.5 L241.625 72.5 L241.625 73.0 L242.0625 72.875 L241.875 73.5 L243.5 71.875 L244.125 71.9375 L243.875 71.6875 L244.125 70.5625 L244.875 70.3125 L245.8125 70.6875 L244.6875 71.0 L244.375 73.0625 L243.125 73.75 L240.5 77.0625 L239.4375 77.4375 L239.625 77.875 L238.875 78.875 L238.625 80.625 L239.4375 85.8125 L240.5625 84.625 L240.8125 83.5 L240.6875 83.375 L241.8125 83.3125 L241.625 82.75 L241.8125 82.0 L243.25 81.25 L243.0 80.375 L243.25 79.625 L243.625 79.375 L243.5 79.1875 L244.0 79.0625 L243.6875 79.5 L244.1875 79.4375 L244.0625 78.75 L243.75 78.6875 L243.75 77.9375 L244.0625 77.3125 L243.625 77.1875 L243.4375 77.5 L243.1875 77.0 L243.9375 75.75 L243.8125 75.5625 L244.0625 75.6875 L244.0625 74.9375 L244.375 74.25 L244.75 74.5625 L244.9375 74.1875 L245.1875 74.625 L245.4375 74.375 L245.3125 74.1875 L246.3125 73.625 L246.125 74.625 L246.8125 73.875 L248.3125 73.4375 L249.0625 74.5 L249.375 73.75 L251.0 72.4375 L250.8125 72.25 L254.0625 70.5 L253.875 70.0625 L255.3125 71.0 L255.375 70.875 L255.375 69.3125 L255.125 68.9375 L255.0625 69.25 L254.75 69.0 L255.125 68.875 L254.8125 67.8125 L254.3125 67.75 L254.1875 67.0 L252.0625 67.125 L254.0625 66.9375 L253.375 66.5625 L253.8125 66.5 L254.3125 67.0625 L255.125 67.125 L254.9375 67.3125 L255.375 67.0 L255.375 58.9375 L253.25 57.5 L251.1875 57.75 L249.25 57.0 L249.3125 57.75 L249.0 58.125 L249.3125 58.1875 L249.625 59.25 L249.3125 59.8125 L247.6875 58.8125 L247.3125 57.75 L246.6875 58.3125 L244.625 57.75 L242.8125 58.5625 L242.875 59.5 L242.6875 59.75 L242.8125 59.375 L242.4375 59.125 L242.5 58.125 L241.5625 57.625 L241.8125 56.4375 L241.125 55.4375 L238.875 54.9375 L236.5 55.5 L235.875 55.1875 L236.1875 55.1875 L235.6875 54.375 L234.6875 54.6875 L235.125 54.0625 L233.8125 53.6875 L234.75 53.1875 L234.0625 52.375 L232.625 52.1875 L231.875 53.375 L231.3125 53.6875 L231.0625 53.625 L231.25 53.3125 L231.0625 53.0 L231.6875 53.0625 L231.5625 52.75 L231.625 52.4375 L231.5625 52.375 L231.625 52.3125 L231.75 52.4375 L231.8125 52.75 L232.0625 52.625 L231.8125 52.875 L231.8125 53.25 L232.5 52.1875 L231.1875 52.3125 L230.6875 52.5 L230.5 52.3125 L232.4375 52.125 L228.0625 50.8125 L228.3125 51.5625 L226.875 52.375 L227.6875 52.4375 L227.0625 53.0625 L227.5 54.0625 L226.1875 53.875 L226.0 54.3125 L226.3125 54.5625 L226.0 54.9375 L224.625 53.75 L223.0625 54.1875 L222.375 53.0625 L221.8125 54.5 L222.0 54.6875 L221.25 55.75 L219.625 53.8125 L220.125 53.5625 L219.8125 52.9375 L219.875 53.375 L219.5 53.4375 L218.75 52.125 L218.125 52.0 L218.5625 53.125 L218.4375 54.3125 L218.375 53.25 L217.875 52.125 L217.6875 52.3125 L216.6875 51.4375 L214.6875 50.625 L213.1875 50.6875 L212.1875 50.0 L212.625 49.375 L212.375 49.125 L208.6875 49.3125 L209.0625 49.6875 L208.75 49.9375 L208.75 50.625 L208.4375 50.9375 L208.6875 50.625 L208.6875 49.75 L208.25 48.125 L207.8125 48.8125 L207.0625 48.125 L207.3125 47.9375 L206.375 48.0 L205.875 48.625 L206.875 48.8125 L203.625 50.125 L202.8125 51.125 L204.1875 49.0625 L204.9375 48.875 L208.875 44.25 L207.875 43.0 L208.6875 43.875 L209.0 43.0 L208.5 41.75 L208.0625 42.4375 L208.1875 41.5625 L207.0 40.25 L203.6875 41.0 L204.4375 39.75 L202.0625 39.1875 L203.5625 38.3125 L202.125 37.3125 L201.3125 37.4375 L199.6875 39.875 L200.0 40.25 L199.75 40.875 L200.6875 41.4375 L198.25 41.0625 L199.0 42.25 L198.9375 42.4375 M208.4375 50.9375 L209.125 51.5 L208.5 51.25 L208.4375 50.9375 M198.9375 42.4375 L198.5 43.8125 L199.25 44.9375 L198.4375 43.8125 L198.9375 42.4375 M189.0625 49.375 L189.6875 50.5625 L189.0 49.4375 L189.0625 49.375 M226.5 82.1875 L226.4375 82.8125 L226.3125 82.75 L226.5 82.1875 M186.4375 56.0625 L186.5625 56.875 L186.375 56.125 L186.4375 56.0625 M189.8125 48.8125 L189.6875 49.0625 L189.4375 49.125 L189.8125 48.8125 M166.125 59.5 L166.8125 59.3125 L166.25 59.375 L166.125 59.5 M204.5625 35.625 L203.75 35.8125 L204.375 36.0625 L204.5625 35.625 M194.5625 35.4375 L194.5 35.5625 L194.6875 35.6875 L194.5625 35.4375 M203.6875 35.0625 L203.375 35.5 L203.9375 35.1875 L203.6875 35.0625 M200.1875 31.3125 L199.8125 32.4375 L200.25 32.6875 L199.75 32.75 L199.9375 33.5625 L199.375 33.5625 L198.625 36.125 L202.9375 34.25 L201.9375 32.125 L200.8125 33.25 L201.25 31.375 L200.1875 31.3125 M194.125 31.0625 L193.8125 31.125 L194.0 31.1875 L194.125 31.0625 M193.75 31.0 L193.3125 31.0625 L193.625 31.1875 L193.75 31.0 M199.125 31.0 L199.0 31.0625 L199.0625 31.125 L199.125 31.0 M192.5625 30.5625 L193.0625 30.9375 L192.8125 30.625 L192.5625 30.5625 M182.0625 30.1875 L182.1875 30.3125 L183.1875 30.6875 L182.0625 30.1875 M192.8125 29.875 L193.1875 30.125 L193.3125 30.0625 L192.8125 29.875 M169.75 28.9375 L169.4375 29.0625 L169.9375 29.1875 L169.75 28.9375 M195.0625 28.6875 L194.8125 28.6875 L194.8125 28.875 L195.0625 28.6875 M164.4375 28.5625 L163.5625 28.875 L164.625 29.0 L164.4375 28.5625 M193.6875 29.8125 L194.6875 29.1875 L192.8125 28.5 L192.625 28.5 L193.6875 29.8125 M170.5625 28.4375 L169.8125 28.625 L170.25 29.0625 L170.5625 28.4375 M163.25 28.4375 L163.0625 28.5 L163.3125 28.5625 L163.25 28.4375 M163.75 28.125 L163.25 28.125 L163.5625 28.5 L163.75 28.125 M197.4375 28.0625 L195.9375 28.25 L195.75 28.6875 L195.5 28.3125 L195.0 29.125 L195.3125 29.5 L194.0 30.5 L194.75 30.3125 L194.625 30.9375 L195.0625 30.875 L195.375 32.3125 L197.1875 33.1875 L199.0625 32.8125 L198.4375 31.5625 L198.875 31.5 L199.125 29.4375 L198.0625 28.5 L197.125 29.9375 L197.6875 28.4375 L197.4375 28.0625 M167.5 27.5 L167.0 27.6875 L167.1875 27.8125 L167.5 27.5 M166.125 27.5 L165.125 27.625 L166.3125 27.6875 L166.125 27.5 M166.6875 27.5 L166.5 27.5 L166.5625 27.875 L166.6875 27.5 M168.625 27.3125 L167.625 28.3125 L168.5625 28.4375 L168.625 27.3125 M167.375 26.9375 L167.125 27.0 L167.25 27.1875 L167.375 26.9375 M167.75 26.9375 L167.6875 27.0625 L168.0625 27.125 L167.75 26.9375 M167.0 26.875 L166.6875 27.0625 L166.875 27.125 L167.0 26.875 M169.25 26.6875 L168.5 26.75 L169.0625 28.3125 L170.125 27.375 L169.25 26.6875 M166.75 26.625 L166.25 26.75 L166.625 27.0 L166.75 26.625 M167.125 26.375 L166.875 26.5 L167.25 26.6875 L167.125 26.375 M166.0 26.0625 L165.75 26.125 L166.0 26.6875 L166.0 26.0625 M169.875 26.0 L169.625 26.1875 L169.8125 26.25 L169.875 26.0 M169.25 26.0 L168.6875 26.1875 L169.125 26.4375 L169.25 26.0 M168.375 25.625 L167.4375 25.75 L168.5 25.8125 L168.375 25.625 M162.0625 25.3125 L159.875 26.125 L160.75 26.3125 L160.75 26.9375 L161.75 26.25 L161.625 25.9375 L161.9375 25.5 L162.6875 26.0 L162.0625 25.3125 M172.25 25.25 L170.125 26.0 L171.4375 27.0625 L172.25 25.25 M167.4375 25.125 L166.375 25.25 L167.8125 25.375 L167.4375 25.125 M169.8125 24.875 L169.125 25.3125 L169.9375 25.375 L169.8125 24.875 M163.875 24.875 L162.8125 25.625 L163.3125 25.6875 L163.0 26.5625 L161.6875 26.875 L162.25 27.375 L161.125 27.5 L162.375 28.375 L162.9375 28.0 L162.5625 27.5 L162.6875 27.1875 L164.8125 25.6875 L163.625 25.125 L163.875 24.875 M184.875 24.625 L184.1875 25.1875 L185.1875 24.75 L184.875 24.625 M169.125 24.25 L169.625 24.625 L169.75 24.3125 L169.125 24.25 M164.25 23.9375 L163.8125 24.0 L164.0 24.1875 L164.25 23.9375 M168.0 23.9375 L167.875 24.0 L169.4375 24.8125 L168.0 23.9375 M169.625 23.9375 L169.8125 24.0625 L169.8125 24.0 L169.625 23.9375 M166.9375 23.9375 L166.6875 24.375 L169.0625 25.375 L166.9375 23.9375 M171.8125 23.9375 L170.6875 24.4375 L171.375 24.8125 L171.8125 23.9375 M169.6875 23.8125 L169.375 23.8125 L169.5625 23.875 L169.6875 23.8125 M191.9375 23.625 L192.875 24.125 L193.125 23.75 L191.9375 23.625 M173.875 23.5625 L172.4375 25.25 L173.75 25.625 L174.5625 24.3125 L173.875 23.5625 M169.3125 23.4375 L168.5 23.6875 L168.9375 23.875 L169.3125 23.4375 M196.25 23.4375 L194.1875 24.4375 L193.75 25.5 L194.375 25.3125 L193.3125 26.8125 L193.875 27.125 L193.0 27.4375 L194.3125 27.4375 L193.4375 28.0625 L194.6875 28.75 L195.4375 28.1875 L197.0625 27.75 L197.25 27.4375 L197.0625 25.9375 L197.6875 25.6875 L196.25 23.4375 M170.5 23.125 L170.9375 23.3125 L171.125 23.1875 L170.5 23.125 M168.875 23.0 L167.4375 23.1875 L169.1875 23.0625 L168.875 23.0 M169.5625 22.875 L170.0 23.125 L170.25 22.9375 L169.5625 22.875 M166.5 22.8125 L166.6875 23.1875 L166.625 22.875 L166.5 22.8125 M169.125 21.9375 L168.375 22.3125 L169.625 22.5 L169.125 21.9375 M169.75 21.625 L169.375 21.6875 L169.5625 21.8125 L169.75 21.625 M171.8125 21.5625 L172.125 21.875 L172.25 21.75 L171.8125 21.5625 M172.625 21.0625 L172.1875 21.25 L173.375 21.3125 L172.625 21.0625 M170.25 20.5625 L169.1875 21.0625 L170.1875 20.875 L170.25 20.5625" stroke-dasharray="" fill="#ffffff" fill-opacity="1.0" stroke="none" stroke-opacity="1.0" stroke-width="0.0px" stroke-linecap="butt" stroke-linejoin="miter" stroke-dashoffset="0.0px"/>
+</g>
 </svg>
\ No newline at end of file

From b4b3f8f90ac061a8bbe073c7d2ab120bacbcf94a Mon Sep 17 00:00:00 2001
From: Artem Pavlenko <artem@mapnik.org>
Date: Mon, 11 Sep 2017 15:29:37 +0100
Subject: [PATCH 15/22] fix typos

---
 test/image.svg.test.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/image.svg.test.js b/test/image.svg.test.js
index 7291e7cfb9..c09fec51a2 100644
--- a/test/image.svg.test.js
+++ b/test/image.svg.test.js
@@ -28,7 +28,7 @@ describe('mapnik.Image SVG', function() {
         }, /SVG error: unable to parse "asdfasdf"/);
         assert.throws(function() {
           mapnik.Image.fromSVGSync('./test/data/SVG_DOES_NOT_EXIST.svg');
-        }, /SVG error: unbale to open "\.\/test\/data\/SVG_DOES_NOT_EXIST\.svg"/);
+        }, /SVG error: unable to open "\.\/test\/data\/SVG_DOES_NOT_EXIST\.svg"/);
         assert.throws(function() {
           mapnik.Image.fromSVGSync('./test/data/vector_tile/tile0.expected-svg.svg', 256);
         }, /optional second arg must be an options object/);
@@ -173,7 +173,7 @@ describe('mapnik.Image SVG', function() {
     it('should err with async non-existent file', function(done) {
       mapnik.Image.fromSVG('./test/data/SVG_DOES_NOT_EXIST.svg', function(err, svg) {
         assert.ok(err);
-        assert.ok(err.message.match(/SVG error: unbale to open "\.\/test\/data\/SVG_DOES_NOT_EXIST\.svg"/));
+        assert.ok(err.message.match(/SVG error: unable to open "\.\/test\/data\/SVG_DOES_NOT_EXIST\.svg"/));
         assert.equal(svg, undefined);
         done();
       });

From ccdf67e4e17472082d8c7bbbbd1a1a7b4a83db3e Mon Sep 17 00:00:00 2001
From: Artem Pavlenko <artem@mapnik.org>
Date: Thu, 14 Sep 2017 16:22:04 +0100
Subject: [PATCH 16/22] use latest geometry + wagyu

---
 deps/geometry | 2 +-
 deps/wagyu    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/deps/geometry b/deps/geometry
index b0d64e6e8d..b0e41cc563 160000
--- a/deps/geometry
+++ b/deps/geometry
@@ -1 +1 @@
-Subproject commit b0d64e6e8d55026781325df1068e8043ff880aff
+Subproject commit b0e41cc5635ff8d50e7e1edb73cadf1d2a7ddc83
diff --git a/deps/wagyu b/deps/wagyu
index 82ee129399..0ff3b5f829 160000
--- a/deps/wagyu
+++ b/deps/wagyu
@@ -1 +1 @@
-Subproject commit 82ee12939927cdd4e4104a047e4de4b9425882b7
+Subproject commit 0ff3b5f82908af45f32266b8cb5f107c86147d87

From e1353c5fd36437685fdbd62792d93712847c74b6 Mon Sep 17 00:00:00 2001
From: Artem Pavlenko <artem@mapnik.org>
Date: Fri, 22 Sep 2017 13:22:59 +0200
Subject: [PATCH 17/22] use 'closest_point' algorithm + update tests

---
 src/mapnik_vector_tile.cpp     | 176 ++-------------------------------
 test/vector-tile.query.test.js |  12 +--
 2 files changed, 15 insertions(+), 173 deletions(-)

diff --git a/src/mapnik_vector_tile.cpp b/src/mapnik_vector_tile.cpp
index 49b1e791aa..f95654fbfc 100644
--- a/src/mapnik_vector_tile.cpp
+++ b/src/mapnik_vector_tile.cpp
@@ -30,6 +30,7 @@
 #include <mapnik/geometry/is_simple.hpp>
 #include <mapnik/geometry/is_valid.hpp>
 #include <mapnik/geometry/reprojection.hpp>
+#include <mapnik/geometry/closest_point.hpp>
 #include <mapnik/geom_util.hpp>
 #include <mapnik/hit_test_filter.hpp>
 #include <mapnik/image_any.hpp>
@@ -64,167 +65,10 @@
 // protozero
 #include <protozero/pbf_reader.hpp>
 
-namespace detail
+mapnik::geometry::closest_point_result path_to_point_distance(mapnik::geometry::geometry<double> const& geom, double x, double y)
 {
-
-struct p2p_result
-{
-    explicit p2p_result() :
-      distance(-1),
-      x_hit(0),
-      y_hit(0) {}
-
-    double distance;
-    double x_hit;
-    double y_hit;
-};
-
-struct p2p_distance
-{
-    p2p_distance(double x, double y)
-     : x_(x),
-       y_(y) {}
-
-    p2p_result operator() (mapnik::geometry::geometry_empty const& ) const
-    {
-        p2p_result p2p;
-        return p2p;
-    }
-
-    p2p_result operator() (mapnik::geometry::point<double> const& geom) const
-    {
-        p2p_result p2p;
-        p2p.x_hit = geom.x;
-        p2p.y_hit = geom.y;
-        p2p.distance = mapnik::distance(geom.x, geom.y, x_, y_);
-        return p2p;
-    }
-    p2p_result operator() (mapnik::geometry::multi_point<double> const& geom) const
-    {
-        p2p_result p2p;
-        for (auto const& pt : geom)
-        {
-            p2p_result p2p_sub = operator()(pt);
-            if (p2p_sub.distance >= 0 && (p2p.distance < 0 || p2p_sub.distance < p2p.distance))
-            {
-                p2p.x_hit = p2p_sub.x_hit;
-                p2p.y_hit = p2p_sub.y_hit;
-                p2p.distance = p2p_sub.distance;
-            }
-        }
-        return p2p;
-    }
-    p2p_result operator() (mapnik::geometry::line_string<double> const& geom) const
-    {
-        p2p_result p2p;
-        auto num_points = geom.size();
-        if (num_points > 1)
-        {
-            for (std::size_t i = 1; i < num_points; ++i)
-            {
-                auto const& pt0 = geom[i-1];
-                auto const& pt1 = geom[i];
-                double dist = mapnik::point_to_segment_distance(x_,y_,pt0.x,pt0.y,pt1.x,pt1.y);
-                if (dist >= 0 && (p2p.distance < 0 || dist < p2p.distance))
-                {
-                    p2p.x_hit = pt0.x;
-                    p2p.y_hit = pt0.y;
-                    p2p.distance = dist;
-                }
-            }
-        }
-        return p2p;
-    }
-    p2p_result operator() (mapnik::geometry::multi_line_string<double> const& geom) const
-    {
-        p2p_result p2p;
-        for (auto const& line: geom)
-        {
-            p2p_result p2p_sub = operator()(line);
-            if (p2p_sub.distance >= 0 && (p2p.distance < 0 || p2p_sub.distance < p2p.distance))
-            {
-                p2p.x_hit = p2p_sub.x_hit;
-                p2p.y_hit = p2p_sub.y_hit;
-                p2p.distance = p2p_sub.distance;
-            }
-        }
-        return p2p;
-    }
-    p2p_result operator() (mapnik::geometry::polygon<double> const& poly) const
-    {
-        p2p_result p2p;
-        std::size_t num_rings = poly.size();
-        bool inside = false;
-        for (std::size_t ring_index = 0; ring_index < num_rings; ++ring_index)
-        {
-            auto const& ring = poly[ring_index];
-            auto num_points = ring.size();
-            if (num_points < 4)
-            {
-                if (ring_index == 0) // exterior
-                    return p2p;
-                else // interior
-                    continue;
-            }
-            for (std::size_t index = 1; index < num_points; ++index)
-            {
-                auto const& pt0 = ring[index - 1];
-                auto const& pt1 = ring[index];
-                // todo - account for tolerance
-                if (mapnik::detail::pip(pt0.x, pt0.y, pt1.x, pt1.y, x_,y_))
-                {
-                    inside = !inside;
-                }
-            }
-            if (ring_index == 0 && !inside) return p2p;
-        }
-        if (inside) p2p.distance = 0;
-        return p2p;
-    }
-
-    p2p_result operator() (mapnik::geometry::multi_polygon<double> const& geom) const
-    {
-        p2p_result p2p;
-        for (auto const& poly: geom)
-        {
-            p2p_result p2p_sub = operator()(poly);
-            if (p2p_sub.distance >= 0 && (p2p.distance < 0 || p2p_sub.distance < p2p.distance))
-            {
-                p2p.x_hit = p2p_sub.x_hit;
-                p2p.y_hit = p2p_sub.y_hit;
-                p2p.distance = p2p_sub.distance;
-            }
-        }
-        return p2p;
-    }
-    p2p_result operator() (mapnik::geometry::geometry_collection<double> const& collection) const
-    {
-        // There is no current way that a geometry collection could be returned from a vector tile.
-        /* LCOV_EXCL_START */
-        p2p_result p2p;
-        for (auto const& geom: collection)
-        {
-            p2p_result p2p_sub = mapnik::util::apply_visitor((*this),geom);
-            if (p2p_sub.distance >= 0 && (p2p.distance < 0 || p2p_sub.distance < p2p.distance))
-            {
-                p2p.x_hit = p2p_sub.x_hit;
-                p2p.y_hit = p2p_sub.y_hit;
-                p2p.distance = p2p_sub.distance;
-            }
-        }
-        return p2p;
-        /* LCOV_EXCL_STOP */
-    }
-
-    double x_;
-    double y_;
-};
-
-}
-
-detail::p2p_result path_to_point_distance(mapnik::geometry::geometry<double> const& geom, double x, double y)
-{
-    return mapnik::util::apply_visitor(detail::p2p_distance(x,y), geom);
+    mapnik::geometry::point<double> pt(x, y);
+    return mapnik::geometry::closest_point(geom, pt);
 }
 
 Nan::Persistent<v8::FunctionTemplate> VectorTile::constructor;
@@ -1700,7 +1544,7 @@ std::vector<query_result> VectorTile::_query(VectorTile* d, double lon, double l
                 {
                     auto const& geom = feature->get_geometry();
                     auto p2p = path_to_point_distance(geom,x,y);
-                    if (!tr.backward(p2p.x_hit,p2p.y_hit,z))
+                    if (!tr.backward(p2p.x, p2p.y, z))
                     {
                         /* LCOV_EXCL_START */
                         throw std::runtime_error("could not reproject lon/lat to mercator");
@@ -1709,8 +1553,8 @@ std::vector<query_result> VectorTile::_query(VectorTile* d, double lon, double l
                     if (p2p.distance >= 0 && p2p.distance <= tolerance)
                     {
                         query_result res;
-                        res.x_hit = p2p.x_hit;
-                        res.y_hit = p2p.y_hit;
+                        res.x_hit = p2p.x;
+                        res.y_hit = p2p.y;
                         res.distance = p2p.distance;
                         res.layer = layer_name;
                         res.feature = feature;
@@ -1739,7 +1583,7 @@ std::vector<query_result> VectorTile::_query(VectorTile* d, double lon, double l
                 {
                     auto const& geom = feature->get_geometry();
                     auto p2p = path_to_point_distance(geom,x,y);
-                    if (!tr.backward(p2p.x_hit,p2p.y_hit,z))
+                    if (!tr.backward(p2p.x, p2p.y ,z))
                     {
                         /* LCOV_EXCL_START */
                         throw std::runtime_error("could not reproject lon/lat to mercator");
@@ -1748,8 +1592,8 @@ std::vector<query_result> VectorTile::_query(VectorTile* d, double lon, double l
                     if (p2p.distance >= 0 && p2p.distance <= tolerance)
                     {
                         query_result res;
-                        res.x_hit = p2p.x_hit;
-                        res.y_hit = p2p.y_hit;
+                        res.x_hit = p2p.x;
+                        res.y_hit = p2p.y;
                         res.distance = p2p.distance;
                         res.layer = ds->get_name();
                         res.feature = feature;
diff --git a/test/vector-tile.query.test.js b/test/vector-tile.query.test.js
index bbe23350ac..f39e66eec0 100644
--- a/test/vector-tile.query.test.js
+++ b/test/vector-tile.query.test.js
@@ -63,9 +63,9 @@ describe('mapnik.VectorTile query polygon', function() {
             assert.equal(JSON.parse(features[0].toJSON()).properties.NAME,'Japan');
             assert.equal(features[0].id(),89);
             assert.equal(features[0].geometry().type(),mapnik.Geometry.Polygon);
-            assert.equal(features[0].distance,0);
-            assert.equal(features[0].x_hit,0);
-            assert.equal(features[0].y_hit,0);
+            assert.equal(features[0].distance, 0);
+            assert.equal(features[0].x_hit, 139.6142578125);
+            assert.equal(features[0].y_hit, 37.17782559332976);
             assert.equal(features[0].layer,'world');
             assert.equal(JSON.parse(features[1].toJSON()).properties.NAME,'Japan');
             assert.equal(features[1].id(),89);
@@ -75,8 +75,7 @@ describe('mapnik.VectorTile query polygon', function() {
         }
     });
 
-    it('query polygon + tolerance (noop)', function(done) {
-        // tolerance only applies to points and lines currently in mapnik::hit_test
+    it('query polygon + tolerance', function(done) {
         check(vtile.query(142.3388671875,39.52099229357195,{tolerance:100000000000000}));
         vtile.query(142.3388671875,39.52099229357195,{tolerance:100000000000000}, function(err, features) {
             assert.ifError(err);
@@ -84,7 +83,7 @@ describe('mapnik.VectorTile query polygon', function() {
             done();
         });
         function check(features) {
-            assert.equal(features.length,0);
+            assert.equal(features.length, 2);
         }
     });
     // restrict to single layer
@@ -663,4 +662,3 @@ describe('mapnik.VectorTile query xy single features', function() {
         done();
     });
 });
-

From 8636e640bd586b9bf0c7cda856849cff50a45769 Mon Sep 17 00:00:00 2001
From: Artem Pavlenko <artem@mapnik.org>
Date: Fri, 22 Sep 2017 16:53:18 +0200
Subject: [PATCH 18/22] update mapnik version

---
 package.json | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/package.json b/package.json
index 7634aea184..546de4a6ab 100644
--- a/package.json
+++ b/package.json
@@ -4,8 +4,8 @@
   "url": "http://github.com/mapnik/node-mapnik",
   "homepage": "http://mapnik.org",
   "author": "Dane Springmeyer <dane@mapbox.com> (mapnik.org)",
-  "version": "3.6.2-dev-f64c757",
-  "mapnik_version":"f64c757",
+  "version": "3.7.0-dev-304cce8ef",
+  "mapnik_version": "304cce8ef",
   "main": "./lib/mapnik.js",
   "binary": {
     "module_name": "mapnik",
@@ -42,10 +42,10 @@
     "node-pre-gyp": "~0.6.30"
   },
   "bundledDependencies": [
-      "node-pre-gyp"
+    "node-pre-gyp"
   ],
   "bin": {
-    "mapnik-index.js": "./bin/mapnik-index.js", 
+    "mapnik-index.js": "./bin/mapnik-index.js",
     "mapnik-inspect.js": "./bin/mapnik-inspect.js",
     "mapnik-render.js": "./bin/mapnik-render.js",
     "mapnik-shapeindex.js": "./bin/mapnik-shapeindex.js"

From 2a0f89883ec321a906fef9d5c0a5a6132b52fce6 Mon Sep 17 00:00:00 2001
From: Artem Pavlenko <artem@mapnik.org>
Date: Mon, 25 Sep 2017 16:04:47 +0200
Subject: [PATCH 19/22] update mapnik version

---
 install_mason.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/install_mason.sh b/install_mason.sh
index d641497d1c..3d2afa3e94 100755
--- a/install_mason.sh
+++ b/install_mason.sh
@@ -12,7 +12,7 @@ ICU_VERSION="57.1"
 
 if [ ! -f ./mason/mason.sh ]; then
     mkdir -p ./mason
-    curl -sSfL https://github.com/mapbox/mason/archive/23fe28bc578667fc81f4d6e3479ab4ffb4702b77.tar.gz | tar --gunzip --extract --strip-components=1 --exclude="*md" --exclude="test*" --directory=./mason
+    curl -sSfL https://github.com/mapbox/mason/archive/3de3daf257ed50dc06b442fe64ec2bfcce1484af.tar.gz | tar --gunzip --extract --strip-components=1 --exclude="*md" --exclude="test*" --directory=./mason
 fi
 
 if [ ! -f ./mason_packages/.link/bin/mapnik-config ]; then
@@ -38,5 +38,5 @@ if [ ! -f ./mason_packages/.link/bin/mapnik-config ]; then
     # NOTE: sync this version with the `mapnik_version` in package.json (which is used for windows builds)
     # In the future we could pull from that version automatically if mason were to support knowing the right dep
     # versions to install automatically. Until then there is not much point since the deps are still hardcoded here.
-    install mapnik f64c757
+    install mapnik 304cce8ef
 fi

From 98a03eda487d311a55c642091e75f1fba59037f8 Mon Sep 17 00:00:00 2001
From: Artem Pavlenko <artem@mapnik.org>
Date: Mon, 25 Sep 2017 17:07:44 +0200
Subject: [PATCH 20/22] fix SHA

---
 install_mason.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/install_mason.sh b/install_mason.sh
index 3d2afa3e94..201266c4b8 100755
--- a/install_mason.sh
+++ b/install_mason.sh
@@ -12,7 +12,7 @@ ICU_VERSION="57.1"
 
 if [ ! -f ./mason/mason.sh ]; then
     mkdir -p ./mason
-    curl -sSfL https://github.com/mapbox/mason/archive/3de3daf257ed50dc06b442fe64ec2bfcce1484af.tar.gz | tar --gunzip --extract --strip-components=1 --exclude="*md" --exclude="test*" --directory=./mason
+    curl -sSfL https://github.com/mapbox/mason/archive/841eedd6e3ed2b53e16e630fac8918257b6a5fd7.tar.gz | tar --gunzip --extract --strip-components=1 --exclude="*md" --exclude="test*" --directory=./mason
 fi
 
 if [ ! -f ./mason_packages/.link/bin/mapnik-config ]; then

From 786fc90c3f6e75c5571806bdedeb1b6fb75a59ad Mon Sep 17 00:00:00 2001
From: Artem Pavlenko <artem@mapnik.org>
Date: Fri, 29 Sep 2017 11:26:30 +0200
Subject: [PATCH 21/22] Use new Map object to avoid duplicate layer names.

---
 test/map.test.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/test/map.test.js b/test/map.test.js
index b1ecb17a9b..8fd61b5dfb 100644
--- a/test/map.test.js
+++ b/test/map.test.js
@@ -195,7 +195,8 @@ describe('mapnik.Map', function() {
         assert.throws(function() { map.loadSync('./test/stylesheet.xml', {strict: 12 }); });
         assert.throws(function() { map.loadSync('./test/stylesheet.xml', {base: 12 }); });
         assert.throws(function() { map.loadSync('./test/stylesheet.xml', {base: '/DOESNOTEXIST' }); });
-
+        // replace map with the new one
+        map = new mapnik.Map(600,400);
         // Test loading a sample world map
         map.loadSync('./test/stylesheet.xml');
 

From be1ca765957b315999fc8a6e4cae78ee488f1963 Mon Sep 17 00:00:00 2001
From: Artem Pavlenko <artem@mapnik.org>
Date: Wed, 11 Oct 2017 13:06:04 +0200
Subject: [PATCH 22/22] remove redundant checks via  warning: comparison of
 unsigned enum expression < 0 is always false      
 [-Wtautological-unsigned-enum-zero-compare]

---
 src/mapnik_map.cpp         | 2 +-
 src/mapnik_vector_tile.cpp | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/mapnik_map.cpp b/src/mapnik_map.cpp
index da81afab6e..2434023147 100644
--- a/src/mapnik_map.cpp
+++ b/src/mapnik_map.cpp
@@ -2057,7 +2057,7 @@ NAN_METHOD(Map::render)
                     return;
                 }
                 closure->fill_type = static_cast<mapnik::vector_tile_impl::polygon_fill_type>(param_val->IntegerValue());
-                if (closure->fill_type < 0 || closure->fill_type >= mapnik::vector_tile_impl::polygon_fill_type_max)
+                if (closure->fill_type >= mapnik::vector_tile_impl::polygon_fill_type_max)
                 {
                     delete closure;
                     Nan::ThrowTypeError("optional arg 'fill_type' out of possible range");
diff --git a/src/mapnik_vector_tile.cpp b/src/mapnik_vector_tile.cpp
index f95654fbfc..73b650c0b8 100644
--- a/src/mapnik_vector_tile.cpp
+++ b/src/mapnik_vector_tile.cpp
@@ -452,7 +452,7 @@ v8::Local<v8::Value> VectorTile::_compositeSync(Nan::NAN_METHOD_ARGS_TYPE info)
                 return scope.Escape(Nan::Undefined());
             }
             fill_type = static_cast<mapnik::vector_tile_impl::polygon_fill_type>(ft->IntegerValue());
-            if (fill_type < 0 || fill_type >= mapnik::vector_tile_impl::polygon_fill_type_max)
+            if (fill_type >= mapnik::vector_tile_impl::polygon_fill_type_max)
             {
                 Nan::ThrowTypeError("optional arg 'fill_type' out of possible range");
                 return scope.Escape(Nan::Undefined());
@@ -826,7 +826,7 @@ NAN_METHOD(VectorTile::composite)
                 return;
             }
             fill_type = static_cast<mapnik::vector_tile_impl::polygon_fill_type>(ft->IntegerValue());
-            if (fill_type < 0 || fill_type >= mapnik::vector_tile_impl::polygon_fill_type_max)
+            if (fill_type >= mapnik::vector_tile_impl::polygon_fill_type_max)
             {
                 Nan::ThrowTypeError("optional arg 'fill_type' out of possible range");
                 return;
@@ -3079,7 +3079,7 @@ NAN_METHOD(VectorTile::addGeoJSON)
                 return;
             }
             fill_type = static_cast<mapnik::vector_tile_impl::polygon_fill_type>(ft->IntegerValue());
-            if (fill_type < 0 || fill_type >= mapnik::vector_tile_impl::polygon_fill_type_max)
+            if (fill_type >= mapnik::vector_tile_impl::polygon_fill_type_max)
             {
                 Nan::ThrowTypeError("optional arg 'fill_type' out of possible range");
                 return;
