1lrs(1) Grass User's Manual lrs(1)
2
3
4
6 A Linear Referencing System (LRS) is a system where features (points or
7 segments) are localized by a measure along a linear element. The LRS
8 can be used to reference events for any network of linear features, for
9 example roads, railways, rivers, pipelines, electric and telephone
10 lines, water and sewer networks. An event is defined in LRS by a route
11 ID and a measure. A route is a path on the network, usually composed
12 from more features in the input map. Events can be either points or
13 lines (segments).
14
15 LRS is created from input lines and points in vector map. Points - MP
16 (mileposts) must have attached attributes specifying line and distance.
17 The distances from the beginning of the linear feature in real world
18 are specified by MP+offset. Typically, MP is in kilometers and offset
19 in meters.
20
21 The implementation of LRS in GRASS has some particularities.
22
23 Double referenced system
24 This feature gives a possibility to continue to use most of old mile‐
25 posts if only small part of linear object in real world has changed.
26 Example:
27 --- road (linear feature)
28 + MP (milepost, point, distance from the beginning in km)
29 Old situation:
30 +----+----+----+----+----+
31 0 2 3 4 5 6
32 New situation (for example a new bypass around the village)
33 ? ?
34 +----+
35 | |
36 | |
37 +----+----+ +----+----+
38 0 2 3 4 5 6
39 The segment between km 3 and 4 is now longer, it is now 3 km not 1 km
40 as in old version. It would be expensive to change also all MP >= 4,
41 but we cannot use km 4 twice. It is possible to use another notation
42 for the new segment, we reference the segment from the kilometer 3,
43 using only offset.
44 3+1000 3+2000
45 +----+
46 | |
47 | |
48 +----+----+ +----+----+
49 0 2 3 3+3000 5 6
50 4
51 This way, there is no ambiguity and minimal changes are needed. But
52 the MP 4 is no more the end of segment 3 - 4 but the end of segment
53 3+2000 - 3+3000. This information must be entered to the system and it
54 is done by optional MP attributes:
55
56 end_mp - end MP
57
58 end_off - end offset
59 In this case original MP on km 4 will have these attributes:
60 start_mp: 4
61 start_off: 0
62 end_mp: 3
63 end_off: 3000
64 Because each MP can keep 2 values (start, end) it is called 'double'
65 referenced LRS.
66
67 To avoid potential confusion, MP values are limited to integers only.
68 It would be ambiguous to have for example segments 3.500 - 3.500+200
69 and 3.600 - 3.600+200. The position 3+650 would fall into 2 segments,
70 correct would be 3.600+50. That means, that MP must be the beginning
71 of antonomous segment and all parts which becomes longer then before
72 must be referenced from the last not changed MP.
73
74 The MP start_mp and end_mp columns must be decimal, but v.lrs.create
75 takes only the decimal part, and adds its value to offset and prints a
76 warning.
77
78 It is highly recommended to work with polylines instead of segmented
79 vector lines. The command v.build.polylines creates this map structure.
80
81 LRS table structure
82 | Attribute | Type | Description
83 | rsid | integer | reference segment ID, unique in the
84 table
85 | lcat | integer | category of the line in the LRS map
86 | lid | integer | route ID (LID)
87 | start_map | double precision | distance measured along the
88 line in LRS map from the beginning of the line to the beginning of the
89 segment (absolute milepost distance)
90 | end_map | double precision | distance measured along the line
91 in LRS map from the beginning of the line to the end of the segment
92 (absolute distance of subsequent milepost)
93 | start_mp | double precision | milepost number assigned to
94 the start of the segment
95 | start_off | double precision | distance from start_mp to
96 the start of the segment measured along the physical object
97 | end_mp | double precision | milepost number assigned to the
98 end of the segment
99 | end_off | double precision | distance from end_mp to end of
100 the segment measured along the physical object
101 | end_type | integer | 1: the same as specified for from_
102 ; 2: calculated from map along the line from previous MP; 3: defined by
103 user
104
105 Available commands
106 v.lrs.create to create a linear referencing system,
107
108 v.lrs.label to create stationing on the LRS,
109
110 v.lrs.segment to create points/segments on LRS, and
111
112 v.lrs.where to find line id and real km+offset for given
113 points in vector map using linear referencing system.
114
115 Input lines for v.lrs.segment and v.lrs.label
116 v.lrs.create joins all connected lines of the same line ID into one
117 line, the LRS library and other modules using LRS expect this!
118 LR_get_nearest_offset in the LRS library checks duplicate segments only
119 by line_cat and map_offset, not by coordinates in map.
120
121 Duplicate positions
122 It can happen that one offset appears on 2 different lines:
123 ------1------- --------2------
124 +0.0 +1.0 +2.0
125 In this case, the module gives error because the position results in 2
126 points.
127
128 It can be also intended, for example a part of the road is shared with
129 another one, but MP are used only for one:
130 + road1/km15 + road1/km22
131 \ /
132 \ road1/km17 / road1/km20
133 +--------------+
134 / road2/km52 \ road2/km52
135 / \
136 + road2/km50 + road2/km54
137
138
140 Explanations of selected options:
141
142 llayer: vector layer in line map (usually 1; see vector‐
143 intro for "layer" concept)
144
145 player: vector layer in point map (usually 1; see vector‐
146 intro for "layer" concept)
147
148 rsdriver: Driver name for LRS table - DBMI SQL driver
149 (dbf, pg, mysql, sqlite, etc)
150
151 rsdatabase: Database name for LRS table - DBMI SQL data‐
152 base name (e.g., "lrsdb")
153
154 rstable: Name of the LRS table - DBMI SQL table name
155 (e.g., "streamslrs")
156
158 R. Blazek, 2004, Introducing the Linear Reference System in GRASS,
159 Bangkok, GRASS User Conf. Proc.
160 R. Blazek, 2005, Introducing the Linear Reference System in GRASS,
161 International Journal of Geoinformatics, Vol. 1(3), pp. 95-100
162
163 v.build.polylines, v.lrs.create, v.lrs.segment, v.lrs.where,
164 v.lrs.label
165
167 Radim Blazek, ITC-irst/MPA Solutions Trento
168 Documentation update (based on above journal article and available
169 fragments): Markus Neteler
170
171 Last changed: $Date: 2007-12-17 14:45:01 +0100 (Mon, 17 Dec 2007) $
172
173
174
175GRASS 6.3.0 lrs(1)