A methodology for the determination of the subsurface line direction of dislocations using scanning tunneling microscopy (STM) images is presented. The depth of the dislocation core is derived from an analysis of the displacement field measured by STM. The methodology is illustrated for dislocations at GaN(10 10) cleavage surfaces. It is found that the dislocation line bends toward the surface, changing from predominantly edge-type to more screw-type character, when approaching the intersection point. Simultaneously, the total displacement detectable at the surface increases due to a preferred relaxation towards the surface. V C 2015 AIP Publishing LLC.