Added snapToClosestNode for road generation purposes