Soil sampling and measurement often consume a significant portion of the budget available for a project. On a national or worldwide basis these activities require large investments, which are justified if the soil information leads to better decisions on land use or environmental issues to an extend which more than counterbalances the costs. This depends on both the costs and the quality of the information. At present soil sampling schemes are designed ad hoc or according to a protocol. In either case the available prior information on soil variability and statistical knowledge on spatial sampling is often not fully exploited. This may lead to unnecessarily high costs or low quality of the information. Therefore, sampling schemes should be designed such that either the costs are minimized under quality requirements related to the aim of the survey, or the quality is maximized for a given budget. Important aspects of quality are accuracy and precision, which can be quantified as sampling and measurement error. In this paper we describe a knowledge-based system that assists in the design of soil survey schemes. The system facilitates the full use of prior information as well as pedological, operational and statistical knowledge. Part of the knowledge will be formalized as decision rules that guide the user to suitable types of sampling designs. In addition, models and algorithms are proposed to predict the accuracy and the costs of the information, taking into account differences in spatial variability or sampling costs between sub-regions. Finally, given a stratification of the area, dynamic programming is used to determine the optimal allocation to the strata of sample points, clusters of sample points (e.g. on transects), or primary units for further (secondary) sampling. Our methodology enables prior evaluation and objective comparison of the efficiency of sampling schemes, taking into account the available resources such as budget, equipment, laboratory capacity or time available for fieldwork. The prediction and optimization part of the system is illustrated with an example of stratified sampling to estimate the areal fraction saturated with phosphate. With the given budget, the geometry of the area and four equally sized strata, the variograms and the cost functions, Simple Random Sampling for the strata turned out the be more efficient than Two-Stage Sampling from the same strata.