GRASS Vector Layers: Difference between revisions

From GRASS-Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
== Introduction ==
== Introduction ==
Grass documentation provides basic information about vector attribute management.
categories of vector features and vector layers.
The aim of this tutorial is to show how to create, manipulate and
display different layers of a vector using relational database.
== Problem Description ==
An organization provides information about routes to be driven
by drivers. The organization's database consists of
* roads (road network)
* routes driven on that roads
Simple approach can be taken to present the routes to drivers.
For every route a vector map could be created and overlayed over
the road network vector, i.e.
    $ d.vect map=roads
    $ d.vect map=route01 color=green width=2
Above idea has a major flaw. If route data changes or new route is added
then vector maps has to be regenerated.


== Prepare Road Network ==
== Prepare Road Network ==
Line 13: Line 36:


update road_network set id=cat;
update road_network set id=cat;
http://grass.osgeo.org/grass63/manuals/html63_user/vectorintro.html

Revision as of 20:10, 22 May 2008

Introduction

Grass documentation provides basic information about vector attribute management. categories of vector features and vector layers.

The aim of this tutorial is to show how to create, manipulate and display different layers of a vector using relational database.

Problem Description

An organization provides information about routes to be driven by drivers. The organization's database consists of

  • roads (road network)
  • routes driven on that roads

Simple approach can be taken to present the routes to drivers. For every route a vector map could be created and overlayed over the road network vector, i.e.

   $ d.vect map=roads
   $ d.vect map=route01 color=green width=2

Above idea has a major flaw. If route data changes or new route is added then vector maps has to be regenerated.


Prepare Road Network

create table road_network (cat integer, id integer);

v.category --o in=roads out=outmap option=del

v.category --o in=outmap out=stepmap option=add

v.to.db map=setpmap option=cat

update road_network set id=cat;


http://grass.osgeo.org/grass63/manuals/html63_user/vectorintro.html