Abstract: A method of building a database of beacon locations is disclosed. Mobile devices submit beacon sighting data to a server; the server using the beacon sighting data to build the database of beacon locations using force directed graph calculations. An iterative process calculates the optimal placement of beacons in a 2D or 3D topology of nodes and edges using force directed graph calculations.