mirror of
https://github.com/mapbox/tippecanoe.git
synced 2025-02-02 01:08:14 +00:00
Fix the any-valid-geometries check again
This commit is contained in:
parent
c9e542e688
commit
7b6cd2d0f4
10
geojson.c
10
geojson.c
@ -2264,6 +2264,11 @@ int read_json(int argc, struct source **sourcelist, char *fname, const char *lay
|
||||
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 */
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
if (geompos == 0 || metapos == 0) {
|
||||
fprintf(stderr, "did not read any valid geometries\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user