1. A method comprising: based on a plurality of parameters that define an intersection in a roadway of an environment, determining, by a computing device, a first configuration of the intersection, wherein the first configuration of the intersection includes one or more of predicted locations of sides of the intersection and predicted pedestrian-control line locations of the intersection; receiving map data based on a detection of the roadway in the environment by sensors on a vehicle that traverses the environment, wherein the map data includes one or more of candidate locations of sides of the intersection and candidate pedestrian-control line locations of the intersection; performing a first optimization of the predicted locations of sides of the intersection to the candidate locations of sides of the intersection to minimize correspondence error between the predicted locations of sides of the intersection and the candidate locations of sides of the intersection for optimal locations of sides of the intersection; performing a second optimization of the predicted pedestrian-control line locations to the candidate pedestrian-control line locations to minimize correspondence error between the predicted pedestrian-control line locations and the candidate pedestrian-control line locations for optimal pedestrian-control line locations; based on one or more of the first optimization and the second optimization, determining a second configuration of the intersection that includes the optimal locations of sides of the intersection and the optimal pedestrian-control line locations; and based on the second configuration of the intersection, navigating an autonomous vehicle through the intersection.