NEMA enclosure types for electrical equipment (12, 13, 4X and others) - also cover corrosion, ice and oil; there is no direct conversion to an IP code.
The standard specifies construction, characteristics, applications, marking, design tests and field modifications for electrical equipment enclosures rated up to 1000 V. It defines 16 enclosure types in three groups: indoor (1, 2, 5, 12, 12K, 13), indoor and outdoor (3, 3X, 3R, 3RX, 3S, 3SX, 4, 4X, 6, 6P) and hazardous locations (7, 9).
NEMA types also cover resistance to corrosion, icing and oil - characteristics not included in the IEC 60529 IP code, so conversion from IP to a NEMA type is only approximate.
NEMA 4X for a trackside enclosure means tested resistance to water jets, dust, icing and corrosion - more than an IP66 code alone.