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

LRS (Linear Reference System)

6       A  Linear  Reference 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       | AttributeTypeDescription | rsid integer reference segment ID,  unique
83       in  the  table | lcat integer category of the line in the LRS map | lid
84       integer route ID (LID) | start_map double precision  distance  measured
85       along  the line in LRS map from the beginning of the line to the begin‐
86       ning of the segment (absolute milepost distance) | end_map double  pre‐
87       cision  distance  measured along the line in LRS map from the beginning
88       of the line to the end of the segment  (absolute distance of subsequent
89       milepost)  |  start_mp double precision milepost number assigned to the
90       start of  the  segment  |  start_off  double  precision  distance  from
91       start_mp to the start of the segment measured along the physical object
92       | end_mp double precision milepost number assigned to the  end  of  the
93       segment  |  end_off double precision distance from end_mp to end of the
94       segment measured along the physical object  |  end_type  integer1:  the
95       same  as  specified  for  from_ ; 2: calculated from map along the line
96       from previous MP; 3: defined by user
97
98   Available commands
99                     v.lrs.create to create a linear reference system,
100
101                     v.lrs.label to create stationing on the LRS,
102
103                     v.lrs.segment to create points/segments on LRS, and
104
105                     v.lrs.where to find line id and real km+offset for  given
106                     points in vector map using linear reference system.
107
108   Input lines for v.lrs.segment and v.lrs.label
109       v.lrs.create  joins  all  connected  lines of the same line ID into one
110       line, the  LRS  library  and  other  modules  using  LRS  expect  this!
111       LR_get_nearest_offset in the LRS library checks duplicate segments only
112       by line_cat and map_offset, not by coordinates in map.
113
114   Duplicate positions
115       It can happen that one offset appears on 2 different lines:
116       ------1-------     --------2------
117       +0.0            +1.0              +2.0
118        In this case, the module gives error because the position results in 2
119       points.
120
121       It  can be also intended, for example a part of the road is shared with
122       another one, but MP are used only for one:
123        + road1/km15         + road1/km22
124         \                  /
125          \ road1/km17     / road1/km20
126           +--------------+
127          / road2/km52     \ road2/km52
128         /                  \
129        + road2/km50         + road2/km54
130
131

NOTES

133       Explanations of selected options:
134
135                     llayer: vector layer in line map (usually 1; see  vector‐
136                     intro for "layer" concept)
137
138                     player: vector layer in point map (usually 1; see vector‐
139                     intro for "layer" concept)
140
141                     rsdriver: Driver name for reference system table  -  DBMI
142                     SQL driver (dbf, pg, mysql, sqlite, etc)
143
144                     rsdatabase:  Database  name  for reference system table -
145                     DBMI SQL database name (e.g., "lrsdb")
146
147                     rstable: Name of the reference system table  -  DBMI  SQL
148                     table name (e.g., "streamslrs")
149

SEE ALSO

151       R.  Blazek,  2004,  Introducing  the  Linear Reference System in GRASS,
152       Bangkok, GRASS User Conf. Proc.
153       R. Blazek, 2005, Introducing the  Linear  Reference  System  in  GRASS,
154       International Journal of Geoinformatics Vol. 1(3)
155
156       v.build.polylines,     v.lrs.create,     v.lrs.segment,    v.lrs.where,
157       v.lrs.label
158

AUTHOR

160       Radim Blazek, ITC-irst/MPA Solutions Trento
161       Documentation update (based on  above  journal  article  and  available
162       fragments): Markus Neteler
163
164       Last changed: $Date: 2007/06/28 16:30:32 $
165
166
167
168GRASS 6.2.2                                                             lrs(1)
Impressum