mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-02 16:35:40 +02:00
More reorganization to reuse JSON parsing
This commit is contained in:
+3
-14
@@ -7,7 +7,6 @@
|
||||
#include <unistd.h>
|
||||
#include "mvt.hpp"
|
||||
#include "plugin.hpp"
|
||||
#include "write_json.hpp"
|
||||
#include "projection.hpp"
|
||||
#include "geometry.hpp"
|
||||
|
||||
@@ -15,6 +14,9 @@ extern "C" {
|
||||
#include "jsonpull/jsonpull.h"
|
||||
}
|
||||
|
||||
#include "write_json.hpp"
|
||||
#include "read_json.hpp"
|
||||
|
||||
struct writer_arg {
|
||||
int *pipe_orig;
|
||||
mvt_layer *layer;
|
||||
@@ -44,17 +46,6 @@ void *run_writer(void *a) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void json_context(json_object *j) { // XXX share with geojson.cpp
|
||||
char *s = json_stringify(j);
|
||||
|
||||
if (strlen(s) >= 500) {
|
||||
sprintf(s + 497, "...");
|
||||
}
|
||||
|
||||
fprintf(stderr, "In JSON object %s\n", s);
|
||||
free(s); // stringify
|
||||
}
|
||||
|
||||
mvt_layer parse_layer(int fd, unsigned z, unsigned x, unsigned y) {
|
||||
mvt_layer ret;
|
||||
|
||||
@@ -124,7 +115,6 @@ mvt_layer parse_layer(int fd, unsigned z, unsigned x, unsigned y) {
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
#if 0
|
||||
int t;
|
||||
for (t = 0; t < GEOM_TYPES; t++) {
|
||||
if (strcmp(geometry_type->string, geometry_names[t]) == 0) {
|
||||
@@ -136,7 +126,6 @@ mvt_layer parse_layer(int fd, unsigned z, unsigned x, unsigned y) {
|
||||
json_context(j);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
#endif
|
||||
|
||||
json_free(j);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user