For drones and missiles, this technique is known as Terrain Contour Matching. If terrain contour are measured optically, navigation is independent of RF jamming, unlike GNSS.
Fun fact: the usage of TERCOM in the tomahawk missile actually limited its ability to be used in Operation Desert Storm. Routes had to be planned to go around actual topographical features, instead of hundreds of miles of flat desert.