Vector is an important type of geospatial data, discretization is an important link for its fusion with raster data, and the generation of the discrete line is the basic problem. In view of the shortcomings of discrete line generation algorithm of triangular grid, this paper proposes a mathematical model for establishing the equivalent triangle grid discrete line mathematical model by means of the weak duality hexagonal grid and solving it by dimensionality reduction. Firstly, according to the weak duality relationship between the triangular grids and the hexagonal grids, an equivalent triangular grid discrete line model is established based on the hexagonal grids. Then, using the dimension reduction method, the two-dimensional discrete line model is equivalently transformed into a one-dimensional closed path solution. Finally, a discrete triangle conversion generation algorithm for planar triangular grids is designed and implemented. The experimental results show that the proposed algorithm is ingenious and rigorous in theory and beneficial to the programming. The operation efficiency is about 9-10 times of the similar algorithms, with a better result. This algorithm can be applied to vector data in real-time grid transformation, terrain modeling, spatial analysis, simulation and other fields, with broad application prospects.