EnglishFrenchSpanish

OnWorks favicon

v.external.outgrass - Online in the Cloud

Run v.external.outgrass in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command v.external.outgrass that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


v.external.out - Defines vector output format.

KEYWORDS


vector, export, output, external, OGR, PostGIS

SYNOPSIS


v.external.out
v.external.out --help
v.external.out [-frpg] [output=string] [format=string] [options=string[,string,...]]
[loadsettings=name] [savesettings=name] [--overwrite] [--help] [--verbose]
[--quiet] [--ui]

Flags:
-f
List supported formats and exit

-r
Cease using OGR/PostGIS, revert to native output and exit

-p
Print current status

-g
Print current status in shell script style

--overwrite
Allow output files to overwrite existing files

--help
Print usage summary

--verbose
Verbose module output

--quiet
Quiet module output

--ui
Force launching GUI dialog

Parameters:
output=string
Name of output directory or OGR or PostGIS data source
Examples:
ESRI Shapefile: directory containing a shapefile
MapInfo File: directory containing a mapinfo file
PostGIS database: connection string, eg. ’PG:dbname=db user=grass’

format=string
Format for output vector data
Options: BNA, CSV, CouchDB, DGN, DXF, ESRI_Shapefile, ElasticSearch, GFT, GME, GML,
GMT, GPKG, GPSBabel, GPSTrackMaker, GPX, GeoJSON, GeoRSS, Geoconcept, Interlis_1,
Interlis_2, KML, LIBKML, MSSQLSpatial, MapInfo_File, Memory, MySQL, ODBC, ODS, PCIDSK,
PDF, PGDump, PostgreSQL, S57, SQLite, TIGER, WAsP, XLSX
Default: ESRI_Shapefile

options=string[,string,...]
Creation options
Examples:
’SHPT=POINTZ’: create 3D point Shapefile data
’GEOM_TYPE=geography’: use geography PostGIS data
’SCHEMA=grass’: create new PostGIS tables in ’grass’ schema

loadsettings=name
Name of input file to read settings from

savesettings=name
Name for output file where to save current settings

DESCRIPTION


v.external.out instructs GRASS to write vector maps in external data format (e.g. ESRI
Shapefile, Mapinfo, and others) using OGR library. PostGIS data can be also written by
built-in GRASS-PostGIS data provider.

NOTES


Number of available output formats (v.external.out -f) depends on OGR installation.
’PostgreSQL’ format is presented also when GRASS comes with PostgreSQL support (check for
’--with-postgres’ in g.version -b output).

To store geometry and attribute data in PostGIS database (’PostgreSQL’ format) GRASS uses
built-in GRASS-PostGIS data provider. PostGIS data can be written also by OGR library when
GRASS_VECTOR_OGR environmental variable is defined or GRASS is not compiled with
PostgreSQL support.

Creation options refer to the output format specified by format option. See the list of
valid creation options at OGR formats specification page, example for ESRI Shapefile or
PostgreSQL/PostGIS format (section "Layer Creation Options"). Options are comma-separated
pairs (key=value), the options are case-insensitive, eg.
options="SCHEMA=myschema,FID=cat".

PostgreSQL/PostGIS Creation Options
Note that built-in GRASS-PostGIS data provider (format=PostgreSQL) supports different
creation options compared to PostgreSQL/PostGIS driver from OGR library:

· SCHEMA=<name> - name of schema where to create feature tables. If schema doesn’t
exists, it’s automatically created when writing PostGIS data.

· FID=<column> - name of column which will be used as primary key (feature id),
default: fid

· GEOMETRY_NAME=<column> name of column which will be used for storing geometry data
in feature table, default: geom

· SPATIAL_INDEX=YES|NO - enable/disable spatial index on geometry column, default:
YES

· PRIMARY_KEY=YES|NO - enable/disable primary key on FID column, default: YES

· SRID=<value> - spatial reference identifier, default: not defined

· TOPOLOGY=YES|NO - enable/disable native PostGIS topology, default: NO
Options relevant only to topological output (TOPOLOGY=YES):

· TOPOSCHEMA_NAME=<schema name> - name of PostGIS Topology schema (relevant only for
TOPOLOGY=YES), default: topo_<input>

· TOPOGEOM_NAME=<column> - name of column which will be used for storing
topogeometry data in feature table, default: topo

· TOPO_TOLERANCE=<value> - tolerance for PostGIS Topology schema, see CreateTopology
function for defails, default: 0

· TOPO_GEO_ONLY=YES|NO - store in PostGIS Topology schema only data relevant to
Topo-Geo data model, default: NO

· SIMPLE_FEATURE=YES|NO - build simple features geometry in GEOMETRY_NAME column
from topogeometry data, default: NO
Note that topological output requires PostGIS version 2 or later.

EXAMPLES


ESRI Shapefile
v.external.out can be used along with v.external to process external geodata in GRASS
while writing out the results directly eg. in ESRI Shapefile format:
# register Shapefile in GRASS mapset:
v.external input=/path/to/shapefiles layer=cities
# define output directory for GRASS calculation results:
v.external.out output=$HOME/gisoutput
# do something (here: spatial query), write output directly as Shapefile
v.select ainput=cities atype=point binput=forests btype=area operator=within output=fcities
Current settings can be printed using -p or -g flag.
v.external.out -p
output: /path/to/home/gisoutput
format: ESRI Shapefile

PostGIS (simple features)
PostGIS data can be accessed directly using GRASS-PostGIS data provider (GRASS must be
compiled with PostgreSQL support).
# register PostGIS table in GRASS mapset:
v.external output=PG:dbname=gisdb layer=cities
# define output PostGIS database for GRASS calculation results stored as simple features:
v.external.out output=PG:dbname=gisdb format=PostgreSQL
# do some processing...
Note: If the environment variable GRASS_VECTOR_OGR is defined, or GRASS is compiled
without PostgreSQL support then GRASS will use PostgreSQL driver from OGR library for
reading and writing PostGIS data.

PostGIS Topology
# define output PostGIS database for GRASS calculation results stored as topological elements:
v.external.out output=PG:dbname=gisdb format=PostgreSQL options=topology=YES
# do some processing...
Note: PostGIS topological access is supported only in built-in GRASS-PostGIS data
provider.

GRASS native format
To restore original settings, ie. use the GRASS native format, type:
v.external.out -r

Restore settings
Current settings can be stored to file by specifying output option.
# define output PostGIS database for GRASS calculation with
# results stored as topological elements:
v.external.out output=PG:dbname=gisdb format=PostgreSQL \
options=topology=YES savesettings=gisdb_topo.txt
# ... and do some processing in PostGIS Topology
Back to native format:
v.external.out -r
# do some processing in native format
Restore previous settings from "gisdb_topo.txt" file by specifying loadsettings option.
v.external.out loadsettings=gisdb_topo.txt
# ... and do some processing in PostGIS Topology

REFERENCES


· GRASS-OGR data provider

· OGR vector library C API documentation

· GRASS-PostGIS data provider

· libpq - C Library

Use v.external.outgrass online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    Osu!
    Osu!
    Osu! is a simple rhythm game with a well
    thought out learning curve for players
    of all skill levels. One of the great
    aspects of Osu! is that it is
    community-dr...
    Download Osu!
  • 2
    LIBPNG: PNG reference library
    LIBPNG: PNG reference library
    Reference library for supporting the
    Portable Network Graphics (PNG) format.
    Audience: Developers. Programming
    Language: C. This is an application that
    can also...
    Download LIBPNG: PNG reference library
  • 3
    Metal detector based on  RP2040
    Metal detector based on RP2040
    Based on Raspberry Pi Pico board, this
    metal detector is included in pulse
    induction metal detectors category, with
    well known advantages and disadvantages.
    RP...
    Download Metal detector based on RP2040
  • 4
    PAC Manager
    PAC Manager
    PAC is a Perl/GTK replacement for
    SecureCRT/Putty/etc (linux
    ssh/telnet/... gui)... It provides a GUI
    to configure connections: users,
    passwords, EXPECT regula...
    Download PAC Manager
  • 5
    GeoServer
    GeoServer
    GeoServer is an open-source software
    server written in Java that allows users
    to share and edit geospatial data.
    Designed for interoperability, it
    publishes da...
    Download GeoServer
  • 6
    Firefly III
    Firefly III
    A free and open-source personal finance
    manager. Firefly III features a
    double-entry bookkeeping system. You can
    quickly enter and organize your
    transactions i...
    Download Firefly III
  • More »

Linux commands

Ad