Underground corrosion control engineers collect soil samples to test soil chemistry for corrosive factors such as pH, minimum soil resistivity, chlorides, sulfates, ammonia, nitrates, sulfide, and redox potential. They collect samples from the depth that infrastructure will occupy, because soil properties may change from strata to strata. The minimum test of in-situ soil resistivity is measured using the Wenner four pin method if often performed to judge a sites corrosivity. However, during a dry period, the test may not show actual corrosivity, since underground condensation can leave soil in contact with buried metal surfaces more moist.  This is why measuring a soils minimum or saturated resistivity is important. Soil resistivity testing alone does not identify corrosive elements. Corrosion engineers can investigate locations experiencing active corrosion using above ground survey methods and design corrosion control systems such as cathodic protection to stop or reduce the rate of corrosion.
Geotechnical engineers typically do not practice corrosion engineering, and refer clients to a corrosion engineer if soil resistivity is below 3,000 ohm-cm or less, depending the soil corrosivity categorization table they read. Unfortunately, an old dairy farm can have soil resistivities above 3,000 ohm-cm and still contain corrosive ammonia and nitrate levels that corrode copper piping or grounding rods. A general saying about corrosion is, "If the soil is great for farming, it is great for corrosion."