Optimizing Content-Based Image Retrieval for Geolocation Estimation