diff --git a/src/memory_datasource.cpp b/src/memory_datasource.cpp index 11889fe63..a738ee683 100644 --- a/src/memory_datasource.cpp +++ b/src/memory_datasource.cpp @@ -72,7 +72,11 @@ void memory_datasource::push(feature_ptr feature) std::map::const_iterator it = fprops.begin(); std::map::const_iterator end = fprops.end(); for (; it != end; ++it) { - accumulators_[it->first](it->second.to_double()); + try { + accumulators_[it->first](it->second.to_double()); + } catch(boost::bad_lexical_cast &) { + // string values are not accumulated. + } } features_.push_back(feature); }