I can tell you how I made it.
I have a height map of some 1200x1200 values. The heightmap is then divided into x number of layers (usually 8-12 layers) where only 1 value is in one layer.
I then autotile the each layer to convert it into a 47 tiles tileset (the Wang tileset
http://www.cr31.co.uk/stagecast/art/grid/blob/wang.png). I use different tilesets for some of the layers (grassy, dirt(s), water etc.)
Then I go through each position in each layer, figuring out which tiles goes into the combined layer (like drawing the tile for each layer on top of each other, but ignoring tiles which are completely hidden in lower layers)
All new combinations of tiles is saved to a new combined tileset (actually a lot of tilesets, as I can't hold all tiles in one tileset without hitting the max on a texture) and a new map is created consisting of values for the new combined tiles. This will look something like this:
BUT I am also able to zoom in and out of this map by redrawing the tiles in new sizes. Original is 32x32 pixels, but I can zoom all the way down to 4x4 and at 4x4 pixels, there's too much tiles that needs to be drawn (and I cant keep my 60fps), so I run another function on the merged map:
For each position in the merged map I look at the 2x2 neighbors and creates a new tile graphics sized 8x8 pixels. This I do for the entire map (skipping every other tile) and creates a lot of new 2x2 tiles (one of my maps creates 371 combined tiles and 2433 2x2 unique tiles), but this makes it possible for me to draw the entire map at 8x8 when I zoom to 4x4 and thus leaving me enough time to do all the other stuff in the frame (16ms).