Work around non-numeric input
This commit is contained in:
parent
d466b49671
commit
4c46385bf6
1 changed files with 5 additions and 1 deletions
|
@ -72,7 +72,11 @@ void memory_datasource::push(feature_ptr feature)
|
||||||
std::map<std::string,mapnik::value>::const_iterator it = fprops.begin();
|
std::map<std::string,mapnik::value>::const_iterator it = fprops.begin();
|
||||||
std::map<std::string,mapnik::value>::const_iterator end = fprops.end();
|
std::map<std::string,mapnik::value>::const_iterator end = fprops.end();
|
||||||
for (; it != end; ++it) {
|
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);
|
features_.push_back(feature);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue