The intergalactic adventures of Lt. Colonel John Sheppard have been derailed ... at least as a married man -- TMZ has learned, "Stargate Atlantis" star Joe Flanigan's wife has filed for legal separation.
Katherine Kousi -- who starred in a bunch of 90s classics like "Encino Man" and "Bio-Dome" -- filed the docs in L.A. citing irreconcilable differences. They got married 17 years ago and separated in November.
They have three sons -- a 13-year-old, an 11-year-old, and a 7-year-old -- and Katherine wants physical custody. She's open to splitting legal custody and giving Joe visitation.
As for spousal support, Katherine's not feeling generous ... she wants to block the court from awarding him money. And she wants him to foot her legal bills.