csv: remove protective string checks now that spirit parsing is working
This commit is contained in:
parent
74d0af396e
commit
b3c2bfef01
2 changed files with 4 additions and 6 deletions
|
@ -579,12 +579,7 @@ void csv_datasource::parse_csv(T& stream,
|
||||||
desc_.add_descriptor(mapnik::attribute_descriptor(fld_name,mapnik::String));
|
desc_.add_descriptor(mapnik::attribute_descriptor(fld_name,mapnik::String));
|
||||||
}
|
}
|
||||||
// only true strings are this long
|
// only true strings are this long
|
||||||
else if (value_length > 20
|
else if (value_length > 20)
|
||||||
// TODO - clean up this messiness which is here temporarily
|
|
||||||
// to protect against the improperly working spirit parsing below
|
|
||||||
|| value.find(",") != std::string::npos
|
|
||||||
|| value.find(":") != std::string::npos
|
|
||||||
|| (std::count(value.begin(), value.end(), '-') > 1))
|
|
||||||
{
|
{
|
||||||
UnicodeString ustr = tr.transcode(value.c_str());
|
UnicodeString ustr = tr.transcode(value.c_str());
|
||||||
boost::put(*feature,fld_name,ustr);
|
boost::put(*feature,fld_name,ustr);
|
||||||
|
|
3
tests/data/csv/nypd.csv
Normal file
3
tests/data/csv/nypd.csv
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
Precinct,Phone,Address,City,geo_longitude,geo_latitude,geo_accuracy
|
||||||
|
5th Precinct,(212) 334-0711,19 Elizabeth Street,"New York, NY",-70.0,40.0,house
|
||||||
|
9th Precinct,(212) 477-7811,130 Avenue C,"New York, NY",-73.0,41.0,house
|
|
Loading…
Reference in a new issue