- String[] pointArray = makeStringArray(coordArray[p], null);
- if (p==0) {pointArray[4] = "1";}
- _pointList.add(pointArray);
+ if (coordArray[p] != null && coordArray[p].trim().length()>3)
+ {
+ String[] pointArray = makeStringArray(coordArray[p], null, null);
+ if (firstPoint) {pointArray[5] = "1";} // start of segment flag
+ firstPoint = false;
+ _pointList.add(pointArray);
+ }
+ _linkList.add(null);
+ }
+ }
+ }
+
+ /**
+ * Process a Gx track including timestamps
+ */
+ private void processGxTrack()
+ {
+ if (_whenList.size() > 0 && _whenList.size() == _whereList.size())
+ {
+ // Add each of the unnamed track points to list
+ boolean firstPoint = true;
+ final int numPoints = _whenList.size();
+ for (int p=0; p < numPoints; p++)
+ {
+ String when = _whenList.get(p);
+ String where = _whereList.get(p);
+ if (where != null)
+ {
+ String[] coords = where.split(" ");
+ if (coords.length == 3)
+ {
+ String[] pointArray = new String[7];
+ pointArray[0] = coords[0];
+ pointArray[1] = coords[1];
+ pointArray[2] = coords[2];
+ // leave name and description empty
+ if (firstPoint) {pointArray[5] = "1";} // start of segment flag
+ firstPoint = false;
+ pointArray[6] = when; // timestamp
+ _pointList.add(pointArray);
+ }
+ }
+ _linkList.add(null);