From 03daaefd8e02495590e34bdc46ae631d5377f3eb Mon Sep 17 00:00:00 2001 From: Erica Fischer Date: Tue, 17 Dec 2024 15:01:06 -0800 Subject: [PATCH] Add a flag to get the feature ID from the query --- tile-join.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tile-join.cpp b/tile-join.cpp index fcfd1e34..78c2573f 100644 --- a/tile-join.cpp +++ b/tile-join.cpp @@ -58,6 +58,7 @@ std::vector unidecode_data; std::string join_tile_column; std::string join_table_column; std::string join_table; +std::string attribute_for_id; bool want_overzoom = false; int buffer = 5; @@ -279,7 +280,10 @@ void append_tile(std::string message, int z, unsigned x, unsigned y, std::map>(kv.first, std::pair(kv.second, mvt_value_to_serial_val(kv.second)))); key_order.push_back(kv.first); matched = true; @@ -1371,6 +1375,7 @@ int main(int argc, char **argv) { {"join-tile-column", required_argument, 0, '~'}, {"join-table-column", required_argument, 0, '~'}, {"join-table", required_argument, 0, '~'}, + {"use-attribute-for-id", required_argument, 0, '~'}, {"no-tile-size-limit", no_argument, &pk, 1}, {"no-tile-compression", no_argument, &pC, 1}, @@ -1568,6 +1573,8 @@ int main(int argc, char **argv) { join_table_column = optarg; } else if (strcmp(opt, "join-tile-column") == 0) { join_tile_column = optarg; + } else if (strcmp(opt, "use-attribute-for-id") == 0) { + attribute_for_id = optarg; } else { fprintf(stderr, "%s: Unrecognized option --%s\n", argv[0], opt); exit(EXIT_ARGS);