File: v.in.geonames.html

package info (click to toggle)
grass 8.4.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 277,040 kB
  • sloc: ansic: 460,798; python: 227,732; cpp: 42,026; sh: 11,262; makefile: 7,007; xml: 3,637; sql: 968; lex: 520; javascript: 484; yacc: 450; asm: 387; perl: 157; sed: 25; objc: 6; ruby: 4
file content (81 lines) | stat: -rw-r--r-- 3,247 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<h2>DESCRIPTION</h2>

<em>v.in.geonames</em> imports Geonames.org country files (Gazetteer
data) into a GRASS vector points map. The country files can be
downloaded from the
<a href="https://download.geonames.org/export/dump/">GeoNames Data Dump
Server</a>. Only original files can be processed (unzip compressed
file first). These Geonames files are encoded in UTF-8 which is
maintained in the GRASS database.

<h2>NOTES</h2>

<p>
<em>v.in.geonames</em>
calls <em><a href="v.in.ascii.html">v.in.ascii</a></em> to import data
into GRASS.

<p>
The current DB connection is used to write the database table
(see <em><a href="db.connect.html">db.connect</a></em>). If importing
into a <a href="grass-dbf.html">DBF database</a>, the original column
names longer that 10 characters are shortened to 10 characters to meet
the DBF column name restrictions. If this is a problem consider
choosing another database driver
with <em><a href="db.connect.html">db.connect</a></em>
(eg. to <a href="grass-sqlite.html">SQLite driver</a>).

<p>
The main 'geoname' table has the following fields

<div class="code"><pre>
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 https://www.geonames.org/export/codes.html, char(1)
feature code      : see https://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 https://download.geonames.org/export/dump/timeZones.txt)
modification date : date of last modification in yyyy-MM-dd format
</pre></div>

<h2>EXAMPLE</h2>

Download and import geonames for Czech Republic.

<div class="code"><pre>
wget https://download.geonames.org/export/dump/CZ.zip
unzip CZ.zip

v.in.geonames input=CZ.txt output=geonames_cz
</pre></div>

<h2>REFERENCES</h2>

<ul>
  <li><a href="https://www.geonames.org">GeoNames Web site</a></li>
  <li><a href="https://download.geonames.org/export/dump/">GeoNames Data Dump Server</a></li>
</ul>

<h2>SEE ALSO</h2>

<em>
  <a href="db.connect.html">db.connect</a>,
  <a href="v.in.ascii.html">v.in.ascii</a>,
  <a href="v.select.html">v.select</a>
</em>

<h2>AUTHOR</h2>

<a href="https://grassbook.org/">Markus Neteler</a>