refactor csv file parsing logic to be in separate header/class from csv_datasource #1183

Open
springmeyer opened this Issue Apr 20, 2012 · 0 comments

Projects

None yet

1 participant

@springmeyer
Member

While the csv parsing code is fairly robust (and has a good test of testcases the code is currently implemented in one big, silly function: https://github.com/mapnik/mapnik/blob/master/plugins/input/csv/csv_datasource.cpp#L145-149

This turns csv rows into a std::vector of mapnik feature_ptrs. Ideally it could be more standalone, and have nice methods of introspecting a csv (sniffing delimiters, detecting size, detecting newline type, etc), and then accept options to control verbosity - so that the parsing logic could be cleaner and more independent from the mapnik datasource logic.

If I ever get around to this I'll take a look a learning from the http://csvkit.readthedocs.org/en/latest/index.html api.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment