리버스 지오코딩: 지리적 좌표로 설명된 위치를 사람이 읽을 수 있는 주소 또는 장소 이름으로 변환하는 과정
위도와 경도값보다는 장소명이 사용자 친화적이다.
CLLocationManager나 CLGeocoder 클래스를 사용하여 위치값과 이름을 변환할 수 있다.
let geocoder = CLGeocoder()
geocoder.reverseGeocodeLocation(location) { placemarks, error in
guard error == nil, let placemark = placemarks?.first else { return }
print(placemark.name)
}
let geocoder = CLGeocoder()
geocoder.geocodeAddressString(address) { placemarks, error in
guard error == nil, let location = placemarks?.first?.location else { return }
print(location)
}
**Converting Between Coordinates and User-Friendly Place Names**