1. A method comprising: estimating a location of a mobile device in a venue having pathways represented by a path network that includes segments connected by junctions, the estimating including determining a first set of candidate locations for the mobile device; determining that distances between the candidate locations of a first subset of the first set and the corresponding segment or segments are less than a threshold distance; shifting the candidate locations of the first subset to updated candidate locations that are on the corresponding segment or segments of the path network; determining that distances between the candidate locations of a remaining second subset of the first set and corresponding segment or segments are larger than or equal to the threshold distance; and shifting the candidate locations of the second subset to updated locations that are closer to, but not on, the corresponding segment or segments, wherein the shifting of the candidate locations of the first and second subsets results in a second set of candidate locations for the mobile device; and deriving the location of the mobile device from the second set of candidate locations based on a sensor reading from a sensor of the mobile device that senses an environment variable.