2017-07-14 16:56:23 -07: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 11:43:48 -07:00
|
|
|
#include "serial.hpp"
|
2017-07-14 16:56:23 -07:00
|
|
|
|
2016-04-27 14:59:20 -07:00
|
|
|
struct parse_json_args {
|
2016-04-27 15:10:26 -07:00
|
|
|
json_pull *jp;
|
|
|
|
int layer;
|
2016-08-29 16:38:57 -07:00
|
|
|
std::string *layername;
|
2017-04-17 14:42:50 -07:00
|
|
|
std::map<std::string, int> const *attribute_types;
|
2017-05-30 16:58:56 -07:00
|
|
|
bool want_dist;
|
2017-08-23 11:43:48 -07:00
|
|
|
|
|
|
|
struct serialization_state *sst;
|
2016-04-27 14:59:20 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
struct json_pull *json_begin_map(char *map, long long len);
|
2016-08-30 14:02:51 -07:00
|
|
|
void json_end_map(struct json_pull *jp);
|
|
|
|
|
2017-08-24 17:27:30 -07:00
|
|
|
void parse_json(struct serialization_state *sst, json_pull *jp, int layer, std::string layername);
|
2016-04-27 14:59:20 -07:00
|
|
|
void *run_parse_json(void *v);
|
2017-07-14 16:56:23 -07:00
|
|
|
|
|
|
|
#endif
|