Factor out the GeoJSON parsing loop from feature serialization

This commit is contained in:
Eric Fischer
2018-08-08 13:11:10 -07:00
parent 2e80377b24
commit 79363e397b
5 changed files with 189 additions and 122 deletions
+11
View File
@@ -0,0 +1,11 @@
#include <string>
#include "jsonpull/jsonpull.h"
struct json_feature_action {
std::string fname;
virtual int add_feature(json_object *geometry, json_object *properties, json_object *id, json_object *tippecanoe, json_object *feature) = 0;
virtual void check_crs(json_object *j) = 0;
};
void parse_json(json_feature_action *action, json_pull *jp);