| 47 | */ |
| 48 | template <typename Predicate> |
| 49 | JsonValue::Object collectForeignMembers( |
| 50 | const rapidjson::Value::ConstObject& obj, |
| 51 | const Predicate& predicate) { |
| 52 | JsonValue::Object newObj; |
| 53 | |
| 54 | for (auto it = obj.MemberBegin(); it != obj.MemberEnd(); ++it) { |
| 55 | const std::string& name = it->name.GetString(); |
| 56 | if (name != "type" && name != "bbox" && !predicate(name)) { |
| 57 | newObj.emplace(name, JsonHelpers::toJsonValue(it->value)); |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | return newObj; |
| 62 | } |
| 63 | |
| 64 | // GeoJSON position is an array of two or three components, representing |
| 65 | // [longitude, latitude, (height)] |
no outgoing calls
no test coverage detected