JaroslawWiosna / regionalizer

How to choose the best capital of a state and regions? Divider into regions, especially for administrative purposes
Mozilla Public License 2.0
2 stars 2 forks source link

City name space-separated is not space separated #103

Closed JaroslawWiosna closed 6 years ago

JaroslawWiosna commented 6 years ago

Description

https://travis-ci.org/JaroslawWiosna/regionalizer/builds/298694237?utm_source=github_status&utm_medium=notification 1348-1350 lines:

regionalizeUsingRandom
The best capitals would be GrodziskMazowiecki Sycow 
Happiness level = 155807595

GrodziskMazowiecki should be separated just like in database: Grodzisk Mazowiecki|13.19|30593|52.1|20.6167


Release affected

v0.3.1


Priority

low


Is there possible contributor who could fix the issue

@kermit10000000


kermit10000000 commented 6 years ago

preliminary investigation: my first assumption is that the error can happened due to following lines in the code: while ((pos = line.find(" ")) != std::string::npos) { line.replace(line.begin() + pos, line.begin() + pos + 1, ""); } https://github.com/JaroslawWiosna/regionalizer/blob/master/DatabaseReader/DatabaseReader.cpp lines 25-27 this will be checked and in case it will be that fixed. Also to improve the code, unittase for that case will be added.