open_gpx_2_kml 0.10.2 → 0.10.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. data/.gitignore +3 -0
  2. data/Gemfile.lock +1 -1
  3. data/bin/openGpx2Kml +1 -15
  4. data/lib/tf1_converter/environment.rb +22 -0
  5. data/lib/tf1_converter/gpx/waypoint.rb +3 -1
  6. data/lib/tf1_converter/version.rb +1 -1
  7. data/lib/tf1_converter.rb +1 -0
  8. data/spec/environment/Input/Hasty_3-16-13p1_MO-TF1_Weber - BC 60.gpx +1102 -0
  9. data/spec/environment/Input/Hasty_3-16-13p1_MO-TF1_Weber - BC 60_no name issue.gpx +1066 -0
  10. data/spec/environment/Input/Hasty_3-16-13p1_MO-TF1_Weber - BC 62.gpx +826 -0
  11. data/spec/environment/Input/Hasty_3-16-13p1_MO-TF1_Weber - BC 62_no name issue.gpx +794 -0
  12. data/spec/environment/Input/Hasty_3-16-13p1_MO-TF1_Weber - MS 60.gpx +963 -0
  13. data/spec/environment/Input/Hasty_3-16-13p1_MO-TF1_Weber - MS 60_no name issue.gpx +1066 -0
  14. data/spec/environment/Input/Hasty_3-16-13p1_MO-TF1_Weber - MS 62.gpx +379 -0
  15. data/spec/environment/Input/Primary_2-20-12_MO-TF1_SO 2 Weber.gpx +1342 -0
  16. data/spec/environment/Input/Primary_2-22-12_MO-TF1_SO 3 Towsley.gpx +2387 -0
  17. data/spec/environment/Input/Primary_2-22-12_MO-TF1_SO 4 Keller.gpx +1913 -0
  18. data/spec/environment/config.csv +60 -0
  19. data/spec/environment/icons/01.png +0 -0
  20. data/spec/environment/icons/02.png +0 -0
  21. data/spec/environment/icons/03.png +0 -0
  22. data/spec/environment/icons/04.png +0 -0
  23. data/spec/environment/icons/05.png +0 -0
  24. data/spec/environment/icons/06.png +0 -0
  25. data/spec/environment/icons/07.png +0 -0
  26. data/spec/environment/icons/08.png +0 -0
  27. data/spec/environment/icons/09.png +0 -0
  28. data/spec/environment/icons/10.png +0 -0
  29. data/spec/environment/icons/11.png +0 -0
  30. data/spec/environment/icons/12.png +0 -0
  31. data/spec/environment/icons/13.png +0 -0
  32. data/spec/environment/icons/14.png +0 -0
  33. data/spec/environment/icons/15.png +0 -0
  34. data/spec/environment/icons/16.png +0 -0
  35. data/spec/environment/icons/17.png +0 -0
  36. data/spec/environment/icons/18.png +0 -0
  37. data/spec/environment/icons/19.png +0 -0
  38. data/spec/environment/icons/20.png +0 -0
  39. data/spec/environment/icons/21.png +0 -0
  40. data/spec/environment/icons/22.png +0 -0
  41. data/spec/environment/icons/23.png +0 -0
  42. data/spec/environment/icons/24.png +0 -0
  43. data/spec/environment/icons/25.png +0 -0
  44. data/spec/environment/icons/26.png +0 -0
  45. data/spec/integration/harness_spec.rb +7 -0
  46. data/spec/lib/tf1_converter/gpx/waypoint_spec.rb +14 -0
  47. data/spec/lib/tf1_converter/kml/track_color_spec.rb +1 -0
  48. metadata +80 -3
@@ -0,0 +1,60 @@
1
+ Switch for Using Constant Color ('true' for constant color; 'false' for cycle through table of colors),,,
2
+ USE_CONSTANT_COLOR,,,
3
+ FALSE,,,
4
+ ,,,
5
+ The color to use if the constant color switch is 'true' (must be a name from the track colors table below),,,
6
+ CONSTANT_COLOR,,,
7
+ Blue,,,
8
+ ,,,
9
+ Table of Track Colors for Batch Rotation (Name; KML Hex),,,
10
+ COLORS,,,
11
+ White,ffffffff,,
12
+ DarkRed,f0000080,,
13
+ Yellow,f000ffff,,
14
+ Blue,f0ff0000,,
15
+ Red,f01400ff,,
16
+ Orange,f014b4ff,,
17
+ Green,f000b414,,
18
+ Purple,f0ff7878,,
19
+ Pink,f0ff78f0,,
20
+ Black,00000000,,
21
+ ,,,
22
+ The path of the directory where you are putting gpx files to be converted,,,
23
+ INPUT,,,
24
+ spec/environment/Input,,,
25
+ ,,,
26
+ The path of the directory where you want the converted kmz and csv files,,,
27
+ OUTPUT,,,
28
+ spec/environment/Output,,,
29
+ ,,,
30
+ The full path of the directory where your icons are stored,,,
31
+ ICON_PATH,,,
32
+ spec/environment/icons,,
33
+ ,,,
34
+ Table of Icons (gpx custom symbol name; GE filename; meaning; waypoint name),,,
35
+ ICONS,,,
36
+ Custom 0,01.png,Structure No Damage,&01
37
+ Custom 1,02.png,Structure Minor Damage,&02
38
+ Custom 2,03.png,Structure Major Damage,&03
39
+ Custom 3,04.png,Structure Destroyed,&04
40
+ Custom 4,05.png,Assisted,&05
41
+ Custom 5,06.png,Evacuated,&06
42
+ Custom 6,07.png,Rescued,&07
43
+ Custom 7,08.png,Follow-Up Form,&08
44
+ Custom 8,09.png,Victim Detected,&09
45
+ Custom 9,10.png,Confirmed Victim,&10
46
+ Custom 10,11.png,Human Remains,&11
47
+ Custom 11,12.png,Confirmed Victim Removed,&12
48
+ Custom 12,13.png,Shelter in Place,&13
49
+ Custom 13,14.png,Animal Issue,&14
50
+ Custom 14,15.png,Emergency Shelter,&15
51
+ Custom 15,16.png,Emergency Food Distribution Center,&16
52
+ Custom 16,17.png,Fire Incident,&17
53
+ Custom 17,18.png,Hazardous Material Incident,&18
54
+ Custom 18,19.png,Targeted Search,&19
55
+ Custom 19,20.png,Flood/Water Level,&20
56
+ Custom 20,21.png,Helicopter Landing Site,&21
57
+ Custom 21,22.png,Route Blocked,&22
58
+ Custom 22,23.png,Extra 23,&23
59
+ Custom 23,24.png,Extra 24,&24
60
+ Default,default.png,Default,
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,7 @@
1
+ require 'tf1_converter'
2
+
3
+ describe 'running a directory of files' do
4
+ it 'does not error out' do
5
+ TF1Converter::Environment.process('spec/environment/config.csv')
6
+ end
7
+ end
@@ -66,5 +66,19 @@ module TF1Converter::Gpx
66
66
  waypoint.icon_meaning.should == 'Default'
67
67
  end
68
68
  end
69
+
70
+ describe '#timestamp' do
71
+
72
+ it 'pulls from the cmt value first' do
73
+ fragment = %Q{ <wpt> <cmt>Time1</cmt> <time>Time2</time> </wpt> }
74
+ waypoint_from(fragment).timestamp.should == 'Time1'
75
+ end
76
+
77
+ it 'grabs the time element if there is no cmt' do
78
+ fragment = %Q{ <wpt> <time>Time2</time> </wpt> }
79
+ waypoint_from(fragment).timestamp.should == 'Time2'
80
+ end
81
+
82
+ end
69
83
  end
70
84
  end
@@ -22,6 +22,7 @@ module TF1Converter::Kml
22
22
  end
23
23
 
24
24
  it 'left pads each color' do
25
+ TrackColor.uncache!
25
26
  colors.each{ |v| v.should =~ /^0000000\d$/ }
26
27
  end
27
28
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: open_gpx_2_kml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.2
4
+ version: 0.10.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -177,6 +177,7 @@ files:
177
177
  - lib/tf1_converter.rb
178
178
  - lib/tf1_converter/config.rb
179
179
  - lib/tf1_converter/csv_file.rb
180
+ - lib/tf1_converter/environment.rb
180
181
  - lib/tf1_converter/gpx/track.rb
181
182
  - lib/tf1_converter/gpx/trackpoint.rb
182
183
  - lib/tf1_converter/gpx/waypoint.rb
@@ -189,11 +190,49 @@ files:
189
190
  - lib/tf1_converter/version.rb
190
191
  - openGpx2Kml.gemspec
191
192
  - output/test.kml
193
+ - spec/environment/Input/Hasty_3-16-13p1_MO-TF1_Weber - BC 60.gpx
194
+ - spec/environment/Input/Hasty_3-16-13p1_MO-TF1_Weber - BC 60_no name issue.gpx
195
+ - spec/environment/Input/Hasty_3-16-13p1_MO-TF1_Weber - BC 62.gpx
196
+ - spec/environment/Input/Hasty_3-16-13p1_MO-TF1_Weber - BC 62_no name issue.gpx
197
+ - spec/environment/Input/Hasty_3-16-13p1_MO-TF1_Weber - MS 60.gpx
198
+ - spec/environment/Input/Hasty_3-16-13p1_MO-TF1_Weber - MS 60_no name issue.gpx
199
+ - spec/environment/Input/Hasty_3-16-13p1_MO-TF1_Weber - MS 62.gpx
200
+ - spec/environment/Input/Primary_2-20-12_MO-TF1_SO 2 Weber.gpx
201
+ - spec/environment/Input/Primary_2-22-12_MO-TF1_SO 3 Towsley.gpx
202
+ - spec/environment/Input/Primary_2-22-12_MO-TF1_SO 4 Keller.gpx
203
+ - spec/environment/config.csv
204
+ - spec/environment/icons/01.png
205
+ - spec/environment/icons/02.png
206
+ - spec/environment/icons/03.png
207
+ - spec/environment/icons/04.png
208
+ - spec/environment/icons/05.png
209
+ - spec/environment/icons/06.png
210
+ - spec/environment/icons/07.png
211
+ - spec/environment/icons/08.png
212
+ - spec/environment/icons/09.png
213
+ - spec/environment/icons/10.png
214
+ - spec/environment/icons/11.png
215
+ - spec/environment/icons/12.png
216
+ - spec/environment/icons/13.png
217
+ - spec/environment/icons/14.png
218
+ - spec/environment/icons/15.png
219
+ - spec/environment/icons/16.png
220
+ - spec/environment/icons/17.png
221
+ - spec/environment/icons/18.png
222
+ - spec/environment/icons/19.png
223
+ - spec/environment/icons/20.png
224
+ - spec/environment/icons/21.png
225
+ - spec/environment/icons/22.png
226
+ - spec/environment/icons/23.png
227
+ - spec/environment/icons/24.png
228
+ - spec/environment/icons/25.png
229
+ - spec/environment/icons/26.png
192
230
  - spec/fixtures/expected.kml
193
231
  - spec/fixtures/ftwood2.gpx
194
232
  - spec/fixtures/ftwood2_expected.kml
195
233
  - spec/fixtures/test.gpx
196
234
  - spec/fixtures/waypoint-by-name.gpx
235
+ - spec/integration/harness_spec.rb
197
236
  - spec/lib/tf1_converter/config_spec.rb
198
237
  - spec/lib/tf1_converter/csv_file_spec.rb
199
238
  - spec/lib/tf1_converter/gpx/track_spec.rb
@@ -215,7 +254,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
215
254
  version: '0'
216
255
  segments:
217
256
  - 0
218
- hash: 1443026133062831129
257
+ hash: 2485090832370901195
219
258
  required_rubygems_version: !ruby/object:Gem::Requirement
220
259
  none: false
221
260
  requirements:
@@ -224,7 +263,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
224
263
  version: '0'
225
264
  segments:
226
265
  - 0
227
- hash: 1443026133062831129
266
+ hash: 2485090832370901195
228
267
  requirements: []
229
268
  rubyforge_project:
230
269
  rubygems_version: 1.8.23
@@ -232,11 +271,49 @@ signing_key:
232
271
  specification_version: 3
233
272
  summary: A GPX to KML converter for FEMA US&R
234
273
  test_files:
274
+ - spec/environment/Input/Hasty_3-16-13p1_MO-TF1_Weber - BC 60.gpx
275
+ - spec/environment/Input/Hasty_3-16-13p1_MO-TF1_Weber - BC 60_no name issue.gpx
276
+ - spec/environment/Input/Hasty_3-16-13p1_MO-TF1_Weber - BC 62.gpx
277
+ - spec/environment/Input/Hasty_3-16-13p1_MO-TF1_Weber - BC 62_no name issue.gpx
278
+ - spec/environment/Input/Hasty_3-16-13p1_MO-TF1_Weber - MS 60.gpx
279
+ - spec/environment/Input/Hasty_3-16-13p1_MO-TF1_Weber - MS 60_no name issue.gpx
280
+ - spec/environment/Input/Hasty_3-16-13p1_MO-TF1_Weber - MS 62.gpx
281
+ - spec/environment/Input/Primary_2-20-12_MO-TF1_SO 2 Weber.gpx
282
+ - spec/environment/Input/Primary_2-22-12_MO-TF1_SO 3 Towsley.gpx
283
+ - spec/environment/Input/Primary_2-22-12_MO-TF1_SO 4 Keller.gpx
284
+ - spec/environment/config.csv
285
+ - spec/environment/icons/01.png
286
+ - spec/environment/icons/02.png
287
+ - spec/environment/icons/03.png
288
+ - spec/environment/icons/04.png
289
+ - spec/environment/icons/05.png
290
+ - spec/environment/icons/06.png
291
+ - spec/environment/icons/07.png
292
+ - spec/environment/icons/08.png
293
+ - spec/environment/icons/09.png
294
+ - spec/environment/icons/10.png
295
+ - spec/environment/icons/11.png
296
+ - spec/environment/icons/12.png
297
+ - spec/environment/icons/13.png
298
+ - spec/environment/icons/14.png
299
+ - spec/environment/icons/15.png
300
+ - spec/environment/icons/16.png
301
+ - spec/environment/icons/17.png
302
+ - spec/environment/icons/18.png
303
+ - spec/environment/icons/19.png
304
+ - spec/environment/icons/20.png
305
+ - spec/environment/icons/21.png
306
+ - spec/environment/icons/22.png
307
+ - spec/environment/icons/23.png
308
+ - spec/environment/icons/24.png
309
+ - spec/environment/icons/25.png
310
+ - spec/environment/icons/26.png
235
311
  - spec/fixtures/expected.kml
236
312
  - spec/fixtures/ftwood2.gpx
237
313
  - spec/fixtures/ftwood2_expected.kml
238
314
  - spec/fixtures/test.gpx
239
315
  - spec/fixtures/waypoint-by-name.gpx
316
+ - spec/integration/harness_spec.rb
240
317
  - spec/lib/tf1_converter/config_spec.rb
241
318
  - spec/lib/tf1_converter/csv_file_spec.rb
242
319
  - spec/lib/tf1_converter/gpx/track_spec.rb