67cherries
67cherries

Reputation: 6951

How to Find Which Ocean a Coordinate is on

I have some coordinates, which will always be somewhere in an ocean. I need a way to convert the coordinates into a string telling which ocean/sea the coordinate falls. Is there any convenient way to do this?

Thanks

Upvotes: 2

Views: 241

Answers (2)

Kamaros
Kamaros

Reputation: 4566

If you're using MapKit, you can use the CLGeocoder method – reverseGeocodeLocation:completionHandler: to perform a reverse geocoding request. The completion handler returns an array of CLPlacemark objects. If you take a look at the CLPlacemark Class Reference, you'll see that there is an ocean property that contains the name of the ocean associated with the placemark. I'm assuming this will also apply to seas; if not, try the inlandWater property instead.

Upvotes: 5

Related Questions