Permalink
Browse files

No commit message

  • Loading branch information...
1 parent 12be096 commit 87c1a24bbe53beae77ebcf4afc869760776a3358 christocracy committed Apr 28, 2008
Showing with 64 additions and 6 deletions.
  1. +64 −6 lib/geonames.rb
View
70 lib/geonames.rb
@@ -36,8 +36,7 @@ def self.import
if (FileTest.exist?(CITIES_15000))
self.import_cities15000
end
-
-
+
end
##
@@ -96,8 +95,7 @@ def self.import_countries
# [16] gtopo30 : average elevation of 30'x30' (ca 900mx900m) area in meters, integer
# [17] timezone : the timezone id (see file timeZone.txt)
# [18] modification date : date of last modification in yyyy-MM-dd format
-
-
+ #
def self.import_regions
f = File.open(REGIONS)
while (row = f.gets)
@@ -107,23 +105,83 @@ def self.import_regions
end
end
-
+
##
# import_cities1000
+ # ---------------------------------------------------------------------------------------
+ # [0] geonameid : integer id of record in geonames database
+ # [1] name : name of geographical point (utf8) varchar(200)
+ # [2] asciiname : name of geographical point in plain ascii characters, varchar(200)
+ # [3] alternatenames : alternatenames, comma separated varchar(4000)
+ # [4] latitude : latitude in decimal degrees (wgs84)
+ # [5] longitude : longitude in decimal degrees (wgs84)
+ # [6] feature class : see http://www.geonames.org/export/codes.html, char(1)
+ # [7] feature code : see http://www.geonames.org/export/codes.html, varchar(10)
+ # [8] country code : ISO-3166 2-letter country code, 2 characters
+ # [9] cc2 : alternate country codes, comma separated, ISO-3166 2-letter country code, 60 characters
+ # [10] 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)
+ # [11] admin2 code : code for the second administrative division, a county in the US, see file admin2Codes.txt; varchar(80)
+ # [12] admin3 code : code for third level administrative division, varchar(20)
+ # [13] admin4 code : code for fourth level administrative division, varchar(20)
+ # [14] population : integer
+ # [15] elevation : in meters, integer
+ # [16] gtopo30 : average elevation of 30'x30' (ca 900mx900m) area in meters, integer
+ # [17] timezone : the timezone id (see file timeZone.txt)
+ # [18] modification date : date of last modification in yyyy-MM-dd format
#
def self.import_cities1000
end
##
# import_cities5000
+ # ---------------------------------------------------------------------------------------
+ # [0] geonameid : integer id of record in geonames database
+ # [1] name : name of geographical point (utf8) varchar(200)
+ # [2] asciiname : name of geographical point in plain ascii characters, varchar(200)
+ # [3] alternatenames : alternatenames, comma separated varchar(4000)
+ # [4] latitude : latitude in decimal degrees (wgs84)
+ # [5] longitude : longitude in decimal degrees (wgs84)
+ # [6] feature class : see http://www.geonames.org/export/codes.html, char(1)
+ # [7] feature code : see http://www.geonames.org/export/codes.html, varchar(10)
+ # [8] country code : ISO-3166 2-letter country code, 2 characters
+ # [9] cc2 : alternate country codes, comma separated, ISO-3166 2-letter country code, 60 characters
+ # [10] 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)
+ # [11] admin2 code : code for the second administrative division, a county in the US, see file admin2Codes.txt; varchar(80)
+ # [12] admin3 code : code for third level administrative division, varchar(20)
+ # [13] admin4 code : code for fourth level administrative division, varchar(20)
+ # [14] population : integer
+ # [15] elevation : in meters, integer
+ # [16] gtopo30 : average elevation of 30'x30' (ca 900mx900m) area in meters, integer
+ # [17] timezone : the timezone id (see file timeZone.txt)
+ # [18] modification date : date of last modification in yyyy-MM-dd format
#
def self.import_cities5000
end
##
- # import_cities15000
+ # import_cities15000
+ # ---------------------------------------------------------------------------------------
+ # [0] geonameid : integer id of record in geonames database
+ # [1] name : name of geographical point (utf8) varchar(200)
+ # [2] asciiname : name of geographical point in plain ascii characters, varchar(200)
+ # [3] alternatenames : alternatenames, comma separated varchar(4000)
+ # [4] latitude : latitude in decimal degrees (wgs84)
+ # [5] longitude : longitude in decimal degrees (wgs84)
+ # [6] feature class : see http://www.geonames.org/export/codes.html, char(1)
+ # [7] feature code : see http://www.geonames.org/export/codes.html, varchar(10)
+ # [8] country code : ISO-3166 2-letter country code, 2 characters
+ # [9] cc2 : alternate country codes, comma separated, ISO-3166 2-letter country code, 60 characters
+ # [10] 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)
+ # [11] admin2 code : code for the second administrative division, a county in the US, see file admin2Codes.txt; varchar(80)
+ # [12] admin3 code : code for third level administrative division, varchar(20)
+ # [13] admin4 code : code for fourth level administrative division, varchar(20)
+ # [14] population : integer
+ # [15] elevation : in meters, integer
+ # [16] gtopo30 : average elevation of 30'x30' (ca 900mx900m) area in meters, integer
+ # [17] timezone : the timezone id (see file timeZone.txt)
+ # [18] modification date : date of last modification in yyyy-MM-dd format
#
def self.import_cities15000

0 comments on commit 87c1a24

Please sign in to comment.