- # make sure segments are output in sequence_id order
- ordered_segments = []
- self.way_segments.each do |seg|
- if visible_segments
- # if there is a list of visible segments then use that to weed out deleted segments
- if visible_segments[seg.segment_id]
- ordered_segments[seg.sequence_id] = seg.segment_id.to_s
+ # make sure nodes are output in sequence_id order
+ ordered_nodes = []
+ self.way_nodes.each do |nd|
+ if visible_nodes
+ # if there is a list of visible nodes then use that to weed out deleted nodes
+ if visible_nodes[nd.node_id]
+ ordered_nodes[nd.sequence_id] = nd.node_id.to_s