GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Fixing Brazilian ADM1Codes  XML
Forum Index -> Administrative Divisions
Author Message
PJonDevelopment



Joined: 06/03/2008 01:24:26
Messages: 14
Location: Rio de Janeiro, Brazil
Offline

There are two ADM1Codes mixed for the Brazilian Codes.

Below is the SQL to fix them.

Code:
 UPDATE geoname SET adm1code = '10' WHERE geonameid = 3462372
 UPDATE geoname SET adm1code = '19' WHERE geonameid = 3392268
This fill fix the ADM1Code for Goias and Pernambuco to match the ADM1Code at the ADM2 level.

Edited because I can't spell.

Paulo Santos
http://pjondevelopment.50webs.com
[WWW]
Admin



Joined: 19/11/2005 16:33:24
Messages: 36
Offline

The codes 29 and 30 are the correct ones. The codes 10 and 19 are codes from former subdivisions. 30 is a merger of 09 and 19, so I have updated them right now. 10 was split into 29 and 30 and I don't know how to do this.

Marc
PJonDevelopment



Joined: 06/03/2008 01:24:26
Messages: 14
Location: Rio de Janeiro, Brazil
Offline

Hi, marc.

I've checked all the data points for Goias and Pernambuco (the ADM1Codes that I fixed) and they should be as I have specified.

If you want you can check them at my site:
Goias -- ADM1Code = '19'
Pernambuco ADM1Code = '10'

All the ADM1Codes for these points are where they should be.

Paulo Santos
http://pjondevelopment.50webs.com
[WWW]
PJonDevelopment



Joined: 06/03/2008 01:24:26
Messages: 14
Location: Rio de Janeiro, Brazil
Offline

However if you're saying that the ADM1Codes SHOULD be 29 and 30 because a change in the database then it is ok.

Below the code to fix them.
Code:
 UPDATE geonames SET adm1code = '29' WHERE idGeoName = 3462372 /* was 10 */
 (1 row(s) affected)
 
 UPDATE geonames SET adm1code = '30' WHERE idGeoName = 3392268 /* was 19 */
 (1 row(s) affected)
 
 UPDATE geonames SET adm1code = '29' WHERE CountryCode = 'BR' and ADM1Code = '10' and FeatureCode = 'ADM2'
 (246 row(s) affected)
 
 UPDATE geonames SET adm1code = '30' WHERE CountryCode = 'BR' and ADM1Code = '19' and FeatureCode = 'ADM2'
 (185 row(s) affected)

Paulo Santos
http://pjondevelopment.50webs.com
[WWW]
marc



Joined: 08/12/2005 07:39:47
Messages: 3993
Offline

Paulo

I have now also updated the 29 codes (from 10) after making sure there are no 31 among the former 10 codes.

Marc

[WWW]
 
Forum Index -> Administrative Divisions
Go to:   
Powered by JForum 2.1.5 © JForum Team