On Geometric Constraints For Practical Visual Localization