In LDS canon, is the Final Judgement before or after the resurrection? I've always understood the Final Judgment to occur just before the resurrection because the judgement determines which glory you are resurrected to. The Gospel Principles lesson on the Final Judgement seems to imply that also. It makes sense because we are to be resurrected to a glory, but that glory is dependent on the outcome of our judgement.

However I was reading in 2 Nephi 9 this morning where it says that the resurrection comes before judgment.


  13 O how great the plan of our God! For on the other hand, the
  paradise of God must deliver up the spirits of the righteous, and the
  grave deliver up the body of the righteous; and the spirit and the
  body is restored to itself again, and all men become incorruptible,
  and immortal....
  
  15 And it shall come to pass that when all men shall have passed from
  this first death unto life, insomuch as they have become immortal,
  they must appear before the judgment-seat of the Holy One of Israel;
  and then cometh the judgment, and then must they be judged according
  to the holy judgment of God.


There in verse 13 it says that the spirit and body are reunited (resurrection) and so we become immortal. Then in verse 15 it says that after we become immortal (resurrected) we will be judged.

So which is it? Does the judgment occur before or after the resurrection?
In Alma 40, it also states:


  21 But whether it be at his [Christ's] resurrection or after, I do not say; but
  this much I say, that there is a space between death and the
  resurrection of the body, and a state of the soul in happiness or in
  misery until the time which is appointed of God that the dead shall
  come forth, and be reunited, both soul and body, and be brought to
  stand before God, and be judged according to their works.


Which means, the final judgement is after the resurrection.

But remember also that the resurrection of the unjust is later than the resurrection of the just:

Doctrine and Covenants 76:63-65 (speaking of celestial glory)


  63 These are they whom he shall bring with him, when he shall come in
  the clouds of heaven to reign on the earth over his people.
  
  64 These are they who shall have part in the first resurrection.
  
  65 These are they who shall come forth in the resurrection of the
  just.


Doctrine and Covenants 76:85 (speaking of telestial glory)


  85 These are they who shall not be redeemed from the devil until the
  last resurrection, until the Lord, even Christ the Lamb, shall have
  finished his work.


So, yes, we are judged after we have been resurrected, and how that judgement is going to turn out determines when it happens (along with the resurrection of that individual). That makes perfect sense given the divine mercy, since that way the individual gets as much time as possible to repent, up until the appointed time of the Final Judgement.

So, both things you said are true (judgement determines how and when we are resurrected, but resurrection happens before the judgement), but as an event, resurrection happens before the judgement. Maybe the confusion clears if we settle with the following formulation: Our actions (and motives etc. and not forgetting this is only possible due to divine grace) determine when we are resurrected, how we are resurrected, and what the outcome of the judgement will be.