GRASS 6 Tutorial/Vector data management: Difference between revisions

From GRASS-Wiki
Jump to navigation Jump to search
(Created page with "===Vector Data Management===")
 
Line 1: Line 1:
===Vector Data Management===
==Vector data management==
===Overview===
The native GRASS vector format provides:
*Vector topology
*m:n mapping of geometry features to attributes
*Vector layers
*OGC Simple Features <-> Topological Vector Conversion
*Database Management system (DBMS)
*SQLite, PostgreSQL + PostGIS, MySQL, ODBC (, DBF)
 
The vector geometry types supported in GRASS include:
*Point
*Centroid
*Line
*Boundary
*Area (Boundaries + Centroid)
*Face (3D Area)
*[Kernel (3D Centroid)]
*[Volumes (Faces + Kernel)]
 
All types are '''true 3D''': x,y,z
 
===Import/Export of Vector data===
The GRASS modules <code>v.in.*</code> and <code>v.out.*</code> handle the importing and exporting of Vector datasets.
<code>v.in.ogr</code> is widely used and has simplified the import of vector data; [http://www.gdal.org/ogr/ogr_formats.html OGR] itself support a wide range of formats.
<code>v.out.ogr</code> always exports the entire vector map
 
====Importing an ESRI Shapefile====
The following code snippet is a simple usage of <code>v.in.ogr</code>, which imports an ESRI Shapefile from the command line as follows:
 
v.in.ogr dsn=boundary_county.shp out=boundary_county
 
However, <code>v.in.ogr</code> has many options to import subsets (defined spatially or by SQL) and vector types
 
The same can be achieved using the GRASS Graphical Interface. The Vector import interface can be accessed through the vector layer manager:
 
[[File:Vector_layer_manager.png|400px]]
[[File:Vector_layer_import.png|400px]]
 
Introductory information on [http://grass.ibiblio.org/grass63/manuals/html63_user/vectorintro.html vector data processing] is available from the help manual.
 
===[[Grass Six Tutorial Default Settings]]===
      -  Default settings for vector geometry;
          for vector attributes; for db.* modules
 
===[[Grass Six Tutorial Geometry Management]]===
http://grass.osgeo.org/grass57/tutorial/geom_storage.html
        -  General notes on Geometry
          management; Managing the default settings;
          GRASS vector architecture; Geometry stored in native format;
          Geometry stored in SHAPE file;
          Import/export of vector data Geometry;
          Generating vector geometry from various sources
 
===[[Grass Six Tutorial Attribute Management]]===
http://grass.osgeo.org/grass57/tutorial/attrib_storage.html
        - General notes on Attribute
          management; Managing the default settings; Examples;
          Database Schema

Revision as of 13:05, 7 November 2012

Vector data management

Overview

The native GRASS vector format provides:

  • Vector topology
  • m:n mapping of geometry features to attributes
  • Vector layers
  • OGC Simple Features <-> Topological Vector Conversion
  • Database Management system (DBMS)
  • SQLite, PostgreSQL + PostGIS, MySQL, ODBC (, DBF)

The vector geometry types supported in GRASS include:

  • Point
  • Centroid
  • Line
  • Boundary
  • Area (Boundaries + Centroid)
  • Face (3D Area)
  • [Kernel (3D Centroid)]
  • [Volumes (Faces + Kernel)]

All types are true 3D: x,y,z

Import/Export of Vector data

The GRASS modules v.in.* and v.out.* handle the importing and exporting of Vector datasets. v.in.ogr is widely used and has simplified the import of vector data; OGR itself support a wide range of formats. v.out.ogr always exports the entire vector map

Importing an ESRI Shapefile

The following code snippet is a simple usage of v.in.ogr, which imports an ESRI Shapefile from the command line as follows:

v.in.ogr dsn=boundary_county.shp out=boundary_county 

However, v.in.ogr has many options to import subsets (defined spatially or by SQL) and vector types

The same can be achieved using the GRASS Graphical Interface. The Vector import interface can be accessed through the vector layer manager:

Introductory information on vector data processing is available from the help manual.

Grass Six Tutorial Default Settings

      -  Default settings for vector geometry;
         for vector attributes; for db.* modules

Grass Six Tutorial Geometry Management

http://grass.osgeo.org/grass57/tutorial/geom_storage.html

       -  General notes on Geometry 
         management; Managing the default settings; 
         GRASS vector architecture; Geometry stored in native format;
         Geometry stored in SHAPE file; 
         Import/export of vector data Geometry;
         Generating vector geometry from various sources

Grass Six Tutorial Attribute Management

http://grass.osgeo.org/grass57/tutorial/attrib_storage.html

       - General notes on Attribute 
         management; Managing the default settings; Examples;
         Database Schema