We present a molecular dynamics study on the stretching of a linear polymer chain that is adsorbed at the junction of two intersecting flat surfaces of varying alignments. We observe a transition from a two-dimensional to one-dimensional (1D) structure of the adsorbed polymer when the alignment, i.e., the angle between the two surfaces that form a groove, θ, is below 135°. We show that the radius of gyration of the polymer chain Rg scales as Rg ∼ N(3/4) with the degree of polymerization N for θ = 180° (planer substrate), and the scaling changes to Rg ∼ N(1.0) for θ < 135° in good solvents. At the crossover point, θ = 135°, the exponent becomes 1.15. The 1D stretching of the polymer chain is found to be 84% of its contour length for θ ⩽ 90°. The center of mass diffusion coefficient D decreases sharply with θ. However, the diffusion coefficient scales with N as D ∼ N(-1), and is independent of θ. The relaxation time τ, for the diffusive motion, scales as τ ∼ N(2.5) for θ = 180° (planar substrate), which changes to τ ∼ N(3.0) for θ ⩽ 90°. At the crossover point, the exponent is 3.4, which is slightly higher than the 1D value of 3.0. Further, a signature of reptation-like dynamics of the polymer chain is observed at the junction for θ ⩽ 90° due to its strong 1D localization and stretching.