From d3a9e4c4d70b8b3414bbb6ea41862d6e2ae5f418 Mon Sep 17 00:00:00 2001 From: artemp Date: Tue, 3 Jan 2017 16:17:46 +0100 Subject: [PATCH] revive support for an empty array => geometry_empty RFC 7946 "...GeoJSON processors MAY interpret Geometry objects with empty "coordinates" arrays as null objects." --- include/mapnik/json/positions_grammar_x3_def.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/mapnik/json/positions_grammar_x3_def.hpp b/include/mapnik/json/positions_grammar_x3_def.hpp index ab012c061..7312ee79d 100644 --- a/include/mapnik/json/positions_grammar_x3_def.hpp +++ b/include/mapnik/json/positions_grammar_x3_def.hpp @@ -44,7 +44,7 @@ x3::rule const rings_array("RingsArray"); auto const positions_def = rings_array | rings | ring | point ; auto const point_def = lit('[') > double_ > lit(',') > double_ > omit[*(lit(',') > double_)] > lit(']'); -auto const ring_def = lit('[') >> (point % lit(',') > lit(']')); +auto const ring_def = lit('[') >> -(point % lit(',')) >> lit(']'); auto const rings_def = lit('[') >> (ring % lit(',') > lit(']')); auto const rings_array_def = lit('[') >> (rings % lit(',') > lit(']'));