Decode knots and spline degree to JSON if present

This commit is contained in:
Eric Fischer 2018-10-18 17:06:13 -07:00
parent cf81880949
commit cfea072510

@ -519,6 +519,24 @@ void layer_to_geojson(mvt_layer const &layer, unsigned z, unsigned x, unsigned y
attrib_writer.function = write_attributes;
coordinate_writers.push_back(attrib_writer);
}
if (feat.knots.size() != 0) {
state.json_write_string("degree");
state.json_write_number(feat.spline_degree);
state.json_write_string("knots");
state.json_write_array();
size_t here = 0;
while (here < feat.knots.size()) {
mvt_value v = layer.decode_property(feat.knots, here);
here++;
state.json_write_stringified(v.toString());
}
state.json_end_array();
}
}
if (feat.type == VT_POINT) {