The use of wireless sensors has expanded across various industries, highlighting the need for accurate positioning research. In irregular network environments, conventional distance vector jump algorithms result in poor localization performance. To solve this problem, an improved distance vector jump algorithm is proposed in this study. The algorithm introduces geometric constraint mechanism and optimized weighted DV-HOP localization algorithm. The proposed method applies an optimal weight function to determine the hop count from unknown nodes to anchor nodes and calculates the unknown node coordinates using the least squares method. Additionally, geometric constraint mechanisms are used to eliminate positioning errors caused by outliers. The experimental results demonstrate that the positioning error is 0.37% in C-type network environment, 0.38% in F-type network environment, 0.29% in L-type network environment and 0.30% in H-type network environment. These results verify the effectiveness of the proposed algorithm in reducing positioning errors, which can meet the accuracy requirements of practical applications in complex network environments.