diff --git a/geojson-loop.cpp b/geojson-loop.cpp index 7ca0d514..feebe695 100644 --- a/geojson-loop.cpp +++ b/geojson-loop.cpp @@ -113,7 +113,7 @@ void parse_json(json_feature_action *jfa, json_pull *jp) { } found_geometries++; - jfa->add_feature(j, false, NULL, NULL, NULL, NULL); + jfa->add_feature(j, false, NULL, NULL, NULL, j); json_free(j); continue; } diff --git a/jsontool.cpp b/jsontool.cpp index 0dcc0b87..cb80abe9 100644 --- a/jsontool.cpp +++ b/jsontool.cpp @@ -365,7 +365,7 @@ void join_csv(json_object *j) { struct json_join_action : json_feature_action { int add_feature(json_object *geometry, bool, json_object *, json_object *, json_object *, json_object *feature) { - if (feature != NULL) { + if (feature != geometry) { // a real feature, not a bare geometry if (csvfile != NULL) { join_csv(feature); }