1v.import(1)                   Grass User's Manual                  v.import(1)
2
3
4

NAME

6       v.import   -  Imports  vector  data  into  a GRASS vector map using OGR
7       library and reprojects on the fly.
8

KEYWORDS

10       vector, import, projection
11

SYNOPSIS

13       v.import
14       v.import --help
15       v.import  [-flo]  input=string    [layer=string[,string,...]]     [out‐
16       put=name]      [extent=string]      [encoding=string]      [snap=float]
17       [epsg=integer]     [datum_trans=integer]     [--overwrite]     [--help]
18       [--verbose]  [--quiet]  [--ui]
19
20   Flags:
21       -f
22           List supported OGR formats and exit
23
24       -l
25           List available OGR layers in data source and exit
26
27       -o
28           Override projection check (use current location’s projection)
29           Assume  that  the  dataset  has  the same projection as the current
30           location
31
32       --overwrite
33           Allow output files to overwrite existing files
34
35       --help
36           Print usage summary
37
38       --verbose
39           Verbose module output
40
41       --quiet
42           Quiet module output
43
44       --ui
45           Force launching GUI dialog
46
47   Parameters:
48       input=string [required]
49           Name of OGR datasource to be imported
50
51       layer=string[,string,...]
52           OGR layer name. If not given, all available layers are imported
53
54       output=name
55           Name for output vector map (default: input)
56
57       extent=string
58           Output vector map extent
59           Options: input, region
60           Default: input
61           input: extent of input map
62           region: extent of current region
63
64       encoding=string
65           Encoding value for attribute data
66
67       snap=float
68           Snapping threshold for boundaries (map units)
69           A suitable threshold is estimated during import
70           Default: -1
71
72       epsg=integer
73           EPSG projection code
74           Options: 1-1000000
75
76       datum_trans=integer
77           Index number of datum transform parameters
78           -1 to list available datum transform parameters
79           Options: -1-100
80

DESCRIPTION

82       v.import imports vector data from files and database  connections  sup‐
83       ported by the OGR library) into the current location and mapset. If the
84       projection of the input does not match the projection of the  location,
85       the  input  is  reprojected into the current location. In case that the
86       projection of the input map does match the projection of the  location,
87       the input is imported directly.
88
89   Supported Vector Formats
90       v.import  uses  the OGR library which supports various vector data for‐
91       mats including ESRI Shapefile, Mapinfo File, UK .NTF, SDTS, TIGER,  IHO
92       S-57  (ENC),  DGN, GML, GPX, AVCBin, REC, Memory, OGDI, and PostgreSQL,
93       depending on the local OGR installation.  For details see the  OGR  web
94       site.  The  OGR  (Simple Features Library) is part of the GDAL library,
95       hence GDAL needs to be installed to use v.in.ogr.
96
97       The list of actually supported formats can be printed by -f flag.
98

NOTES

100       v.import checks the projection metadata of the dataset to  be  imported
101       against  the  current location’s projection. If not identical a related
102       error message is shown.
103       To override this projection check (i.e. to use current location’s  pro‐
104       jection)  by  assuming  that the dataset has the same projection as the
105       current location the -o flag can be used. This is also useful when geo‐
106       data  to be imported do not contain any projection metadata at all. The
107       user must be sure that the projection is identical in order to avoid to
108       introduce data errors.
109
110   Topology cleaning
111       When  importing  polygons,  non-topological  polygons  are converted to
112       topological areas. If the input  polygons  contain  errors  (unexpected
113       overlapping areas, small gaps between polygons, or warnings about being
114       unable to calculate centroids), the import might need  to  be  repeated
115       using a snap value as suggested in the output messages.
116
117       The  snap  threshold  defines  the maximal distance from one to another
118       vertex in map units (for latitude-longitude locations in  degrees).  If
119       there  is  no  other  vertex  within snap distance, no snapping will be
120       done.  Note that a too large value can severely damage  area  topology,
121       beyond repair.
122
123       Post-processing:  Snapped  boundaries  may  need  to  be  cleaned  with
124       v.clean, using its tools break,rmdupl,rmsa. For details, refer  to  the
125       v.clean manual page.
126

EXAMPLE

128       # import SHAPE file at full extent and reproject to current location projection
129       v.import input=research_area.shp output=research_area extent=input
130

ERROR MESSAGES

132   SQL syntax errors
133       Depending  on the currently selected SQL driver, error messages such as
134       follows may arise:
135       DBMI-SQLite driver error:
136       Error in sqlite3_prepare():
137       near "ORDER": syntax error
138       Or:
139       DBMI-DBF driver error:
140       SQL parser error:
141       syntax error, unexpected DESC, expecting NAME processing ’DESC
142       This indicates that a column name in the input dataset corresponds to a
143       reserved  SQL word (here: ’ORDER’ and ’DESC’ respectively). A different
144       column name has to be used in this case. The columns parameter  can  be
145       used  to  assign  different  column  names on the fly in order to avoid
146       using reserved SQL words.  For a list of SQL reserved words for  SQLite
147       (the default driver), see here.
148
149   Projection errors
150       Projection of dataset does not appear to match the current location.
151       Here you need to create or use a location whose projection matches that
152       of the vector data you wish to import. Try using location parameter  to
153       create  a  new  location  based  upon the projection information in the
154       file. If desired, you can then re-project it to another  location  with
155       v.proj.
156

SEE ALSO

158        v.clean, v.in.lines, v.in.ogr, v.proj
159

AUTHORS

161       Markus Metz
162       Improvements: Martin Landa, Anna Petrasova
163

SOURCE CODE

165       Available at: v.import source code (history)
166
167       Main  index  | Vector index | Topics index | Keywords index | Graphical
168       index | Full index
169
170       © 2003-2019 GRASS Development Team, GRASS GIS 7.8.2 Reference Manual
171
172
173
174GRASS 7.8.2                                                        v.import(1)
Impressum