gis.geoip.GeoIP.country_info

GeoIP.country_info This property returns information about the GeoIP country database.

gis.geoip.GeoIP.country_code_by_name()

GeoIP.country_code_by_name(query)

gis.geoip.GeoIP.country_code_by_addr()

GeoIP.country_code_by_addr(query)

gis.geoip.GeoIP.country_code()

GeoIP.country_code(query) Returns only the country code corresponding to the query.

gis.geoip.GeoIP.country()

GeoIP.country(query) Returns a dictionary with the country code and country for the given query.

gis.geoip.GeoIP.coords()

GeoIP.coords(query) Returns a coordinate tuple of (longitude, latitude).

gis.geoip.GeoIP.city_info

GeoIP.city_info This property returns information about the GeoIP city database.

gis.geoip.GeoIP.city()

GeoIP.city(query) Returns a dictionary of city information for the given query. Some of the values in the dictionary may be undefined (None).

gis.geoip.GeoIP

class GeoIP(path=None, cache=0, country=None, city=None) The GeoIP object does not require any parameters to use the default settings. However, at the very least the GEOIP_PATH setting should be set with the path of the location of your GeoIP data sets. The following initialization keywords may be used to customize any of the defaults. Keyword Arguments Description path Base directory to where GeoIP data is located or the full path to where the city or country data files (.dat) are located.

gis.gdal.SpatialReference.__getitem__()

__getitem__(target) Returns the value of the given string attribute node, None if the node doesn’t exist. Can also take a tuple as a parameter, (target, child), where child is the index of the attribute in the WKT. For example: >>> wkt = 'GEOGCS["WGS 84", DATUM["WGS_1984, ... AUTHORITY["EPSG","4326"]]') >>> srs = SpatialReference(wkt) # could also use 'WGS84', or 4326 >>> print(srs['GEOGCS']) WGS 84 >>> print(srs['DATUM']) WGS_1984 >>> print(srs['