+ /**
+ * Set (or edit) the specified field value
+ * @param inField Field to set
+ * @param inValue value to set
+ */
+ public void setFieldValue(Field inField, String inValue)
+ {
+ // See if this data point already has this field
+ int fieldIndex = _fieldList.getFieldIndex(inField);
+ // Add to field list if necessary
+ if (fieldIndex < 0)
+ {
+ // If value is empty & field doesn't exist then do nothing
+ if (inValue == null || inValue.equals(""))
+ {
+ return;
+ }
+ // value isn't empty so extend field list
+ fieldIndex = _fieldList.extendList(inField);
+ }
+ // Extend array of field values if necessary
+ if (fieldIndex >= _fieldValues.length)
+ {
+ resizeValueArray(fieldIndex);
+ }
+ // Set field value in array
+ _fieldValues[fieldIndex] = inValue;
+ // Change Coordinate, Altitude, Name or Timestamp fields after edit
+ if (_altitude != null && _altitude.getFormat() != Altitude.Format.NO_FORMAT) {
+ // Altitude already present so reuse format
+ parseFields(inField, _altitude.getFormat());
+ }
+ else {
+ // use default altitude format from config
+ parseFields(inField, Config.getUseMetricUnits()?Altitude.Format.METRES:Altitude.Format.FEET);
+ }
+ }
+
+ /** @param inFlag true for start of track segment */
+ public void setSegmentStart(boolean inFlag)
+ {
+ setFieldValue(Field.NEW_SEGMENT, inFlag?"1":null);
+ }
+
+ /**
+ * Mark the point for deletion
+ * @param inFlag true to delete, false to keep
+ */
+ public void setMarkedForDeletion(boolean inFlag) {
+ _markedForDeletion = inFlag;
+ }
+
+ /** @return latitude */