Permalink
Browse files

No commit message

  • Loading branch information...
1 parent ffced35 commit 13ab6b54bfbdadd5759bde67c4411919434d5305 christocracy committed Apr 28, 2008
Showing with 36 additions and 2 deletions.
  1. +36 −2 lib/geonames.rb
View
@@ -42,6 +42,18 @@ def self.import
##
# import_countries
+ # [0] iso alpha2
+ # [1] iso alpha3
+ # [2] iso numeric
+ # [3] fips code
+ # [4] name
+ # [5] capital
+ # [6] areaInSqKm
+ # [7] population
+ # [8] continent
+ # [9] languages
+ # [10] currency
+ # [11] geonameId
#
def self.import_countries
@@ -62,8 +74,30 @@ def self.import_countries
end
##
- # import_regions
- #
+ # import_regions
+ # The main 'geoname' table has the following fields :
+ # ---------------------------------------------------------------------------------------
+ # geonameid : integer id of record in geonames database
+ # name : name of geographical point (utf8) varchar(200)
+ # asciiname : name of geographical point in plain ascii characters, varchar(200)
+ # alternatenames : alternatenames, comma separated varchar(4000)
+ # latitude : latitude in decimal degrees (wgs84)
+ # longitude : longitude in decimal degrees (wgs84)
+ # feature class : see http://www.geonames.org/export/codes.html, char(1)
+ # feature code : see http://www.geonames.org/export/codes.html, varchar(10)
+ # country code : ISO-3166 2-letter country code, 2 characters
+ # cc2 : alternate country codes, comma separated, ISO-3166 2-letter country code, 60 characters
+ # admin1 code : fipscode (subject to change to iso code), isocode for the us and ch, see file admin1Codes.txt for display names of this code; varchar(20)
+ # admin2 code : code for the second administrative division, a county in the US, see file admin2Codes.txt; varchar(80)
+ # admin3 code : code for third level administrative division, varchar(20)
+ # admin4 code : code for fourth level administrative division, varchar(20)
+ # population : integer
+ # elevation : in meters, integer
+ # gtopo30 : average elevation of 30'x30' (ca 900mx900m) area in meters, integer
+ # timezone : the timezone id (see file timeZone.txt)
+ # modification date : date of last modification in yyyy-MM-dd format
+
+
def self.import_regions
f = File.open(REGIONS)
while (row = f.gets)

0 comments on commit 13ab6b5

Please sign in to comment.