In the wild, the positioning method based on Global Navigation Satellite System (GNSS) can easily become invalid in some cases. We propose a geo-location method that can be used without manual feedback even in the absence of GNSS signals. This method belongs to a vision-based method, which is realized through horizon image retrieval. Horizon image retrieval is a task with a huge database in which each image has a unique label, and different images cannot be divided into a single category. To solve this problem, we develop a new training method called “a few-shot image classification training method for serving image retrieval problems” (FSCSR). This method involves training on multiple few-shot classification tasks and updating the parameters by testing on image retrieval tasks, thereby obtaining a feature extraction model that meets the retrieval requirements. A new neural network, named HorizonSegNet, specifically designed for horizon images is also proposed. HorizonSegNet, trained with FSCSR, demonstrated its effectiveness in the experiments. Besides, a search strategy called “area hierarchy search” is proposed to increase the accuracy and speed of retrieval as well. In the experiments that conducted on 182.72 km² of land, our positioning method achieved a 95.775% success rate with an evaluation error of 40.23 m. The results verified the conclusion that our positioning accuracy is generally higher than that of other positioning methods. © The Author(s), under exclusive licence to Springer Science+Business Media, LLC, part of Springer Nature 2024.