Abstract Complex categorical variables are usually classified into many classes with interclass dependencies, which conventional geostatistical methods have difficulties to incorporate. A two-dimensional Markov chain approach has emerged recently for conditional simulation of categorical variables on line data, with the advantage of incorporating interclass dependencies. This paper extends the approach into a generalized method so that conditional simulation can be performed on grid point samples. Distant data interaction is accounted for through the transiogram – a transition probability-based spatial measure. Experimental transiograms are estimated from samples and further fitted by mathematical models, which provide transition probabilities with continuous lags for Markov chain simulation. Simulated results conducted on two datasets of soil types show that when sufficient sample data are conditioned complex patterns of soil types can be captured and simulated realizations can reproduce transiograms with reasonable fluctuations; when data are sparse, a general pattern of major soil types still can be captured, with minor types being relatively underestimated. Therefore, at this stage the method is more suitable for cases where relatively dense samples are available. The computer algorithm can potentially deal with irregular point data with further development.