v.in.geonames.html 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <h2>DESCRIPTION</h2>
  2. <em>v.in.geonames</em> imports Geonames.org country files (Gazetteer
  3. data) into a GRASS vector points map. The country files can be
  4. downloaded from the
  5. <a href="http://download.geonames.org/export/dump/">GeoNames Data Dump
  6. Server</a>. Only original files can be processed (unzip compressed
  7. file first). These Geonames files are encoded in UTF-8 which is
  8. maintained in the GRASS database.
  9. <h2>NOTES</h2>
  10. <p>
  11. <em>v.in.geonames</em>
  12. calls <em><a href="v.in.ascii.html">v.in.ascii</a></em> to import data
  13. into GRASS.
  14. <p>
  15. The current DB connection is used to write the database table
  16. (see <em><a href="db.connect.html">db.connect</a></em>). If importing
  17. into a <a href="grass-dbf.html">DBF database</a>, the original column
  18. names longer that 10 characters are shortened to 10 characters to meet
  19. the DBF column name restrictions. If this is a problem consider
  20. choosing another database driver
  21. with <em><a href="db.connect.html">db.connect</a></em>
  22. (eg. to <a href="grass-sqlite.html">SQLite driver</a>).
  23. <p>
  24. The main 'geoname' table has the following fields
  25. <div class="code"><pre>
  26. geonameid : integer id of record in geonames database
  27. name : name of geographical point (utf8) varchar(200)
  28. asciiname : name of geographical point in plain ascii characters, varchar(200)
  29. alternatenames : alternatenames, comma separated varchar(4000)
  30. latitude : latitude in decimal degrees (wgs84)
  31. longitude : longitude in decimal degrees (wgs84)
  32. feature class : see http://www.geonames.org/export/codes.html, char(1)
  33. feature code : see http://www.geonames.org/export/codes.html, varchar(10)
  34. country code : ISO-3166 2-letter country code, 2 characters
  35. cc2 : alternate country codes, comma separated, ISO-3166 2-letter country code, 60 characters
  36. 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)
  37. admin2 code : code for the second administrative division, a county in the US, see file admin2Codes.txt; varchar(80)
  38. admin3 code : code for third level administrative division, varchar(20)
  39. admin4 code : code for fourth level administrative division, varchar(20)
  40. population : integer
  41. elevation : in meters, integer
  42. gtopo30 : average elevation of 30'x30' (ca 900mx900m) area in meters, integer
  43. timezone : the timezone id (see file http://download.geonames.org/export/dump/timeZones.txt)
  44. modification date : date of last modification in yyyy-MM-dd format
  45. </pre></div>
  46. <h2>EXAMPLE</h2>
  47. Download and import geonames for Czech Republic.
  48. <div class="code"><pre>
  49. wget http://download.geonames.org/export/dump/CZ.zip
  50. unzip CZ.zip
  51. v.in.geonames input=CZ.txt output=geonames_cz
  52. </pre></div>
  53. <h2>REFERENCES</h2>
  54. <ul>
  55. <li><a href="http://www.geonames.org">GeoNames Web site</a></li>
  56. <li><a href="http://download.geonames.org/export/dump/">GeoNames Data Dump Server</a></li>
  57. </ul>
  58. <h2>SEE ALSO</h2>
  59. <em>
  60. <a href="db.connect.html">db.connect</a>,
  61. <a href="v.in.ascii.html">v.in.ascii</a>,
  62. <a href="v.select.html">v.select</a>
  63. </em>
  64. <h2>AUTHOR</h2>
  65. <a href="http://www.grassbook.org/">Markus Neteler</a>
  66. <p>
  67. <i>Last changed: $Date$</i>