Hello,
We have the following problem: We need to assign certain objects to cities using Geonames database. Assignment is based on distance between object and city - the closest city is assigned to object. Recently we were using cities1000 - subset of Geonames. It worked perfectly but had one disadvantage - a lot of smaller cities/towns/villages were missing. To solve the problem we decided to copy all objects from Geonames matching the following condition (based on fclass and fcode taken from cities1000 database):
Code:
WHERE gn.fclass="P" AND gn.fcode IN ('PPL','PPLA','PPLA2','PPLA3','PPLA4','PPLC','PPLF','PPLG','PPLL','PPLQ','PPLR','PPLS','PPLW','PPLX')
Unfortunately it did not work well. There were a lot of duplicated locations (e.g. London as city, as capital, etc.). Additionally, it contained districts of cities. After assigning our objects to the cities we end up without London at all but we had 'City of Westminster' instead (small part of London) which is incorrect.
Is there any reliable compilation of all cities similar to cities1000? Or perhaps there is some other way to create such a subset?
Thanks!
Jacek