Vector Data: Difference between revisions

From GRASS-Wiki
Jump to navigation Jump to search
Line 86: Line 86:
* Polygon: A polygon consists of 1 or more rings. A ring is a connected sequence of 4 or more points that form a closed, non-self-intersecting loop.
* Polygon: A polygon consists of 1 or more rings. A ring is a connected sequence of 4 or more points that form a closed, non-self-intersecting loop.


* PointM: Point plus a Measure (cf. [http://lists.maptools.org/pipermail/gdal-dev/2002-December/000047.html Measure in shape file])
* PointM: Point plus support for a Measure (cf. [http://lists.maptools.org/pipermail/gdal-dev/2002-December/000047.html Measure in shape file])
* PolyLineM: Point plus a Measure
* PolyLineM: Point plus support for a Measure
* PolygonM: Point plus a Measure
* PolygonM: Point plus support for a Measure
* MultiPointM: MultiPoint plus a Measure
* MultiPointM: MultiPoint plus support for a Measure


* PointZ: PointM plus a additional z-coordinate (height)
* PointZ: 3D PointM<!-- or is it just 2.5D ?? ..mmh should consult the literature -->
* PolyLineZ: 3D PolyLineM
* PolyLineZ: 3D PolyLineM
* PolygonZ: 3D PolygonM
* PolygonZ: 3D PolygonM

Revision as of 19:55, 29 July 2007

Vector Data Structures

reading recommendation: chapter Vector data processing in GRASS GIS in GRASS GIS Reference Manual

GRASS 6 Vector Architecture

The GRASS vector data model includes the description of topology, where besides the coordinates describing the location of the primitives (points, lines, boundaries and centroids), their spatial relations are also stored. In general, topological GIS require a data structure where the common boundary between two adjacent areas is stored as a single line, simplifying the map maintenance.

The following vector objects are defined:

  • point
  • line: directed sequence of connected vertices with 2 endpoints called nodes
  • boundary: the border line to describe an area
  • centroid: a point within a closed boundary (missing centroids can be created with v.centroids)
  • area: the topological composition of centroid and boundary
  • face: a 3D area;

Further following vector objects are defined, but not yet fully implemented/used:

  • kernel: a 3D centroid in a volume (exists, but currently mostly unused)
  • volume: a 3D corpus, the topological composition of faces and kernel (not yet implemented)

Note: all lines and boundaries can be polylines (with nodes(vertices) in between)

Data Structure

a vector map(layer?) <some_vector> is stored in the directory $MAPSET/vector/<some_vector>. This directory normally contains the files listed below.

  • /head: ASCII file with header information; this is more or less the stuff that v.info displays.
  • /dbln: ASCII file that link(s) to attribute table(s)
  • /hist: ASCII file with vector map change history. v.info -h can be used to dispay this file.
  • /coor: binary file for storing the coordinates
  • /topo: binary file for topology
  • /cidx: binary category index


Note: The creation of certain files can be disabled. The -t flag suported by v.in.ogr and v.in.ascii disables the creation of an attribute table. The -b flag supported by r.to.vect and v.in.ascii disables the creation of a topology file. This is needed and useful e.g. for very large datasets (> 3 million points). The user is expected to understand what s/he is doing.

Linear Reference System (LRS)

/*TODO*/

R. Blazek: Introducing the Linear Reference System in GRASS (March 2005, Int'l Journal of Geoinformatics, Vol. 1(3), pp. 95-100) R. Blazek: Introducing the Linear Reference System in GRASS (Sept 2004, Conference Paper)

http://en.wikipedia.org/wiki/Linear_Reference_System http://grass.itc.it/grass63/manuals/html63_user/lrs.html http://freegis.org/cgi-bin/viewcvs.cgi/*checkout*/grass6/vector/v.lrs/lrs.html

http://freegis.org/cgi-bin/viewcvs.cgi/grass6/vector/v.lrs/lib/ http://postgis.refractions.net/pipermail/postgis-users/2006-July/012537.html http://freegis.org/cgi-bin/viewcvs.cgi/*checkout*/grass6/vector/v.lrs/MAIL

Specs

GRASS

ESRI Shapefile

A shapefile stores nontopological geometry and attribute information for the spatial features in a data set. The geometry for a feature is stored as a shape comprising a set of vector coordinates.


The following vector objects are defined:

  • Point
  • MultiPoint: a set of points
  • PolyLine: A PolyLine is an ordered set of vertices that consists of one or more parts. A part is a connected sequence of 2 or more points. Parts may or may not be connected to one another. Parts may or may not intersect one another.
  • Polygon: A polygon consists of 1 or more rings. A ring is a connected sequence of 4 or more points that form a closed, non-self-intersecting loop.
  • PointM: Point plus support for a Measure (cf. Measure in shape file)
  • PolyLineM: Point plus support for a Measure
  • PolygonM: Point plus support for a Measure
  • MultiPointM: MultiPoint plus support for a Measure
  • PointZ: 3D PointM
  • PolyLineZ: 3D PolyLineM
  • PolygonZ: 3D PolygonM
  • MultiPointZ: 3D MultiPointM
  • MultiPatch: A MultiPatch consists of a number of surface patches. Each surface patch describes a surface.

Data Structure

a shapefile is actually a dataset of files:

  • .shp vector features
  • .shx feature index
  • .dbf attributes in dBase DB format
  • .prj ASCII file with projection info in WKT format
  • .sbn optional spatial index file

Specs

OpenGIS Simple Features

is a widely implemented nontopological standard. The internal data representation of [OGR] is closely modeled after it, PostGIS is a PostgreSQL implemenation and the Spatial Extentions of MySQL implement it too, etc..

The following vector objects are defined:

  • Point
  • LineString
  • Polygon
  • Multipoint
  • Multipolygon
  • GeomCollection

Specs

GRASS

SVG

is a non-topological W3C standard. The following vector objects are defined:

  • path: represents the outline of a shape
  • line: a (directed?) line segment that starts at one point and ends at another.
  • polyline: a set of connected straight line segments. typically, it defines open shapes.
  • polygon: a closed shape consisting of a set of connected straight line segments.
  • rect: defines a rectangle shape
  • circle
  • ellipse

Specs

Scalable Vector Graphics (SVG) 1.1 Specification

GRASS