This paper presents a piecewise line generalization algorithm (PG) based on shape characteristic analysis. An adaptive threshold algorithm is used to detect all corners, from which key points are selected. The line is divided into some segments by the key points and generalized piecewise with the Li-Openshaw algorithm. To analyze the performance, line features with different complexity are used. The experimental results compared with the DP algorithm and the Li-Openshaw algorithm show that the PG has better performance in keeping the shape characteristic with higher position accuracy.