The GeoIPService has a public method getLocation that receives a string representing the IP address and looks for this IP address in the GeoIP location database. This method returns an object of class location with the geographic location of that specific IP address.
https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0244918