Pass compound objects through tile-join

This commit is contained in:
Eric Fischer 2018-08-15 16:16:54 -07:00
parent a35c22ea94
commit 3f0cd8bb6d

View File

@ -262,7 +262,12 @@ void handle(std::string message, int z, unsigned x, unsigned y, std::map<std::st
type = mvt_double; type = mvt_double;
} else if (val.type == mvt_null || val.type == mvt_list || val.type == mvt_hash) { } else if (val.type == mvt_null || val.type == mvt_list || val.type == mvt_hash) {
type = mvt_hash; type = mvt_hash;
stringify_val(value, feat, layer, val, feat.tags[t + 1]); if (val.string_value.size() > 0) {
value = val.string_value;
} else {
// XXX catching reference loops disabled
stringify_val(value, feat, layer, val, layer.values.size());
}
} else { } else {
continue; continue;
} }
@ -348,8 +353,11 @@ void handle(std::string message, int z, unsigned x, unsigned y, std::map<std::st
if (fa != attributes.end()) { if (fa != attributes.end()) {
if (fa->second.first.type == mvt_hash) { if (fa->second.first.type == mvt_hash) {
// XXX blake tag if (mvt_format == mvt_blake || mvt_format == mvt_blake_float) {
outlayer.tag_v3(outfeature, k, fa->second.first);
} else {
copy_nested(layer, feat, k, fa->second.first, outlayer, outfeature); copy_nested(layer, feat, k, fa->second.first, outlayer, outfeature);
}
} else { } else {
if (mvt_format == mvt_blake || mvt_format == mvt_blake_float) { if (mvt_format == mvt_blake || mvt_format == mvt_blake_float) {
outlayer.tag_v3(outfeature, k, fa->second.first); outlayer.tag_v3(outfeature, k, fa->second.first);