mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-05 09:55:41 +02:00
Fix the any-valid-geometries check again
This commit is contained in:
@@ -2264,6 +2264,11 @@ int read_json(int argc, struct source **sourcelist, char *fname, const char *lay
|
|||||||
munmap(map, indexpos);
|
munmap(map, indexpos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (indexpos == 0) {
|
||||||
|
fprintf(stderr, "Did not read any valid geometries\n");
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
/* Copy geometries to a new file in index order */
|
/* Copy geometries to a new file in index order */
|
||||||
|
|
||||||
struct index *index_map = mmap(NULL, indexpos, PROT_READ, MAP_PRIVATE, indexfd, 0);
|
struct index *index_map = mmap(NULL, indexpos, PROT_READ, MAP_PRIVATE, indexfd, 0);
|
||||||
@@ -2301,11 +2306,6 @@ int read_json(int argc, struct source **sourcelist, char *fname, const char *lay
|
|||||||
size[j] = 0;
|
size[j] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (geompos == 0 || metapos == 0) {
|
|
||||||
fprintf(stderr, "did not read any valid geometries\n");
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!quiet) {
|
if (!quiet) {
|
||||||
fprintf(stderr, "%lld features, %lld bytes of geometry, %lld bytes of metadata, %lld bytes of string pool\n", progress_seq, geompos, metapos, poolpos);
|
fprintf(stderr, "%lld features, %lld bytes of geometry, %lld bytes of metadata, %lld bytes of string pool\n", progress_seq, geompos, metapos, poolpos);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user