Look up the attribute value for ordering

This commit is contained in:
Erica Fischer
2023-12-18 13:05:15 -08:00
parent 6f3256f5af
commit 56bc73e49a
3 changed files with 25 additions and 19 deletions
+5 -5
View File
@@ -13,7 +13,7 @@ extern int optind;
int detail = 12; // tippecanoe-style: mvt extent == 1 << detail
int buffer = 5; // tippecanoe-style: mvt buffer == extent * buffer / 256;
int multiplier = 1;
std::string filter;
std::string order_by;
std::set<std::string> keep;
@@ -27,7 +27,7 @@ int main(int argc, char **argv) {
int i;
const char *outfile = NULL;
while ((i = getopt(argc, argv, "y:o:d:b:f:m:")) != -1) {
while ((i = getopt(argc, argv, "y:o:d:b:O:m:")) != -1) {
switch (i) {
case 'y':
keep.insert(optarg);
@@ -49,8 +49,8 @@ int main(int argc, char **argv) {
multiplier = atoi(optarg);
break;
case 'f':
filter = optarg;
case 'O':
order_by = optarg;
break;
default:
@@ -101,7 +101,7 @@ int main(int argc, char **argv) {
exit(EXIT_FAILURE);
}
std::string out = overzoom(tile, oz, ox, oy, nz, nx, ny, detail, buffer, keep, true, NULL, multiplier, filter);
std::string out = overzoom(tile, oz, ox, oy, nz, nx, ny, detail, buffer, keep, true, NULL, multiplier, order_by);
fwrite(out.c_str(), sizeof(char), out.size(), f);
fclose(f);