-
Notifications
You must be signed in to change notification settings - Fork 0
/
shape.h
38 lines (32 loc) · 1.67 KB
/
shape.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#pragma once
class Shape
{
public:
Shape();
~Shape();
private:
/** Identifies a shape. */
int shape_id; /// Required
/** Latitude of a shape point. Each record in shapes.txt represents a shape point used to define the shape. */
/** Latitude */ double shape_pt_lat; /// Required
/** Longitude of a shape point. */
/** Longitude */ double shape_pt_lon; /// Required
/** Sequence in which the shape points connect to form the shape. Values must increase along the trip but do not
need to be consecutive.Example: If the shape ""A_shp"" has three points in its definition, the shapes.txt file
might contain these records to define the shape:
shape_id,shape_pt_lat,shape_pt_lon,shape_pt_sequence
A_shp,37.61956,-122.48161,0
A_shp,37.64430,-122.41070,6
A_shp,37.65863,-122.30839,11*/
unsigned int shape_pt_sequence; /// Required
/** Actual distance traveled along the shape from the first shape point to the point specified in this record. Used
by trip planners to show the correct portion of the shape on a map. Values must increase along with
shape_pt_sequence; they cannot be used to show reverse travel along a route. Distance units must be consistent with
those used in stop_times.txt.Example: If a bus travels along the three points defined above for A_shp, the
additional shape_dist_traveled values (shown here in kilometers) would look like this:
shape_id,shape_pt_lat,shape_pt_lon,shape_pt_sequence,shape_dist_traveled
A_shp,37.61956,-122.48161,0,0
A_shp,37.64430,-122.41070,6,6.8310
A_shp,37.65863,-122.30839,11,15.8765*/
/** Non-negative float */ double shape_dist_traveled; /// Optional
};