if segment_ids.length > 0
way_segments = WaySegment.find_all_by_segment_id(segment_ids)
way_ids = way_segments.collect {|way_segment| way_segment.id }
if segment_ids.length > 0
way_segments = WaySegment.find_all_by_segment_id(segment_ids)
way_ids = way_segments.collect {|way_segment| way_segment.id }