Factoring out tilestats management from GeoJSON file reading

This commit is contained in:
Erica Fischer
2024-08-21 12:46:21 -07:00
parent 40bb4ff732
commit c91e07aaa6
2 changed files with 82 additions and 49 deletions
+9
View File
@@ -20,6 +20,7 @@ std::string filter;
bool preserve_input_order = false;
std::unordered_map<std::string, attribute_op> attribute_accum;
std::vector<std::string> unidecode_data;
std::string assign_to_bins;
std::set<std::string> keep;
@@ -53,6 +54,7 @@ int main(int argc, char **argv) {
{"line-simplification", required_argument, 0, 'S'},
{"tiny-polygon-size", required_argument, 0, 's' & 0x1F},
{"source-tile", required_argument, 0, 't'},
{"assign-to-bins", required_argument, 0, 'b' & 0x1F},
{0, 0, 0, 0},
};
@@ -119,6 +121,10 @@ int main(int argc, char **argv) {
simplification = atof(optarg);
break;
case 'b' & 0x1F:
assign_to_bins = optarg;
break;
default:
fprintf(stderr, "Unrecognized flag -%c\n", i);
usage(argv);
@@ -128,6 +134,9 @@ int main(int argc, char **argv) {
std::vector<input_tile> its;
int nz, nx, ny;
if (assign_to_bins.size() != 0) {
}
if (outtile == NULL) { // single input
if (argc - optind != 3) {
fprintf(stderr, "Wrong number of arguments\n");