Extraction of current density distribution from local magnetic measurements