]>
Commit | Line | Data |
---|---|---|
50a14534 EB |
1 | If I use the GPSPoint code, I can concatenate gpspoint files and make them into layers just with a text editor. |
2 | Also, any new features I just add to that. | |
3 | However, be mindful that GPSPoint looks for EOF. | |
4 | I could modify the code to stop on a line that begins with "-" | |
5 | ||
6 | Style 1: Use GPSPoint code | |
7 | ||
8 | type="layer" id="aggregate" name="My \"Name\"" | |
9 | type="layer" id="trackwaypoint" name="cool" | |
10 | type="waypoint" ... | |
11 | ... | |
12 | type="layerend" | |
13 | type="layerend" | |
14 | ||
15 | Style 2: GPSPoint++ | |
16 | ||
17 | +Layer Aggregate | |
18 | =This Is A "Name" with "Quotes" and WEIRD *(#$% chars | |
19 | ||
20 | +Layer TrackWaypoint | |
21 | =My CoolLayer | |
22 | ||
23 | type="waypoint" .. | |
24 | type="track" | |
25 | ||
26 | -EndLayer | |
27 | ||
28 | -EndLayer | |
29 | ||
30 | comments (#) ignored | |
31 | each layer parser must return control if line begins with '-' | |
32 | However, this is to freestyle. | |
33 | ||
34 | Style 3: GPSPoint to the next Level | |
35 | ||
36 | +Layer Aggregate | |
37 | =This Is A "Name" | |
38 | ||
39 | +Layer Coord | |
40 | =My Cool Chord Liar | |
41 | ||
42 | type="param" name="deg_inc" value="5" | |
43 | ||
44 | -EndLayer | |
45 | ||
46 | -EndLayer | |
47 | ||
48 | I'm a bit foggy on the parsing, does each layer do that? 'cause TRWLayer will have to. | |
49 | also, if we do that, we may as well use #1 with \\'d quotes as it is more standardized. | |
50 | ||
51 | Style #4: Happy-Medium | |
52 | ||
53 | +Layer Aggregate | |
54 | name=This Is A "Name" with funny =-10!@$#* chars | |
55 | ||
56 | +Layer TRW | |
57 | name=My Cool Layer | |
58 | ||
59 | draw_tracks=1 | |
60 | draw_waypoints=0 | |
61 | data_format=gpspoint | |
62 | ||
63 | +LayerData # parsed by Layer itself | |
64 | ||
65 | type="waypoint" ... | |
66 | ||
67 | -LayerData | |
68 | ||
69 | -Layer | |
70 | ||
71 | +Layer Coord | |
72 | name=My Cool Chord Liar | |
73 | ||
74 | deg_inc=5 | |
75 | ||
76 | -Layer | |
77 | ||
78 | -Layer | |
79 | ||
80 | Every thing is done by the file parser, EXCEPT LayerData blocks. | |
81 | Everything else is done by some sort of settable resources. | |
82 | Layertypes would have to list resources and types. | |
83 | Unknown resource are simply skipped. | |
84 | Unknown Layers are simply skipped until the next '-Layer', include their LayerData blocks if they have one. | |
85 | ||
86 | comments? | |
87 | ||
88 | Issues: | |
89 | ||
90 | #1 | |
91 | One start character would be nice, like | |
92 | !startlayer | |
93 | !endlayer | |
94 | ||
95 | etc. | |
96 | ||
97 | all i can think of for now. | |
98 | ||
99 | Style 5: Win Conf Style | |
100 | ||
101 | [Layer Type=Aggregate] | |
102 | name=Hello World | |
103 | ||
104 | [Layer Type=TRW] | |
105 | name=My Cool Layer | |
106 | draw_tracks=1 | |
107 | draw_waypoints=0 | |
108 | data_format=gpspoint | |
109 | [LayerData] | |
110 | type=waypoint ... | |
111 | [EndLayerData] | |
112 | [EndLayer] | |
113 | ||
114 | [Layer Type=Coord] | |
115 | name=Chord Liar | |
116 | deg_inc=2 | |
117 | [EndLayer] | |
118 | ||
119 | [EndLayer] |