1. A method of determining principal directions for an environment, the principal directions relating to vehicle operation within the environment, the method comprising: forming a graphical model of the environment, the graphical model having nodes corresponding to spatial locations within the environment, the graphical model being a Markov random field model; determining principal directions for the nodes using linear features detected within the environment.