2017-07-14 23:56:23 +00:00
|
|
|
#ifndef GEOJSON_HPP
|
|
|
|
#define GEOJSON_HPP
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <set>
|
|
|
|
#include <map>
|
|
|
|
#include <string>
|
|
|
|
#include "mbtiles.hpp"
|
|
|
|
#include "jsonpull/jsonpull.h"
|
2017-08-23 18:43:48 +00:00
|
|
|
#include "serial.hpp"
|
2017-07-14 23:56:23 +00:00
|
|
|
|
2016-04-27 21:59:20 +00:00
|
|
|
struct parse_json_args {
|
2017-11-10 21:06:47 +00:00
|
|
|
json_pull *jp;
|
|
|
|
int layer;
|
|
|
|
std::string *layername;
|
2017-08-23 18:43:48 +00:00
|
|
|
|
2017-11-10 21:06:47 +00:00
|
|
|
struct serialization_state *sst;
|
|
|
|
|
|
|
|
parse_json_args(json_pull *jp1, int layer1, std::string *layername1, struct serialization_state *sst1)
|
|
|
|
: jp(jp1), layer(layer1), layername(layername1), sst(sst1) {
|
|
|
|
}
|
2016-04-27 21:59:20 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct json_pull *json_begin_map(char *map, long long len);
|
2016-08-30 21:02:51 +00:00
|
|
|
void json_end_map(struct json_pull *jp);
|
|
|
|
|
2017-08-25 00:27:30 +00:00
|
|
|
void parse_json(struct serialization_state *sst, json_pull *jp, int layer, std::string layername);
|
2016-04-27 21:59:20 +00:00
|
|
|
void *run_parse_json(void *v);
|
2017-07-14 23:56:23 +00:00
|
|
|
|
|
|
|
#endif
|