In modern geomagnetic and gravity surveys, field intensities are measured quite accurately, while field directions are often not measured at all. Determining the field from the survey data leads to an apparently new kind of boundary-value problem: given an open subset V of n-dimensional Euclidean space εn, and given a positive, real, continuous function ε(x1,…, xn) defined on ∂V, the boundary of V, we seek a real function ε(x1,ε, xn) harmonic in V and such that |∇ε|, the magnitude of the gradient of ε, is equal to m on ∂V. Is there always a solution ε and is it unique? When n = 2, we prove that for any points z0,z1,…, za in V, there is precisely one harmonic solution ε satisfying the boundary conditions and such that ∇ε has a chosen direction at z0 and vanishes at z1,…, za and nowhere else in V. This non-uniqueness can be removed by the use of physical information not in the boundary-value problem as originally posed, but often easily obtainable. When n ≥ 3, we have no results on existence. If V is bounded, the non-uniqueness becomes worse as n increases, but if V is the exterior of a bounded set we have some partial results which suggest that the solution 5 be unique. In particular, if ∣∇Φ∣ is known throughout V, ε is determined except for sign; and if V is the exterior of a sphere and ε is known to be a finite sum of exterior spherical harmonics, then ε in V is determined except for sign by ∣∇Φ∣ on ∂V. Finally, if V is the exterior of a convex, bounded set and ε is a gravitational field (i.e. can be extended to be sub-harmonic in εn) then ε is uniquely determined in V by the values of ∣∇Φ∣ on ∂V.