Before making a really huge map, the first thing to consider is this: Will we be playing Civ4 on a computer powerful enough to handle an extra huge map? Ultra-huge maps are slow in Civ4; an overclocked Ivy Bridge Core i7 is suggested if playing them. They are buggy in Civ4: There are ugly horizontal bands when the maps are made too big. They are more prone to memory allocation failures.
If one insists on an extra huge map, it's not trivial to change Totestra to accommodate these maps. It's not a simple matter of making the map bigger; the underlying height map also has to be altered.
There are a few ways to get an extra-huge PerfectWorld map:
        heightmap_size_factor = 3 + selectionID
        self.hmWidth  = (self.hmMaxGrain * self.ratioX * 
                         heightmap_size_factor)
        self.hmHeight = (self.hmMaxGrain * self.ratioY * 
                         heightmap_size_factor) + 1
        # These are expressed in 4x4 "Grid" units
        self.maxMapWidth = int(self.hmWidth / 4)
        self.maxMapHeight = int(self.hmHeight / 4)
By changing the number "3" above to a bigger number, it becomes possible to make bigger maps. For example, to make a "Planetary Mongoose" sized map (216 x 144), we would probably make the code look like this:
        heightmap_size_factor = 5 + selectionID
        if heightmap_size_factor > 6: # Cap
            heightmap_size_factor = 6
        self.hmWidth  = (self.hmMaxGrain * self.ratioX * 
                         heightmap_size_factor)
        self.hmHeight = (self.hmMaxGrain * self.ratioY * 
                         heightmap_size_factor) + 1
        # These are expressed in 4x4 "Grid" units
        self.maxMapWidth = int(self.hmWidth / 4)
        self.maxMapHeight = int(self.hmHeight / 4)
As well as this code:
def getGridSize(argsList):
    grid_sizes = { # Super size me!
                WorldSizeTypes.WORLDSIZE_DUEL:          (20,13),
                WorldSizeTypes.WORLDSIZE_TINY:          (24,16),
                WorldSizeTypes.WORLDSIZE_SMALL:         (30,20),
                WorldSizeTypes.WORLDSIZE_STANDARD:      (36,24),
                WorldSizeTypes.WORLDSIZE_LARGE:         (42,28),
                WorldSizeTypes.WORLDSIZE_HUGE:          (54,36)
    }
Continents and islands will be more stringy, yes, but boy will the map be huge.
Note that there is code to cap the map size; the following code should never be altered:
    # The map generator goes in to an infinite loop if the 
    # output map is bigger than (hmWidth, hmHeight)
    if(sizex > mc.maxMapWidth):
        sizex = mc.maxMapWidth
    if(sizey > mc.maxMapHeight):
        sizey = mc.maxMapHeight
    mc.serviceFlags |= sizey # Service Tag
    return (sizex, sizey)
Other values in the code are:
It takes this side of forever to make an extra-huge map; it is really slow and acts buggy in Civ4. There are ugly horizontal bands on the map and I'm sure trying to play an actual game with such a map will quickly cause one to hit a memory allocation failure (MAF).
Civ4 is a very flexible engine and it's possible to play maps in it far bigger than anything Civ3 or Civ2 could ever work with.