An area-preserving map in magnetic coordinates is derived from Hamiltonian equations of motion for magnetic field lines using an infinitesimal canonical transformation of second type. The map generating function for the field lines in the DIII-D is calculated from the experimental data for the shot 115467 at 3000 ms. The poloidal magnetic flux, χ, is the Hamiltonian for field lines. The equilibrium Hamiltonian function for the DIII-D, χ0, is calculated from the shot data as a piece-wise defined function of toroidal flux, ψ. For 0<=ψ<=ψ1, safety factor q increases monotonically to the value 5. For ψ1<=ψ<=ψsep, the safety factor increases logarithmically without limit. ψsep is the toroidal flux inside separatrix in the DII-D. The logarithmic singularity is symmetric about the separatrix. The singular region contains 5% of toroidal flux, and 0.87% of poloidal flux inside the separatrix in the DIII-D shot. In the open field line region outside the separatrix, q is defined by the distance a field line requires to go from its first to its second close approach to the X-point. In this region, the safety factor first decreases to the value 3.8, and then increases. Stochasticity caused by topological noise in the DIII-D shot is calculated using this map. Topological noise consists of modes (m,n) = {(3,1), (4,1), (6,2), (7,2), (8,2), (9,3), (10,3), (11,3), (12,3)} with each amplitude equals to 0.8×10-5. Topological noise creates two very narrow layers of stochasticity. One is inside the separatrix and another is outside the separatrix. From the equilibrium data, a transformation from magnetic coordinates to the DIII-D (R,Z,[lowercase_phi_synonym]) coordinates is calculated. This transformation is used to calculate stochasticity in physical space. Preliminary results of this investigation are presented. This work is supported by DE-FG02-01ER54624 and DE-FG02-04ER54793. © 2006 American Institute of Physics [ABSTRACT FROM AUTHOR]