Add keeping nearest line feature