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

There were bugs causing shifting coordinates in database for cities. #34

Closed kermit10000000 closed 6 years ago

kermit10000000 commented 6 years ago

https://github.com/JaroslawWiosna/regionalizer/tree/fixing_database - here is the new version like a draft to update with fix for the last bug. One problem was that in java split there are special signs like "|" so you have to use \ before them to make them work. Another was comparing polish and non polish names so i moved the function for that from tool 1 to tool 2 after the comparison in tool 2. The current problem now is that the program runs the data taken from the webpage and when it gives good coordinates but when it does not find the city it goes throught the list reaching the end and the next cities that exists can not be found since the web_page data object is already at the end of the page text. The solution is to reset somehow the webpage data after every city so the program would always start at the begging of the web page text and this way it will always go through the whole list finding the proper cities and database tool will be completed. I tried to just remove and create object of webpage data at every city but it takes years to make it so it is wrong way. We must find the way for reseting the pointer in the web page file text.

JaroslawWiosna commented 6 years ago

@kermit10000000 This bug should be fixed in version 0.2.0 In this version also will be included: https://github.com/JaroslawWiosna/regionalizer/projects/1#card-5095534


I have created project version 0.2.0 . Not sure if this is a good idea, but it might be worth of trying. The card for this task is here https://github.com/JaroslawWiosna/regionalizer/projects/1#card-5095517


To my mind these two issues/things are enough for version 0.2.0 to be released.

kermit10000000 commented 6 years ago

After intense reading i come to a conclusion that there is no point in reading url many times or reloading it etc. The solutions proposed somewhere was to put the URL content into the String and read the string. However, since it would be like tons of chaotic lines in one big string i decided to go a step further and put lines in HashMap respectively