Question

I am using MaxMind GeoIP2 database to determine client's location (longitude, latitude, city, country) based on IP address. For that I'm using Python library geoip2 and local GeoLite2-City.mmdb database.

In order to get more precise result I want to use HTML5 geolocation in addition which returns only coordinates of the client.

I want to use the already existing MaxMind local database to get the country and city based on the coordinates from HTML5 method.

Is it possible and how?

Was it helpful?

Solution

You might want to check the services they provide (I did not see them having what you are looking for), and then maybe contecting their support for more assistance.

Anyways, you could easily use any Reverce Geocoding service which provides REST interface for determining the country (and actuall more accurate address), thus I would suggest you reconsider the requirements on utilizing the original provider for the purpose.

If for some reason you need to have a certain Geo-location for all users in same city, then after reverce geocoding the city & country, use those values (without any actual street address) with geocoding service to get the 'center' of the city.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top