Description Usage Arguments Details Value Author(s) Examples
Generic function to import vector data of various formats into the GRASS environment.
1 | import_vector_data(data, name, layer = NULL, proj_ref_obj = NULL, snap = -1)
|
data |
character string or object; path to data vector file (shape), postgis data source name (dsn; see details), or sp or sf data object. |
name |
string giving the base name of the vector data within the GRASS environment (i.e. output) |
layer |
character string; default 1, particularly needed if data is a dsn for importing postgis data (see details) |
proj_ref_obj |
character; path to a georeferenced data file to be used as reference; only
used if |
snap |
float; snapping threshold in map units. If != -1 (default) vertices are snapped to other vertices in this snapping distance during import. If used, the features are automatically cleaned afterwards (see GRASS tools v.import and v.clean ) |
For importing data from Postgis, all data base credentials must be supplied
in data
and the correct layer
and, if the table containing the polygons
are in a specific schema also that one (see example)
Nothing.
Mira Kattwinkel, mira.kattwinkel@gmx.net
1 2 3 4 5 6 7 | # import data from Postgis
## Not run:
import_vector_data(data = "PG: 'pgname=postgit_DB', 'host=123.45.67.890',
'port='1234', 'user=username', 'password=password'",
name = "forest", layer = "landuse_schema.forest")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.