mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-06 02:15:41 +02:00
If reading from standard input, use the .mbtiles as default layer name
This commit is contained in:
@@ -491,6 +491,10 @@ next_feature:
|
|||||||
if (cp != NULL) {
|
if (cp != NULL) {
|
||||||
*cp = '\0';
|
*cp = '\0';
|
||||||
}
|
}
|
||||||
|
cp = strstr(trunc, ".mbtiles");
|
||||||
|
if (cp != NULL) {
|
||||||
|
*cp = '\0';
|
||||||
|
}
|
||||||
layername = trunc;
|
layername = trunc;
|
||||||
|
|
||||||
char *out = trunc;
|
char *out = trunc;
|
||||||
@@ -615,7 +619,7 @@ int main(int argc, char **argv) {
|
|||||||
fprintf(stderr, "%s: Only accepts one input file\n", argv[0]);
|
fprintf(stderr, "%s: Only accepts one input file\n", argv[0]);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
} else {
|
} else {
|
||||||
read_json(stdin, name ? name : "standard input", layer, maxzoom, minzoom, outdb, &exclude);
|
read_json(stdin, name ? name : outdir, layer, maxzoom, minzoom, outdb, &exclude);
|
||||||
}
|
}
|
||||||
|
|
||||||
mbtiles_close(outdb, argv);
|
mbtiles_close(outdb, argv);
|
||||||
|
|||||||
Reference in New Issue
Block a user