In wireless sensor networks (WSN), which are composed of unreliable sensor nodes, preserving the connectivity is a serious problem and one of the most effective solutions of this problem is to deploy powerful relay nodes (RN). The location of the RN is an important parameter for the network performance. In this paper, we investigate relay node placement (RNP) problem on a weighted terrain structure to satisfy WSN connectivity. Contrary to the existing studies, instead of minimizing the number of RN, the main objective of weighted RNP is to minimize the total weight of the points on which RN are deployed. In order to solve the weighted RNP problem, a mathematical formulation is proposed to find the optimal solution. However, because of the NP-complete nature of the problem, a polynomial time heuristic algorithm is also developed. Performance results show that the proposed heuristic algorithm can find near-optimal solutions in a reasonable time bound.