1v.import(1)                 GRASS GIS 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. The default
116       value of snap=-1 means that no snapping will be done.
117
118       The snap threshold defines the maximal distance  from  one  to  another
119       vertex  in  map units (for latitude-longitude locations in degrees). If
120       there is no other vertex within snap  distance,  no  snapping  will  be
121       done.   Note  that a too large value can severely damage area topology,
122       beyond repair.
123
124       Post-processing:  Snapped  boundaries  may  need  to  be  cleaned  with
125       v.clean,  using  its tools break,rmdupl,rmsa. For details, refer to the
126       v.clean manual page.
127

EXAMPLE

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

ERROR MESSAGES

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

SEE ALSO

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

AUTHORS

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

SOURCE CODE

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