Edge sensors are devices that measure the penetration depth of an object, such as a railway edge, in a fork-shaped sensor and output it analogously.
Both optical and ultrasound-based solutions are available.