Class Geokit::Geocoders::IpGeocoder
In: lib/geokit/geocoders.rb
Parent: Geocoder

Provides geocoding based upon an IP address. The underlying web service is a hostip.info which sources their data through a combination of publicly available information as well as community contributions.

Constants

NON_ROUTABLE_IP_RANGES = [ IPAddr.new('0.0.0.0/8'), # "This" Network IPAddr.new('10.0.0.0/8'), # Private-Use Networks IPAddr.new('14.0.0.0/8'), # Public-Data Networks IPAddr.new('127.0.0.0/8'), # Loopback IPAddr.new('169.254.0.0/16'), # Link local IPAddr.new('172.16.0.0/12'), # Private-Use Networks IPAddr.new('192.0.2.0/24'), # Test-Net IPAddr.new('192.168.0.0/16'), # Private-Use Networks IPAddr.new('198.18.0.0/15'), # Network Interconnect Device Benchmark Testing IPAddr.new('224.0.0.0/4'), # Multicast IPAddr.new('240.0.0.0/4')   A number of non-routable IP ranges.

— Sources for these:

  RFC 3330: Special-Use IPv4 Addresses
  The bogon list: http://www.cymru.com/Documents/bogon-list.html

[Validate]