1v.lrs.create(1)               Grass User's Manual              v.lrs.create(1)
2
3
4

NAME

6       v.lrs.create  - Create Linear Reference System
7

KEYWORDS

9       vector, LRS, networking
10

SYNOPSIS

12       v.lrs.create
13       v.lrs.create help
14       v.lrs.create   in_lines=name  out_lines=name   [err=name]   points=name
15       [llayer=integer]     [player=integer]    lidcol=string    pidcol=string
16       [start_mp=string]           [start_off=string]          [end_mp=string]
17       [end_off=string]  rstable=string  [thresh=float]   [--overwrite]
18
19   Flags:
20       --overwrite
21
22   Parameters:
23       in_lines=name
24           Input vector map containing lines
25
26       out_lines=name
27           Output vector map where oriented lines are written
28
29       err=name
30           Output vector map of errors
31
32       points=name
33           Input vector map containing reference points
34
35       llayer=integer
36           Line layer Default: 1
37
38       player=integer
39           Point layer Default: 1
40
41       lidcol=string
42           Column containing line identifiers for lines
43
44       pidcol=string
45           Column containing line identifiers for points
46
47       start_mp=string
48           Column containing milepost position for the beginning of next  seg‐
49           ment Default: start_mp
50
51       start_off=string
52           Column  containing  offset  from milepost for the beginning of next
53           segment Default: start_off
54
55       end_mp=string
56           Column containing milepost position for the end of previous segment
57           Default: end_mp
58
59       end_off=string
60           Column containing offset from milepost for the end of previous seg‐
61           ment Default: end_off
62
63       rstable=string
64           Name of table where the reference system will be written New  table
65           is created by this module
66
67       thresh=float
68           Maximum distance of point to line allowed Default: 1
69

DESCRIPTION

71       v.lrs.create generates a LRS (Linear Reference System) from vector line
72       and point data.
73
74       It is highly recommended to work with polylines  instead  of  segmented
75       vector lines. The command v.build.polylines creates this map structure.
76

NOTES

78       The  mileposts  (point) vector map columns start_mp, start_off, end_mp,
79       end_off must be of 'double precision' type. For milepost  ordering,  it
80       is  sufficient  to  enter  increasing  numbers into the start_mp column
81       indicating the order along the vector line.
82
83       The lidcol and pidcol columns contain the line IDs which  relate  mile‐
84       posts and vector line(s) to each other.
85
86       When  creating  a  LRS  with  this module, any existing rstable will be
87       replaced.
88

EXAMPLE

90       This example is written for the Spearfish dataset.
91
92       As first step, bus route data are prepared.
93       # copy into own mapset
94       g.copy roads_net,busroute_tmp
95       d.mon x0
96       d.vect busroute_tmp
97       # zoom to Spearfish (nord-west city)
98       d.zoom
99       # reduce route map to bus route (reduce to one line)
100       d.extract busroute_tmp out=busroute_tmp2
101       # vector line needs to be polyline
102       v.build.polylines busroute_tmp2 out=busroute_tmp3
103       v.category busroute_tmp3 out=busroute op=add
104       g.remove vect=busroute_tmp,busroute_tmp2,busroute_tmp3
105        The result can be visualized:
106       g.region vect=busroute n=n+100 s=s-100 w=w-100 e=e+100
107       d.mon x0
108       d.vect roads_net
109       d.vect busroute col=red width=2
110        The vector map 'busroute' needs have an attribute table which  contain
111       an  integer  column  lidcol  with  value  be '22' for this example (bus
112       route):
113       v.db.addtable busroute col="lid integer"
114       v.db.update busroute col=lid value=22
115       v.db.select busroute
116       cat|lid
117       1|22
118        A new point map 'busstops' shall contain mileposts (bus  stops)  along
119       this  line  (use  thresh to define maximal accepted deviation from this
120       line):
121       # generate points map
122       # use d.where to find coordinates along the bus route
123       # use v.in.ascii out=busstops to generate map
124       d.vect busstops icon=basic/triangle col=blue
125       d.vect busstops disp=cat lcol=blue
126        The milepost attributes table needs to be created with  specific  col‐
127       umns:
128       v.db.addtable busstops col="lid integer, start_mp double precision, \
129                   start_off double precision, end_mp double precision, \
130                   end_off double precision"
131       v.db.update busstops col=lid value=22
132         Since  the digitizing order of v.in.ascii above reflects the bus stop
133       order along the route, we can simply copy the category number as  mile‐
134       post order number in column start_mp:
135       v.db.update busstops col=start_mp qcol=cat
136       # verify table
137       v.db.select busstops
138       cat|lid|start_mp|start_off|end_mp|end_off
139       1|22|1|||
140       2|22|2|||
141       3|22|3|||
142       4|22|4|||
143       5|22|5|||
144       6|22|6|||
145       7|22|7|||
146       # visualize with start_mp to check order
147       d.erase
148       d.vect roads_net
149       d.vect busroute col=red width=2
150       d.vect busstops icon=basic/triangle col=blue
151       d.vect busstops disp=attr attrcol=start_mp lcol=blue
152         Offsets  (start_off,  end_off) can be later used in case the route or
153       mileposts get modified.
154
155       As second step, the linear reference network is created:
156       v.lrs.create busroute points=busstops out=route_lrs err=lrs_error \
157                    lidcol=lid pidcol=lid rstable=route_lrs thresh=50
158        This creates the maps 'route_lrs' containing the LRS  and  'lrs_error'
159       containing  the  errors  if any. The resulting LRS table and map can be
160       shown:
161       # show LRS table
162       db.select route_lrs
163       d.vect route_lrs col=blue width=2
164
165

SEE ALSO

167       LRS tutorial,
168       Introducing the Linear Reference System in GRASS,
169
170       v.build.polylines, v.lrs.segment, v.lrs.where, v.lrs.label
171

AUTHOR

173       Radim Blazek, ITC-irst/MPA Solutions
174       Documentation update (based on  above  journal  article  and  available
175       fragments): Markus Neteler
176
177       Last changed: $Date: 2007/06/28 15:42:47 $
178
179       Full index
180
181
182
183GRASS 6.2.2                                                    v.lrs.create(1)
Impressum