http://forum.supercell.net/showthread.php/237478-Clan-Wars-FEEDBACK-here Official answer from Supercell.
Scroll down to about mid page.
War map rank is determined by overall defense.
Once a match is found, players are sorted on the map from strongest to weakest, in terms of defence power of their base, i.e., defense levels, hero levels, traps, etc.
We do not take TH levels into account.
Instead, we only use overall strength of all defence elements in player’s village.
For example, a TH8 with higher level defenses than a TH9 will be ranked higher than the TH9 in the war map.
gaming.stackexchange.com/users/80963/user80963
The bases are ordered from highest to lowest strength.
Strength is based on each member’s attacking power this includes available types and levels of troops, army camp capacity, spells and heroes.
Along with your defensive strength, which includes defensive buildings, walls, traps and heroes.
Your position has nothing to do with your trophies, Player level, Town Hall level, Achievements, or EXP.
gaming.stackexchange.com/users/77311/Jonco98
So as I understand it, rank is based on what defenses you have (defensive buildings, heroes, walls), and not the way in which they are laid out.
It has nothing to do with player level, although level gives you a rough estimate of a player's total progress through the game in terms of buildings and achievements.
So basically, moving things around on your base to improve your layout won't help your war ranking, only upgrading or building new defenses will do so.
gaming.stackexchange.com/users/80975/Lord Weston
Your clan rank in a war is determined by your defence strength, that is calculated by the cost of your highest upgrades and total cost excluding walls.
I have the highest level but am 7th in my clan
gaming.stackexchange.com/users/80176/Toploader
The way I understand it is your trophy count gets you into the war, then the strength of your base defence determines where you rank in the clan war map.
For example, your clan has 50 members and you go to war with a clan that has 40, then the war will be 40v40.
The top 40 players in your clan (ranked by trophy count) will join the war, the remaining 10 will be spectators.
Then the 40 players fighting for your clan will be ranked 1-40 on the war map based on the strength of base defence regardless of trophy count.
Hope this helps A co-leader has the right to select whom from his clan are participating in the clan war.
But there must always be either a round number or a number between 1-50 with five at the end.
gaming.stackexchange.com/users/81173/Bob
Clan War position depends on your defense strength.
Not the level, not the trophies, but HOW GOOD YOUR DEFENSE IS. :)
gaming.stackexchange.com/users/77854/Arnold
Okay the top two answers say most of it for the question
but I would like to add a point.
So if there are two players in war with the exact same defenses, they would further be differentiated on the basis of their league or trophies or xp.
How are clan war positions determined when identical bases are present in war?
Happy Clashing!
gaming.stackexchange.com/users/171549/Mehravish Temkar
I am #10 in my clan (cause I'm farming) but I am #2 in clan wars. I don't have the strongest troops in my clan. I'm just wondering how the order is set up, the only thing i can think of is that it is based off of your defense, but I'm not sure. Anyone know?
How is Clan War Map position determined?
gaming.stackexchange.com
<clash-of-clans>
gaming.stackexchange.com/questions/168192
gaming.stackexchange.com/users/76664/Andy
War map rank is determined by  overall  defense. The bases are ordered from highest to lowest strength.     It is stated that there is a specific formula which dictates the position in clan wars.
Details regarding how war map rank is working.