topojson grammar - add optional bbox element which is omitted
This commit is contained in:
parent
b2c3598f8d
commit
a6f0c30a74
1 changed files with 8 additions and 2 deletions
|
@ -113,13 +113,15 @@ topojson_grammar<Iterator, ErrorHandler>::topojson_grammar()
|
|||
;
|
||||
|
||||
geometry_collection = lit('{')
|
||||
>> lit("\"type\"") >> lit(':') >> lit("\"GeometryCollection\"") >> lit(',')
|
||||
>> lit("\"geometries\"") >> lit(':') >> lit('[') >> -(geometry[push_back(_r1, _1)] % lit(','))
|
||||
>> lit("\"type\"") >> lit(':') >> lit("\"GeometryCollection\"")
|
||||
>> -(lit(',') >> omit[bbox])
|
||||
>> lit(',') >> lit("\"geometries\"") >> lit(':') >> lit('[') >> -(geometry[push_back(_r1, _1)] % lit(','))
|
||||
>> lit(']')
|
||||
>> lit('}')
|
||||
;
|
||||
point = lit('{')
|
||||
>> lit("\"type\"") >> lit(':') >> lit("\"Point\"")
|
||||
>> -(lit(',') >> omit[bbox])
|
||||
>> ((lit(',') >> lit("\"coordinates\"") >> lit(':') >> coordinate)
|
||||
^ (lit(',') >> properties) /*^ (lit(',') >> omit[id])*/)
|
||||
>> lit('}')
|
||||
|
@ -127,6 +129,7 @@ topojson_grammar<Iterator, ErrorHandler>::topojson_grammar()
|
|||
|
||||
multi_point = lit('{')
|
||||
>> lit("\"type\"") >> lit(':') >> lit("\"MultiPoint\"")
|
||||
>> -(lit(',') >> omit[bbox])
|
||||
>> ((lit(',') >> lit("\"coordinates\"") >> lit(':')
|
||||
>> lit('[') >> -(coordinate % lit(',')) >> lit(']'))
|
||||
^ (lit(',') >> properties) ^ (lit(',') >> omit[id]))
|
||||
|
@ -142,6 +145,7 @@ topojson_grammar<Iterator, ErrorHandler>::topojson_grammar()
|
|||
|
||||
multi_linestring = lit('{')
|
||||
>> lit("\"type\"") >> lit(':') >> lit("\"MultiLineString\"")
|
||||
>> -(lit(',') >> omit[bbox])
|
||||
>> ((lit(',') >> lit("\"arcs\"") >> lit(':') >> lit('[')
|
||||
>> -((lit('[') >> int_ >> lit(']')) % lit(',')) >> lit(']'))
|
||||
^ (lit(',') >> properties) ^ (lit(',') >> omit[id]))
|
||||
|
@ -150,6 +154,7 @@ topojson_grammar<Iterator, ErrorHandler>::topojson_grammar()
|
|||
|
||||
polygon = lit('{')
|
||||
>> lit("\"type\"") >> lit(':') >> lit("\"Polygon\"")
|
||||
>> -(lit(',') >> omit[bbox])
|
||||
>> ((lit(',') >> lit("\"arcs\"") >> lit(':')
|
||||
>> lit('[') >> -(ring % lit(',')) >> lit(']'))
|
||||
^ (lit(',') >> properties) ^ (lit(',') >> omit[id]))
|
||||
|
@ -158,6 +163,7 @@ topojson_grammar<Iterator, ErrorHandler>::topojson_grammar()
|
|||
|
||||
multi_polygon = lit('{')
|
||||
>> lit("\"type\"") >> lit(':') >> lit("\"MultiPolygon\"")
|
||||
>> -(lit(',') >> omit[bbox])
|
||||
>> ((lit(',') >> lit("\"arcs\"") >> lit(':')
|
||||
>> lit('[')
|
||||
>> -((lit('[') >> -(ring % lit(',')) >> lit(']')) % lit(','))
|
||||
|
|
Loading…
Reference in a new issue