  We consider the problem of determining the Galaxy's gravitational potential
from a star catalogue. We show that orbit-based approaches to this problem
suffer from unacceptable numerical noise deriving from the use of only a finite
number of orbits. An alternative approach, which requires an ability to
determine the model's phase-space density at predetermined positions and
velocities, has a level of numerical noise that lies well below the intrinsic
uncertainty associated with the finite size of the catalogue analysed. A
catalogue of 10000 stars brighter than V=17 and distributed over the sky at
b>30 degrees enables us to determine the scaleheight of the disc that
contributes to the potential with an uncertainty below 20pc if the catalogue
gives proper motions, line-of-sight velocities and parallaxes with errors
typical of the Gaia Catalogue, rising to 36pc if only proper motions are
available. The uncertainty in the disc's scalelength is significantly smaller
than 0.25kpc.
