Determining a Station's Location
There is no database that provides accurate up-to-the-minute location information for every active amateur radio callsign around the world. The only accurate source of such location information is your QSO partner.
In some countries, a station's location within a DXCC entity can be determined by analyzing the station's callsign. DXLab's DXCC database supports location determination via callsign analysis. For example, information in the DXCC database makes it possible to determine that LU3ADP is located in Buenos Aires City.
Callsign analysis is useless for stations licensed by the United States Federal Communications Commission (FCC), as US-licensed stations can operate from any US state or territory without adding a prefix to their callsign. However, DXLab's USAP database contains a US State and Gridsquare extracted from the postal address each FCC-licensed station last filed with the FCC. Note that the grid square is computed as the centroid of the station's zipcode; this is sufficiently accurate for aiming directional antennas, but not accurate enough for pursing awards based on grid squares, like VUCC.
If your QSO partner QSLs via LoTW, than his or her "Station Location" (presumably) contains accurate location information.
If you've already logged a QSO with a station, then you may have logged that station's location at the time of that QSO.
DXKeeper can be configured to query a local or online callbook to obtain the location information last posted there by whoever manages the entry for a callsign, typically, its owner.
Because some ops move permanently without updating the FCC or their callbook entries, or temporarily operate from locations other than their home QTHs without updating their callbook entries, DXLab provides an Override List, in which you can specify the locations of stations known to be operating from locations other than their home QTHs. You can optionally populate the Override List with exceptions reported by Club Log or in Jim AD1C's CTY list.
When directed to log a QSO whose location information has not been specified, DXKeeper employs more sources of information, in this order:
the Override List
the location extracted from the most recent previous QSO with the station (if one exists in your log, and if the Display Previous QSOs on Lookup option is enabled)
the location reported by the callbook you've configured DXKeeper to utilize
the USAP database
DXKeeper can also update a QSO's location when you direct DXKeeper to update logged QSOs with information from LoTW confirmations. If appropriately configured, DXKeeper will alert you if the location information reported by LoTW differs from what's present in the logged QSO.
A received QSL card may also specify your QSO partner's location, but you must manually update the logged QSO if necessary.