Bronislwaski
Joined: 12/04/2014 13:03:38
Messages: 2
Offline
|
Almost all Cities in Quebec are featured as A.AMD3 and also have P.PPL entries
which make de PPL unreachable by hierarchy
Example, Saint-Hyacinthe in a city in Monteregie
Canada->Québec(adm1)->Monteregie(adm2)->Saint-Hyacinthe(PPL)
but We have in the current database
Canada->Québec(adm1)->Monteregie(adm2)->Saint-Hyacinthe(PPL)
Canada->Québec(adm1)->Monteregie(adm2)->Saint-Hyacinthe(ADM3)->NOTHING
And this is the case for almost all cities in Quebec
6251999 | CA | Canada | A | PCLI | 00
6115047 | CA | Québec | A | ADM1 | 10
6076966 | CA | Montérégie | A | ADM2 | 10 | 16
8673729 | CA | Saint-Hyacinthe | A | ADM3 | 10 | 16 | 54048
to fetch the PPLs I would do
SELECT geonameid,name,featureclass,featurecode,admin1code,admin2code,admin3code,admin4code FROM geoname WHERE countrycode = 'CA' AND featurecode="PPL" AND admin1code = "10" AND admin2code = "16" AND admin3code = "54048";
So I will get no result.
but if I fetch
SELECT geonameid,name,featureclass,featurecode,admin1code,admin2code,admin3code,admin4code FROM geoname WHERE countrycode = 'CA' AND featurecode="PPL" AND admin1code = "10" AND admin2code = "16";
I get the correct result
6138374 | CA | Saint-Hyacinthe | PPL | 10 | 16
To get the correct result I would need to Add 54048(georeference) I beleive into the admin3code of Saint-Hyacinthe (6138374)
So then I would get
Canada->Québec(adm1)->Monteregie(adm2)->Saint-Hyacinthe(ADM3)->Saint-Hyacinthe(PPL)
But I dont think
Saint-Hyacinthe->Saint-Hyacinthe is right
And it is like that for almost all Cities in Quebec.
but if I am wrong, I really wish I to know what I am doing wrong in my hierarchy look up
but then if I am right, if I could help someone fixing it I would be glad.
thank you
|