+ WaySegment.delete_all(['id = ?', self.id])
+
+ i = 1
+ segs.each do |n|
+ seg = WaySegment.new
+ seg.id = self.id
+ seg.segment_id = n
+ seg.sequence_id = i
+ seg.save!
+ i += 1
+ end
+
+ old_way = OldWay.from_way(self)
+ old_way.timestamp = t
+ old_way.save_with_dependencies!
+ end
+
+ return true
+ rescue
+ return nil
+ end