i would like to know if the admin2Codes.txt file is extracted every day or if he is static? with my java project (gisgraphy) i try to detect the errors. i have done a module to extract an adm3 an adm4 file from one or more country file.
i found an adm3 in the DE.txt file: DE.06.2910829.03254 Landkreis Hildesheim
but no DE.06.2910829 can be found in the admin2Codes.txt even if there is an adm with this id in the DE.txt file. So if the admin2Codes.txt is extracted from the country file i think it should have this entry.
if the admin2Codes.txt is static, i may try to do the same stuff for adm1 and adm2
feature with id = 2791466 in belgium has an adm1 code and is of 'ADMD' type so it should be of ADM2 type
same thing for 2830841 Bezirk Spandau in the DE file
i found those with a search on 'ADMD' on the search engine on the main page of geonames
maybe it could be usefull do do a search on every admd that have some adm code and update them do the correct ADMX
during my import i also found some missing adm2 in the adm2codes.txt :
Shahrestān-e Gorgān in iran with 449646 is missing (there is no adm for iran in the adm2code.txt) in the adm2codes.txt. and seems duplicate with the admd 68315
It is hard to find uptodate data that is compatible with a free license. So we have to make do with the data we have and this is not fully consistent. Administrative divisions are particularly hard as they are a a moving target. So we decided to keep inconsistent data in order to not loose information. It would be very simple to set everything to 'null' to get a consistent state.
If they are changes in administrative divisions then we only know that the admin is obsolete, but for many users it is usefull information to know that a place once belonged to this or that admin division.
if i understand some ADMD can be considered as old adm, and you don't want to update them.
what do you think about the fact that no adm are exported to the adm2codes.txt file even if there is some in the country file(that is not an admd but an second-order administrative division? ( Shahrestān-e Gorgān in iran with id 449646 is missing (there is no adm for iran in the adm2code.txt) ):
I was looking at the wrong column. The reason is that the ADM2 don't have any codes associated with them.
What we could do is assign them the geonameid as code if we don't know the real code.
The 'real' code is usually the code used by the statistical office of the country and generally in use (like the INSEE code in France)